blob: 5744ad78b5fee671965bfa50dfee1565d1d7ad36 [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,
Nico Huber32f1ea82023-05-01 15:11:48 +02002813 .probe = probe_spi_rdid,
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},
Nico Huber32f1ea82023-05-01 15:11:48 +02002841 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002842 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002843
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002844 {
2845 .vendor = "Atmel",
2846 .name = "AT45DB021D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002847 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002848 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002849 .model_id = ATMEL_AT45DB021D,
Alan Greencbb85c02019-06-25 13:42:34 +10002850 .total_size = 256, /* or 264, determined from status register */
2851 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002852 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002853 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2854 .feature_bits = FEATURE_OTP,
Stefan Tauner6697f712014-08-06 15:09:15 +00002855 .tested = TEST_OK_PREW,
Nico Huber32f1ea82023-05-01 15:11:48 +02002856 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002857 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002858 .block_erasers =
2859 {
2860 {
2861 .eraseblocks = { {256, 1024} },
2862 .block_erase = spi_erase_at45db_page,
2863 }, {
2864 .eraseblocks = { {8 * 256, 1024/8} },
2865 .block_erase = spi_erase_at45db_block,
2866 }, {
2867 .eraseblocks = {
2868 {8 * 256, 1},
2869 {120 * 256, 1},
2870 {128 * 256, 7},
2871 },
2872 .block_erase = spi_erase_at45db_sector
2873 }, {
2874 .eraseblocks = { {256 * 1024, 1} },
2875 .block_erase = spi_erase_at45db_chip,
2876 }
2877 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002878 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002879 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002880 /* granularity will be set by the probing function. */
2881 .write = spi_write_at45db,
2882 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002883 .voltage = {2700, 3600},
Nico Huber32f1ea82023-05-01 15:11:48 +02002884 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002885 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002886
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002887 {
2888 .vendor = "Atmel",
2889 .name = "AT45DB041D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002890 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002891 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002892 .model_id = ATMEL_AT45DB041D,
Alan Greencbb85c02019-06-25 13:42:34 +10002893 .total_size = 512, /* or 528, determined from status register */
2894 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002895 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002896 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2897 .feature_bits = FEATURE_OTP,
2898 .tested = TEST_OK_PREW,
Nico Huber32f1ea82023-05-01 15:11:48 +02002899 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002900 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002901 .block_erasers =
2902 {
2903 {
2904 .eraseblocks = { {256, 2048} },
2905 .block_erase = spi_erase_at45db_page,
2906 }, {
2907 .eraseblocks = { {8 * 256, 2048/8} },
2908 .block_erase = spi_erase_at45db_block,
2909 }, {
2910 .eraseblocks = {
2911 {8 * 256, 1},
2912 {248 * 256, 1},
2913 {256 * 256, 7},
2914 },
2915 .block_erase = spi_erase_at45db_sector
2916 }, {
2917 .eraseblocks = { {512 * 1024, 1} },
2918 .block_erase = spi_erase_at45db_chip,
2919 }
2920 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002921 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002922 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002923 /* granularity will be set by the probing function. */
2924 .write = spi_write_at45db,
2925 .read = spi_read_at45db, /* Fast read (0x0B) supported */
2926 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02002927 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002928 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002929
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002930 {
2931 .vendor = "Atmel",
2932 .name = "AT45DB081D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002933 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002934 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002935 .model_id = ATMEL_AT45DB081D,
Alan Greencbb85c02019-06-25 13:42:34 +10002936 .total_size = 1024, /* or 1056, determined from status register */
2937 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002938 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002939 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2940 .feature_bits = FEATURE_OTP,
Angel Pons250aeba2018-09-30 20:28:22 +02002941 .tested = TEST_OK_PREW,
Nico Huber32f1ea82023-05-01 15:11:48 +02002942 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002943 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002944 .block_erasers =
2945 {
2946 {
2947 .eraseblocks = { {256, 4096} },
2948 .block_erase = spi_erase_at45db_page,
2949 }, {
2950 .eraseblocks = { {8 * 256, 4096/8} },
2951 .block_erase = spi_erase_at45db_block,
2952 }, {
2953 .eraseblocks = {
2954 {8 * 256, 1},
2955 {248 * 256, 1},
2956 {256 * 256, 15},
2957 },
2958 .block_erase = spi_erase_at45db_sector
2959 }, {
2960 .eraseblocks = { {1024 * 1024, 1} },
2961 .block_erase = spi_erase_at45db_chip,
2962 }
2963 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002964 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002965 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002966 /* granularity will be set by the probing function. */
2967 .write = spi_write_at45db,
2968 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +00002969 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02002970 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002971 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002972
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002973 {
2974 .vendor = "Atmel",
2975 .name = "AT45DB161D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002976 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002977 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002978 .model_id = ATMEL_AT45DB161D,
Alan Greencbb85c02019-06-25 13:42:34 +10002979 .total_size = 2048, /* or 2112, determined from status register */
2980 .page_size = 512, /* or 528, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002981 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002982 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2983 .feature_bits = FEATURE_OTP,
2984 .tested = TEST_OK_PREW,
Nico Huber32f1ea82023-05-01 15:11:48 +02002985 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002986 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002987 .block_erasers =
2988 {
2989 {
2990 .eraseblocks = { {512, 4096} },
2991 .block_erase = spi_erase_at45db_page,
2992 }, {
2993 .eraseblocks = { {8 * 512, 4096/8} },
2994 .block_erase = spi_erase_at45db_block,
2995 }, {
2996 .eraseblocks = {
2997 {8 * 512, 1},
2998 {248 * 512, 1},
2999 {256 * 512, 15},
3000 },
3001 .block_erase = spi_erase_at45db_sector
3002 }, {
3003 .eraseblocks = { {2048 * 1024, 1} },
3004 .block_erase = spi_erase_at45db_chip,
3005 }
3006 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003007 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003008 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003009 /* granularity will be set by the probing function. */
3010 .write = spi_write_at45db,
3011 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +00003012 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02003013 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003014 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003015
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003016 {
3017 .vendor = "Atmel",
3018 .name = "AT45DB321C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003019 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003020 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003021 .model_id = ATMEL_AT45DB321C,
Alan Greencbb85c02019-06-25 13:42:34 +10003022 .total_size = 4224, /* No power of two sizes */
3023 .page_size = 528, /* No power of two sizes */
Steven Zakulec3603a282012-05-02 20:07:57 +00003024 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003025 /* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */
3026 .feature_bits = FEATURE_OTP,
3027 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003028 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003029 .probe_timing = TIMING_ZERO,
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003030 .block_erasers =
3031 {
3032 {
3033 .eraseblocks = { {528, 8192} },
3034 .block_erase = spi_erase_at45db_page,
3035 }, {
3036 .eraseblocks = { {8 * 528, 8192/8} },
3037 .block_erase = spi_erase_at45db_block,
3038 }, /* Although the datasheets describes sectors (which can be write protected)
3039 * there seems to be no erase functions for them.
Stefan Tauner23e10b82016-01-23 16:16:49 +00003040 {
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003041 .eraseblocks = {
3042 {8 * 528, 1},
3043 {120 * 528, 1},
3044 {128 * 528, 63},
3045 },
3046 .block_erase = spi_erase_at45db_sector
3047 }, */ {
3048 .eraseblocks = { {4224 * 1024, 1} },
3049 .block_erase = spi_erase_at45db_chip,
3050 }
3051 },
3052 .printlock = spi_prettyprint_status_register_at45db, /* Bit 0 is undefined, no lockdown */
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003053 .write = spi_write_at45db,
3054 .read = spi_read_at45db_e8, /* 3 address and 4 dummy bytes */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003055 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10003056 .gran = write_gran_528bytes,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003057 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003058
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003059 {
3060 .vendor = "Atmel",
3061 .name = "AT45DB321D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003062 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003063 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003064 .model_id = ATMEL_AT45DB321D,
Alan Greencbb85c02019-06-25 13:42:34 +10003065 .total_size = 4096, /* or 4224, determined from status register */
3066 .page_size = 512, /* or 528, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00003067 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003068 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
Daniel Lenski65922a32012-02-15 23:40:23 +00003069 .feature_bits = FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +00003070 .tested = TEST_OK_PREW,
Nico Huber32f1ea82023-05-01 15:11:48 +02003071 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003072 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003073 .block_erasers =
3074 {
3075 {
3076 .eraseblocks = { {512, 8192} },
3077 .block_erase = spi_erase_at45db_page,
3078 }, {
3079 .eraseblocks = { {8 * 512, 8192/8} },
3080 .block_erase = spi_erase_at45db_block,
3081 }, {
3082 .eraseblocks = {
3083 {8 * 512, 1},
3084 {120 * 512, 1},
3085 {128 * 512, 63},
3086 },
3087 .block_erase = spi_erase_at45db_sector
3088 }, {
3089 .eraseblocks = { {4096 * 1024, 1} },
3090 .block_erase = spi_erase_at45db_chip,
3091 }
3092 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003093 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003094 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003095 /* granularity will be set by the probing function. */
3096 .write = spi_write_at45db,
3097 .read = spi_read_at45db, /* Fast read (0x0B) supported */
3098 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02003099 .prepare_access = spi_prepare_at45db,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003100 },
3101
3102 {
3103 .vendor = "Atmel",
3104 .name = "AT45DB321E",
3105 .bustype = BUS_SPI,
3106 .manufacture_id = ATMEL_ID,
3107 .model_id = ATMEL_AT45DB321C,
Alan Greencbb85c02019-06-25 13:42:34 +10003108 .total_size = 4096, /* or 4224, determined from status register */
3109 .page_size = 512, /* or 528, determined from status register */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003110 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
3111 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
3112 .feature_bits = FEATURE_OTP,
3113 .tested = TEST_UNTESTED,
Nico Huber32f1ea82023-05-01 15:11:48 +02003114 .probe = probe_spi_rdid,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003115 .probe_timing = TIMING_ZERO,
3116 .block_erasers =
3117 {
3118 {
3119 .eraseblocks = { {512, 8192} },
3120 .block_erase = spi_erase_at45db_page,
3121 }, {
3122 .eraseblocks = { {8 * 512, 8192/8} },
3123 .block_erase = spi_erase_at45db_block,
3124 }, {
3125 .eraseblocks = {
3126 {8 * 512, 1},
3127 {120 * 512, 1},
3128 {128 * 512, 63},
3129 },
3130 .block_erase = spi_erase_at45db_sector
3131 }, {
3132 .eraseblocks = { {4096 * 1024, 1} },
3133 .block_erase = spi_erase_at45db_chip,
3134 }
3135 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003136 .printlock = spi_prettyprint_status_register_at45db, /* has a 2nd status register */
Alan Greenc1863ca2019-06-27 15:08:03 +10003137 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003138 /* granularity will be set by the probing function. */
3139 .write = spi_write_at45db,
3140 .read = spi_read_at45db, /* Fast read (0x0B) supported */
3141 .voltage = {2500, 3600}, /* 2.3-3.6V & 2.5-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02003142 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003143 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003144
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003145 {
3146 .vendor = "Atmel",
3147 .name = "AT45DB642D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003148 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003149 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003150 .model_id = ATMEL_AT45DB642D,
Alan Greencbb85c02019-06-25 13:42:34 +10003151 .total_size = 8192, /* or 8448, determined from status register */
3152 .page_size = 1024, /* or 1056, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00003153 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003154 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
3155 .feature_bits = FEATURE_OTP,
Stefan Tauner5c316f92015-02-08 21:57:52 +00003156 .tested = TEST_OK_PREW,
Nico Huber32f1ea82023-05-01 15:11:48 +02003157 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003158 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003159 .block_erasers =
3160 {
3161 {
3162 .eraseblocks = { {1024, 8192} },
3163 .block_erase = spi_erase_at45db_page,
3164 }, {
3165 .eraseblocks = { {8 * 1024, 8192/8} },
3166 .block_erase = spi_erase_at45db_block,
3167 }, {
3168 .eraseblocks = {
3169 {8 * 1024, 1},
3170 {248 * 1024, 1},
3171 {256 * 1024, 31},
3172 },
3173 .block_erase = spi_erase_at45db_sector
3174 }, {
3175 .eraseblocks = { {8192 * 1024, 1} },
3176 .block_erase = spi_erase_at45db_chip,
3177 }
3178 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003179 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003180 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003181 /* granularity will be set by the probing function. */
3182 .write = spi_write_at45db,
3183 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003184 .voltage = {2700, 3600},
Nico Huber32f1ea82023-05-01 15:11:48 +02003185 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003186 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003187
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003188 {
3189 .vendor = "Atmel",
Alan Green1f9cc7d2019-07-01 11:10:45 +10003190 .name = "AT49(H)F010",
3191 .bustype = BUS_PARALLEL,
3192 .manufacture_id = ATMEL_ID,
3193 .model_id = ATMEL_AT49F010,
3194 .total_size = 128,
3195 .page_size = 0, /* unused */
3196 .feature_bits = FEATURE_EITHER_RESET,
3197 .tested = TEST_OK_PREW,
3198 .probe = probe_jedec,
3199 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3200 .block_erasers =
3201 {
3202 {
3203 .eraseblocks = { {128 * 1024, 1} },
3204 .block_erase = erase_chip_block_jedec,
3205 }
3206 },
3207 .printlock = printlock_at49f,
3208 .write = write_jedec_1,
3209 .read = read_memmapped,
3210 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003211 .prepare_access = prepare_memory_access,
3212 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003213 },
3214
3215 {
3216 .vendor = "Atmel",
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003217 .name = "AT49BV512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003218 .bustype = BUS_PARALLEL,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003219 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003220 .model_id = ATMEL_AT49BV512,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003221 .total_size = 64,
3222 .page_size = 64,
Sean Nelson35727f72010-01-28 23:55:12 +00003223 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +00003224 .tested = TEST_OK_PREW,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003225 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00003226 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003227 .block_erasers =
3228 {
3229 {
3230 .eraseblocks = { {64 * 1024, 1} },
3231 .block_erase = erase_chip_block_jedec,
3232 }
3233 },
Sean Nelson35727f72010-01-28 23:55:12 +00003234 .write = write_jedec_1,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003235 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003236 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01003237 .prepare_access = prepare_memory_access,
3238 .finish_access = finish_memory_access,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003239 },
3240
3241 {
3242 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003243 .name = "AT49F002(N)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003244 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003245 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003246 .model_id = ATMEL_AT49F002N,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003247 .total_size = 256,
3248 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00003249 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003250 .tested = TEST_UNTESTED,
3251 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00003252 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003253 .block_erasers =
3254 {
3255 {
3256 .eraseblocks = {
3257 {16 * 1024, 1},
3258 {8 * 1024, 2},
3259 {96 * 1024, 1},
3260 {128 * 1024, 1},
3261 },
3262 .block_erase = erase_sector_jedec,
3263 }, {
3264 .eraseblocks = { {256 * 1024, 1} },
3265 .block_erase = erase_chip_block_jedec,
3266 }
3267 },
Sean Nelson35727f72010-01-28 23:55:12 +00003268 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00003269 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003270 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003271 .prepare_access = prepare_memory_access,
3272 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00003273 },
3274
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003275 {
3276 .vendor = "Atmel",
3277 .name = "AT49F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003278 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003279 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003280 .model_id = ATMEL_AT49F002NT,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003281 .total_size = 256,
3282 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00003283 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00003284 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003285 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00003286 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003287 .block_erasers =
3288 {
3289 {
3290 .eraseblocks = {
3291 {128 * 1024, 1},
3292 {96 * 1024, 1},
3293 {8 * 1024, 2},
3294 {16 * 1024, 1},
3295 },
3296 .block_erase = erase_sector_jedec,
3297 }, {
3298 .eraseblocks = { {256 * 1024, 1} },
3299 .block_erase = erase_chip_block_jedec,
3300 }
3301 },
Sean Nelson35727f72010-01-28 23:55:12 +00003302 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00003303 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003304 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003305 .prepare_access = prepare_memory_access,
3306 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00003307 },
3308
Daniel Lenskidf90d3a2010-07-22 11:44:38 +00003309 {
Uwe Hermannc74e9772011-09-08 19:55:18 +00003310 .vendor = "Atmel",
David Borgf5a30f62012-04-15 13:16:32 +00003311 .name = "AT49F020",
3312 .bustype = BUS_PARALLEL,
3313 .manufacture_id = ATMEL_ID,
3314 .model_id = ATMEL_AT49F020,
3315 .total_size = 256,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003316 .page_size = 0, /* unused */
David Borgf5a30f62012-04-15 13:16:32 +00003317 .feature_bits = FEATURE_EITHER_RESET,
3318 .tested = TEST_OK_PRE,
3319 .probe = probe_jedec,
3320 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3321 .block_erasers =
3322 {
3323 {
3324 .eraseblocks = { {256 * 1024, 1} },
3325 .block_erase = erase_chip_block_jedec,
3326 }
3327 /* Chip features an optional permanent write protection
3328 * of the first 8 kB. The erase function is the same as
3329 * above, but 00000H to 01FFFH will not be erased.
3330 * FIXME: add another eraser when partial erasers are
3331 * supported.
3332 */
3333 },
3334 .printlock = printlock_at49f,
3335 .write = write_jedec_1,
3336 .read = read_memmapped,
3337 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003338 .prepare_access = prepare_memory_access,
3339 .finish_access = finish_memory_access,
David Borgf5a30f62012-04-15 13:16:32 +00003340 },
3341
3342 {
3343 .vendor = "Atmel",
3344 .name = "AT49F040",
3345 .bustype = BUS_PARALLEL,
3346 .manufacture_id = ATMEL_ID,
3347 .model_id = ATMEL_AT49F040,
3348 .total_size = 512,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003349 .page_size = 0, /* unused */
David Borgf5a30f62012-04-15 13:16:32 +00003350 .feature_bits = FEATURE_EITHER_RESET,
3351 .tested = TEST_UNTESTED,
3352 .probe = probe_jedec,
3353 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3354 .block_erasers =
3355 {
3356 {
3357 .eraseblocks = { {512 * 1024, 1} },
3358 .block_erase = erase_chip_block_jedec,
3359 }
3360 /* Chip features an optional permanent write protection
3361 * of the first 16 kB. The erase function is the same as
3362 * above, but 00000H to 03FFFH will not be erased.
3363 * FIXME: add another eraser when partial erasers are
3364 * supported.
3365 */
3366 },
3367 .printlock = printlock_at49f,
3368 .write = write_jedec_1,
3369 .read = read_memmapped,
3370 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003371 .prepare_access = prepare_memory_access,
3372 .finish_access = finish_memory_access,
David Borgf5a30f62012-04-15 13:16:32 +00003373 },
3374
3375 {
3376 .vendor = "Atmel",
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003377 .name = "AT49F080",
3378 .bustype = BUS_PARALLEL,
3379 .manufacture_id = ATMEL_ID,
3380 .model_id = ATMEL_AT49F080,
3381 .total_size = 1024,
3382 .page_size = 0, /* unused */
3383 .feature_bits = FEATURE_EITHER_RESET,
3384 .tested = TEST_UNTESTED,
3385 .probe = probe_jedec,
3386 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3387 .block_erasers =
3388 {
3389 {
3390 .eraseblocks = { {1024 * 1024, 1} },
3391 .block_erase = erase_chip_block_jedec,
3392 }
3393 /* Chip features an optional permanent write protection
3394 * of the first 16 kB. The erase function is the same as
3395 * above, but 00000H to 03FFFH will not be erased.
3396 * FIXME: add another eraser when partial erasers are
3397 * supported.
3398 */
3399 },
3400 .printlock = printlock_at49f,
3401 .write = write_jedec_1,
3402 .read = read_memmapped,
3403 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003404 .prepare_access = prepare_memory_access,
3405 .finish_access = finish_memory_access,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003406 },
3407
3408 {
3409 /* 'top' version of AT49F080. equal in all aspects but the boot block address */
3410 .vendor = "Atmel",
3411 .name = "AT49F080T",
3412 .bustype = BUS_PARALLEL,
3413 .manufacture_id = ATMEL_ID,
3414 .model_id = ATMEL_AT49F080T,
3415 .total_size = 1024,
3416 .page_size = 0, /* unused */
3417 .feature_bits = FEATURE_EITHER_RESET,
3418 .tested = TEST_UNTESTED,
3419 .probe = probe_jedec,
3420 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3421 .block_erasers =
3422 {
3423 {
3424 .eraseblocks = { {1024 * 1024, 1} },
3425 .block_erase = erase_chip_block_jedec,
3426 }
3427 /* Chip features an optional permanent write protection
3428 * of the first 16 kB. The erase function is the same as
3429 * above, but FC000H to FFFFFH will not be erased.
3430 * FIXME: add another eraser when partial erasers are
3431 * supported.
3432 */
3433 },
3434 .printlock = printlock_at49f,
3435 .write = write_jedec_1,
3436 .read = read_memmapped,
3437 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003438 .prepare_access = prepare_memory_access,
3439 .finish_access = finish_memory_access,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003440 },
3441
3442 {
3443 .vendor = "Atmel",
Uwe Hermannc74e9772011-09-08 19:55:18 +00003444 .name = "AT49LH002",
3445 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
3446 .manufacture_id = ATMEL_ID,
3447 .model_id = ATMEL_AT49LH002,
3448 .total_size = 256,
3449 .page_size = 0, /* unused */
Uwe Hermannc74e9772011-09-08 19:55:18 +00003450 .tested = TEST_UNTESTED,
Stefan Tauner7de93932014-08-03 13:05:45 +00003451 .probe = probe_82802ab,
3452 .probe_timing = TIMING_ZERO,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003453 .block_erasers =
3454 {
3455 {
3456 .eraseblocks = {
3457 {64 * 1024, 3},
3458 {32 * 1024, 1},
3459 {8 * 1024, 2},
3460 {16 * 1024, 1},
3461 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003462 .block_erase = NULL, /* TODO: Implement. */
Uwe Hermannc74e9772011-09-08 19:55:18 +00003463 }, {
3464 .eraseblocks = {
3465 {64 * 1024, 4},
3466 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003467 .block_erase = erase_block_82802ab,
3468 },
3469 },
3470 .printlock = printlock_regspace2_block_eraser_0,
3471 .unlock = unlock_regspace2_block_eraser_0,
3472 .write = write_82802ab,
3473 .read = read_memmapped,
3474 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003475 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003476 .finish_access = finish_memory_access,
Stefan Tauner7de93932014-08-03 13:05:45 +00003477 },
3478
3479 {
3480 .vendor = "Atmel",
Stefan Tauner7de93932014-08-03 13:05:45 +00003481 .name = "AT49LH004",
3482 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
3483 .manufacture_id = ATMEL_ID,
3484 .model_id = ATMEL_AT49LH004,
3485 .total_size = 512,
3486 .page_size = 0, /* unused */
Stefan Tauner7de93932014-08-03 13:05:45 +00003487 .tested = TEST_UNTESTED,
3488 .probe = probe_82802ab,
3489 .probe_timing = TIMING_ZERO,
3490 .block_erasers =
3491 {
3492 {
3493 .eraseblocks = {
3494 {64 * 1024, 7},
3495 {32 * 1024, 1},
3496 {8 * 1024, 2},
3497 {16 * 1024, 1},
3498 },
3499 .block_erase = erase_block_82802ab,
3500 }, {
3501 .eraseblocks = {
3502 {64 * 1024, 8},
3503 },
Uwe Hermannc74e9772011-09-08 19:55:18 +00003504 .block_erase = NULL, /* TODO: Implement. */
3505 },
3506 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003507 .printlock = printlock_regspace2_block_eraser_0,
3508 .unlock = unlock_regspace2_block_eraser_0,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003509 .write = write_82802ab,
3510 .read = read_memmapped,
3511 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003512 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003513 .finish_access = finish_memory_access,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003514 },
3515
3516 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003517 .vendor = "Atmel",
3518 .name = "AT49LH00B4",
3519 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
3520 .manufacture_id = ATMEL_ID,
3521 .model_id = ATMEL_AT49LH00B4,
3522 .total_size = 512,
Andrew Morganca081462011-09-13 22:05:44 +00003523 .page_size = 0, /* unused */
Alan Green1f9cc7d2019-07-01 11:10:45 +10003524 .tested = TEST_UNTESTED,
3525 .probe = probe_82802ab,
Andrew Morganca081462011-09-13 22:05:44 +00003526 .probe_timing = TIMING_ZERO,
3527 .block_erasers =
3528 {
3529 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003530 .eraseblocks = {
3531 {8 * 1024, 2},
3532 {16 * 1024, 1},
3533 {32 * 1024, 1},
3534 {64 * 1024, 7},
3535 },
3536 .block_erase = NULL, /* TODO: Implement. */
3537 }, {
3538 .eraseblocks = {
3539 {64 * 1024, 8},
3540 },
3541 .block_erase = erase_block_82802ab,
Andrew Morganca081462011-09-13 22:05:44 +00003542 },
3543 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10003544 .printlock = printlock_regspace2_block_eraser_0,
3545 .unlock = unlock_regspace2_block_eraser_0,
3546 .write = write_82802ab,
Andrew Morganca081462011-09-13 22:05:44 +00003547 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003548 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003549 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003550 .finish_access = finish_memory_access,
Andrew Morganca081462011-09-13 22:05:44 +00003551 },
3552
3553 {
Angel Pons1ebda782021-04-20 21:39:11 +02003554 .vendor = "Boya/BoHong Microelectronics",
Nico Huber3cddff42024-10-20 15:18:53 +02003555 .name = "B.25D05AS",
Christian Kudera475a7ee2021-04-20 22:50:01 +02003556 .bustype = BUS_SPI,
3557 .manufacture_id = BOYA_BOHONG_ID,
Nico Huber3cddff42024-10-20 15:18:53 +02003558 .model_id = BOYA_BOHONG_B_25D05AS,
3559 .total_size = 64,
3560 .page_size = 256,
3561 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3562 .tested = TEST_UNTESTED,
3563 .probe = probe_spi_rdid,
3564 .probe_timing = TIMING_ZERO,
3565 .block_erasers =
3566 {
3567 {
3568 .eraseblocks = { {4 * 1024, 16} },
3569 .block_erase = spi_block_erase_20,
3570 }, {
3571 .eraseblocks = { {32 * 1024, 2} },
3572 .block_erase = spi_block_erase_52,
3573 }, {
3574 .eraseblocks = { {64 * 1024, 1} },
3575 .block_erase = spi_block_erase_d8,
3576 }, {
3577 .eraseblocks = { {64 * 1024, 1} },
3578 .block_erase = spi_block_erase_60,
3579 }, {
3580 .eraseblocks = { {64 * 1024, 1} },
3581 .block_erase = spi_block_erase_c7,
3582 },
3583 },
3584 .printlock = spi_prettyprint_status_register_bp2_srwd,
3585 .unlock = spi_disable_blockprotect_bp2_srwd,
3586 .write = spi_chip_write_256,
3587 .read = spi_chip_read,
3588 .voltage = {2700, 3600},
3589 .prepare_access = spi_prepare_io,
3590 .finish_access = spi_finish_io,
3591 },
3592
3593 {
3594 .vendor = "Boya/BoHong Microelectronics",
3595 .name = "B.25D10AS",
3596 .bustype = BUS_SPI,
3597 .manufacture_id = BOYA_BOHONG_ID,
3598 .model_id = BOYA_BOHONG_B_25D10AS,
3599 .total_size = 128,
3600 .page_size = 256,
3601 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3602 .tested = TEST_UNTESTED,
3603 .probe = probe_spi_rdid,
3604 .probe_timing = TIMING_ZERO,
3605 .block_erasers =
3606 {
3607 {
3608 .eraseblocks = { {4 * 1024, 32} },
3609 .block_erase = spi_block_erase_20,
3610 }, {
3611 .eraseblocks = { {32 * 1024, 4} },
3612 .block_erase = spi_block_erase_52,
3613 }, {
3614 .eraseblocks = { {64 * 1024, 2} },
3615 .block_erase = spi_block_erase_d8,
3616 }, {
3617 .eraseblocks = { {128 * 1024, 1} },
3618 .block_erase = spi_block_erase_60,
3619 }, {
3620 .eraseblocks = { {128 * 1024, 1} },
3621 .block_erase = spi_block_erase_c7,
3622 },
3623 },
3624 .printlock = spi_prettyprint_status_register_bp2_srwd,
3625 .unlock = spi_disable_blockprotect_bp2_srwd,
3626 .write = spi_chip_write_256,
3627 .read = spi_chip_read,
3628 .voltage = {2700, 3600},
3629 .prepare_access = spi_prepare_io,
3630 .finish_access = spi_finish_io,
3631 },
3632
3633 {
3634 .vendor = "Boya/BoHong Microelectronics",
3635 .name = "B.25D20AS",
3636 .bustype = BUS_SPI,
3637 .manufacture_id = BOYA_BOHONG_ID,
3638 .model_id = BOYA_BOHONG_B_25D20AS,
3639 .total_size = 256,
3640 .page_size = 256,
3641 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3642 .tested = TEST_UNTESTED,
3643 .probe = probe_spi_rdid,
3644 .probe_timing = TIMING_ZERO,
3645 .block_erasers =
3646 {
3647 {
3648 .eraseblocks = { {4 * 1024, 64} },
3649 .block_erase = spi_block_erase_20,
3650 }, {
3651 .eraseblocks = { {32 * 1024, 8} },
3652 .block_erase = spi_block_erase_52,
3653 }, {
3654 .eraseblocks = { {64 * 1024, 4} },
3655 .block_erase = spi_block_erase_d8,
3656 }, {
3657 .eraseblocks = { {256 * 1024, 1} },
3658 .block_erase = spi_block_erase_60,
3659 }, {
3660 .eraseblocks = { {256 * 1024, 1} },
3661 .block_erase = spi_block_erase_c7,
3662 },
3663 },
3664 .printlock = spi_prettyprint_status_register_bp2_srwd,
3665 .unlock = spi_disable_blockprotect_bp2_srwd,
3666 .write = spi_chip_write_256,
3667 .read = spi_chip_read,
3668 .voltage = {2700, 3600},
3669 .prepare_access = spi_prepare_io,
3670 .finish_access = spi_finish_io,
3671 },
3672
3673 {
3674 .vendor = "Boya/BoHong Microelectronics",
3675 .name = "B.25D40AS/BY25D40ES",
3676 .bustype = BUS_SPI,
3677 .manufacture_id = BOYA_BOHONG_ID,
3678 .model_id = BOYA_BOHONG_B_25D40AS,
3679 .total_size = 512,
3680 .page_size = 256,
3681 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3682 .tested = TEST_UNTESTED,
3683 .probe = probe_spi_rdid,
3684 .probe_timing = TIMING_ZERO,
3685 .block_erasers =
3686 {
3687 {
3688 .eraseblocks = { {4 * 1024, 128} },
3689 .block_erase = spi_block_erase_20,
3690 }, {
3691 .eraseblocks = { {32 * 1024, 16} },
3692 .block_erase = spi_block_erase_52,
3693 }, {
3694 .eraseblocks = { {64 * 1024, 8} },
3695 .block_erase = spi_block_erase_d8,
3696 }, {
3697 .eraseblocks = { {512 * 1024, 1} },
3698 .block_erase = spi_block_erase_60,
3699 }, {
3700 .eraseblocks = { {512 * 1024, 1} },
3701 .block_erase = spi_block_erase_c7,
3702 },
3703 },
3704 .printlock = spi_prettyprint_status_register_bp2_srwd,
3705 .unlock = spi_disable_blockprotect_bp2_srwd,
3706 .write = spi_chip_write_256,
3707 .read = spi_chip_read,
3708 .voltage = {2700, 3600},
3709 .prepare_access = spi_prepare_io,
3710 .finish_access = spi_finish_io,
3711 },
3712
3713 {
3714 .vendor = "Boya/BoHong Microelectronics",
3715 .name = "B.25D80AS/BY25Q80BS/BY25Q80ES",
3716 .bustype = BUS_SPI,
3717 .manufacture_id = BOYA_BOHONG_ID,
3718 .model_id = BOYA_BOHONG_B_25D80AS,
3719 .total_size = 1024,
3720 .page_size = 256,
3721 /* BY25Q80BS: QPI, BY25Q80ES: QIO */
3722 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3723 .tested = TEST_UNTESTED,
3724 .probe = probe_spi_rdid,
3725 .probe_timing = TIMING_ZERO,
3726 .block_erasers =
3727 {
3728 {
3729 .eraseblocks = { {4 * 1024, 256} },
3730 .block_erase = spi_block_erase_20,
3731 }, {
3732 .eraseblocks = { {32 * 1024, 32} },
3733 .block_erase = spi_block_erase_52,
3734 }, {
3735 .eraseblocks = { {64 * 1024, 16} },
3736 .block_erase = spi_block_erase_d8,
3737 }, {
3738 .eraseblocks = { {1024 * 1024, 1} },
3739 .block_erase = spi_block_erase_60,
3740 }, {
3741 .eraseblocks = { {1024 * 1024, 1} },
3742 .block_erase = spi_block_erase_c7,
3743 },
3744 },
3745 .printlock = spi_prettyprint_status_register_bp2_srwd,
3746 .unlock = spi_disable_blockprotect_bp2_srwd,
3747 .write = spi_chip_write_256,
3748 .read = spi_chip_read,
3749 .voltage = {2700, 3600},
3750 .prepare_access = spi_prepare_io,
3751 .finish_access = spi_finish_io,
3752 },
3753
3754 {
3755 .vendor = "Boya/BoHong Microelectronics",
3756 .name = "B.25D16AS/BY25Q16BS/BY25Q16ES",
3757 .bustype = BUS_SPI,
3758 .manufacture_id = BOYA_BOHONG_ID,
3759 .model_id = BOYA_BOHONG_B_25D16AS,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003760 .total_size = 2048,
3761 .page_size = 256,
Nico Huber3cddff42024-10-20 15:18:53 +02003762 /* B25Q16BS/ES: QPI */
3763 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003764 .tested = TEST_OK_PR,
3765 .probe = probe_spi_rdid,
3766 .probe_timing = TIMING_ZERO,
3767 .block_erasers =
3768 {
3769 {
3770 .eraseblocks = { {4 * 1024, 512} },
3771 .block_erase = spi_block_erase_20,
3772 }, {
3773 .eraseblocks = { {32 * 1024, 64} },
3774 .block_erase = spi_block_erase_52,
3775 }, {
3776 .eraseblocks = { {64 * 1024, 32} },
3777 .block_erase = spi_block_erase_d8,
3778 }, {
3779 .eraseblocks = { {2 * 1024 * 1024, 1} },
3780 .block_erase = spi_block_erase_60,
3781 }, {
3782 .eraseblocks = { {2 * 1024 * 1024, 1} },
3783 .block_erase = spi_block_erase_c7,
3784 }
3785 },
3786 .printlock = spi_prettyprint_status_register_bp2_srwd,
3787 .unlock = spi_disable_blockprotect_bp2_srwd,
3788 .write = spi_chip_write_256,
3789 .read = spi_chip_read,
3790 .voltage = {2700, 3600},
Nico Huber3cddff42024-10-20 15:18:53 +02003791 .prepare_access = spi_prepare_io,
3792 .finish_access = spi_finish_io,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003793 },
3794
3795 {
3796 .vendor = "Boya/BoHong Microelectronics",
Nico Huber6bc88e72024-10-20 16:32:08 +02003797 .name = "B.25Q32BS/BY25Q32CS/BY25Q32ES",
3798 .bustype = BUS_SPI,
3799 .manufacture_id = BOYA_BOHONG_ID,
3800 .model_id = BOYA_BOHONG_B_25Q32BS,
3801 .total_size = 4096,
3802 .page_size = 256,
3803 /* BY25Q32CS: QPI w/ SRP (4, 4, 6, 8) */
3804 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
3805 FEATURE_OTP | FEATURE_QIO,
3806 .tested = TEST_UNTESTED,
3807 .probe = probe_spi_rdid,
3808 .probe_timing = TIMING_ZERO,
3809 .block_erasers =
3810 {
3811 {
3812 .eraseblocks = { {4 * 1024, 1024} },
3813 .block_erase = spi_block_erase_20,
3814 }, {
3815 .eraseblocks = { {32 * 1024, 128} },
3816 .block_erase = spi_block_erase_52,
3817 }, {
3818 .eraseblocks = { {64 * 1024, 64} },
3819 .block_erase = spi_block_erase_d8,
3820 }, {
3821 .eraseblocks = { {4096 * 1024, 1} },
3822 .block_erase = spi_block_erase_60,
3823 }, {
3824 .eraseblocks = { {4096 * 1024, 1} },
3825 .block_erase = spi_block_erase_c7,
3826 },
3827 },
3828 .reg_bits =
3829 {
3830 .qe = {STATUS2, 1, RW},
3831 .srp = {STATUS1, 7, RW},
3832 .srl = {STATUS2, 0, RW},
3833 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3834 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3835 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3836 .cmp = {STATUS2, 6, RW},
3837 },
3838 .wp_write_cfg = spi_wp_write_cfg,
3839 .wp_read_cfg = spi_wp_read_cfg,
3840 .wp_get_ranges = spi_wp_get_available_ranges,
3841 .decode_range = decode_range_spi25,
3842 .printlock = spi_prettyprint_status_register_bp4_srwd,
3843 .unlock = spi_disable_blockprotect_bp4_srwd,
3844 .write = spi_chip_write_256,
3845 .read = spi_chip_read,
3846 .voltage = {2700, 3600},
3847 .prepare_access = spi_prepare_io,
3848 .finish_access = spi_finish_io,
3849 },
3850
3851 {
3852 .vendor = "Boya/BoHong Microelectronics",
3853 .name = "B.25Q64AS/BY25Q64ES",
3854 .bustype = BUS_SPI,
3855 .manufacture_id = BOYA_BOHONG_ID,
3856 .model_id = BOYA_BOHONG_B_25Q64AS,
3857 .total_size = 8192,
3858 .page_size = 256,
3859 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
3860 FEATURE_OTP | FEATURE_QIO,
3861 .tested = TEST_UNTESTED,
3862 .probe = probe_spi_rdid,
3863 .probe_timing = TIMING_ZERO,
3864 .block_erasers =
3865 {
3866 {
3867 .eraseblocks = { {4 * 1024, 2048} },
3868 .block_erase = spi_block_erase_20,
3869 }, {
3870 .eraseblocks = { {32 * 1024, 256} },
3871 .block_erase = spi_block_erase_52,
3872 }, {
3873 .eraseblocks = { {64 * 1024, 128} },
3874 .block_erase = spi_block_erase_d8,
3875 }, {
3876 .eraseblocks = { {8192 * 1024, 1} },
3877 .block_erase = spi_block_erase_60,
3878 }, {
3879 .eraseblocks = { {8192 * 1024, 1} },
3880 .block_erase = spi_block_erase_c7,
3881 },
3882 },
3883 .reg_bits =
3884 {
3885 .qe = {STATUS2, 1, RW},
3886 .srp = {STATUS1, 7, RW},
3887 .srl = {STATUS2, 0, RW},
3888 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3889 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3890 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3891 .cmp = {STATUS2, 6, RW},
3892 },
3893 .wp_write_cfg = spi_wp_write_cfg,
3894 .wp_read_cfg = spi_wp_read_cfg,
3895 .wp_get_ranges = spi_wp_get_available_ranges,
3896 .decode_range = decode_range_spi25,
3897 .printlock = spi_prettyprint_status_register_bp4_srwd,
3898 .unlock = spi_disable_blockprotect_bp4_srwd,
3899 .write = spi_chip_write_256,
3900 .read = spi_chip_read,
3901 .voltage = {2700, 3600},
3902 .prepare_access = spi_prepare_io,
3903 .finish_access = spi_finish_io,
3904 },
3905
3906 {
3907 .vendor = "Boya/BoHong Microelectronics",
3908 .name = "B.25Q128AS/BY25Q128ES",
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003909 .bustype = BUS_SPI,
Angel Pons1ebda782021-04-20 21:39:11 +02003910 .manufacture_id = BOYA_BOHONG_ID,
3911 .model_id = BOYA_BOHONG_B_25Q128AS,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003912 .total_size = 16384,
3913 .page_size = 256,
Nico Huber6bc88e72024-10-20 16:32:08 +02003914 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber226bb872024-04-09 23:30:34 +02003915 FEATURE_OTP | FEATURE_QIO,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003916 .tested = TEST_OK_PREW,
3917 .probe = probe_spi_rdid,
3918 .probe_timing = TIMING_ZERO,
3919 .block_erasers =
3920 {
3921 {
3922 .eraseblocks = { {4 * 1024, 4096} },
3923 .block_erase = spi_block_erase_20,
3924 }, {
3925 .eraseblocks = { {32 * 1024, 512} },
3926 .block_erase = spi_block_erase_52,
3927 }, {
3928 .eraseblocks = { {64 * 1024, 256} },
3929 .block_erase = spi_block_erase_d8,
3930 }, {
3931 .eraseblocks = { {16 * 1024 * 1024, 1} },
3932 .block_erase = spi_block_erase_60,
3933 }, {
3934 .eraseblocks = { {16 * 1024 * 1024, 1} },
3935 .block_erase = spi_block_erase_c7,
3936 }
3937 },
Nico Huber226bb872024-04-09 23:30:34 +02003938 .reg_bits =
3939 {
3940 .qe = {STATUS2, 1, RW},
Nico Huber6bc88e72024-10-20 16:32:08 +02003941 .srp = {STATUS1, 7, RW},
3942 .srl = {STATUS2, 0, RW},
3943 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3944 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3945 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3946 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02003947 },
Nico Huber6bc88e72024-10-20 16:32:08 +02003948 .wp_write_cfg = spi_wp_write_cfg,
3949 .wp_read_cfg = spi_wp_read_cfg,
3950 .wp_get_ranges = spi_wp_get_available_ranges,
3951 .decode_range = decode_range_spi25,
3952 .printlock = spi_prettyprint_status_register_bp4_srwd,
3953 .unlock = spi_disable_blockprotect_bp4_srwd,
3954 .write = spi_chip_write_256,
3955 .read = spi_chip_read,
3956 .voltage = {2700, 3600},
3957 .prepare_access = spi_prepare_io,
3958 .finish_access = spi_finish_io,
3959 },
3960
3961 {
3962 .vendor = "Boya Microelectronics",
3963 .name = "BY25Q128FS",
3964 .bustype = BUS_SPI,
3965 .manufacture_id = BOYA_BOHONG_ID,
3966 .model_id = BOYA_BOHONG_B_25Q128FS,
3967 .total_size = 16384,
3968 .page_size = 256,
3969 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
3970 FEATURE_OTP | FEATURE_QIO,
3971 .tested = TEST_UNTESTED,
3972 .probe = probe_spi_rdid,
3973 .probe_timing = TIMING_ZERO,
3974 .block_erasers =
3975 {
3976 {
3977 .eraseblocks = { {4 * 1024, 4096} },
3978 .block_erase = spi_block_erase_20,
3979 }, {
3980 .eraseblocks = { {32 * 1024, 512} },
3981 .block_erase = spi_block_erase_52,
3982 }, {
3983 .eraseblocks = { {64 * 1024, 256} },
3984 .block_erase = spi_block_erase_d8,
3985 }, {
3986 .eraseblocks = { {16 * 1024 * 1024, 1} },
3987 .block_erase = spi_block_erase_60,
3988 }, {
3989 .eraseblocks = { {16 * 1024 * 1024, 1} },
3990 .block_erase = spi_block_erase_c7,
3991 }
3992 },
3993 .reg_bits =
3994 {
3995 .qe = {STATUS2, 1, RW},
3996 .srp = {STATUS1, 7, RW},
3997 .srl = {STATUS2, 0, RW},
3998 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3999 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
4000 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
4001 .cmp = {STATUS2, 6, RW},
4002 },
4003 .wp_write_cfg = spi_wp_write_cfg,
4004 .wp_read_cfg = spi_wp_read_cfg,
4005 .wp_get_ranges = spi_wp_get_available_ranges,
4006 .decode_range = decode_range_spi25,
4007 .printlock = spi_prettyprint_status_register_bp4_srwd,
4008 .unlock = spi_disable_blockprotect_bp4_srwd,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05004009 .write = spi_chip_write_256,
4010 .read = spi_chip_read,
4011 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02004012 .prepare_access = spi_prepare_io,
4013 .finish_access = spi_finish_io,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05004014 },
4015
4016 {
Joshua Roysf1324e02010-09-16 00:51:51 +00004017 .vendor = "Bright",
4018 .name = "BM29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004019 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +00004020 .manufacture_id = BRIGHT_ID,
4021 .model_id = BRIGHT_BM29F040,
4022 .total_size = 512,
4023 .page_size = 64 * 1024,
4024 .feature_bits = FEATURE_EITHER_RESET,
4025 .tested = TEST_OK_PR,
4026 .probe = probe_jedec,
4027 .probe_timing = TIMING_ZERO,
4028 .block_erasers =
4029 {
4030 {
4031 .eraseblocks = { {64 * 1024, 8} },
4032 .block_erase = erase_sector_jedec,
4033 }, {
4034 .eraseblocks = { {512 * 1024, 1} },
4035 .block_erase = erase_chip_block_jedec,
4036 },
4037 },
4038 .write = write_jedec_1,
4039 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00004040 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004041 .prepare_access = prepare_memory_access,
4042 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00004043 },
4044
4045 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004046 .vendor = "Catalyst",
4047 .name = "CAT28F512",
4048 .bustype = BUS_PARALLEL,
4049 .manufacture_id = CATALYST_ID,
4050 .model_id = CATALYST_CAT28F512,
4051 .total_size = 64,
4052 .page_size = 0, /* unused */
4053 .feature_bits = 0,
Alan Green908adf42019-07-03 15:34:06 +10004054 .tested = {.probe = OK, .read = OK, .erase = BAD, .write = BAD},
Alan Green1f9cc7d2019-07-01 11:10:45 +10004055 .probe = probe_jedec, /* FIXME! */
4056 .probe_timing = TIMING_ZERO,
4057 .block_erasers =
4058 {
4059 {
4060 .eraseblocks = { {64 * 1024, 1} },
4061 .block_erase = NULL, /* TODO */
4062 },
4063 },
4064 .write = NULL, /* TODO */
4065 .read = read_memmapped,
4066 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004067 .prepare_access = prepare_memory_access,
4068 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004069 },
4070
4071 {
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004072 .vendor = "ENE",
4073 .name = "KB9012 (EDI)",
4074 .bustype = BUS_SPI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004075 .total_size = 128,
4076 .page_size = 128,
4077 .feature_bits = FEATURE_ERASED_ZERO,
4078 .tested = TEST_OK_PREW,
Alan Greenc1863ca2019-06-27 15:08:03 +10004079 .spi_cmd_set = SPI_EDI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004080 .probe = edi_probe_kb9012,
4081 .probe_timing = TIMING_ZERO,
4082 .block_erasers =
4083 {
4084 {
4085 .eraseblocks = { {128, 1024} },
4086 .block_erase = edi_chip_block_erase,
4087 },
4088 },
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004089 .write = edi_chip_write,
4090 .read = edi_chip_read,
4091 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10004092 .gran = write_gran_128bytes,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004093 },
4094
4095 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004096 .vendor = "ESI",
4097 .name = "ES25P16",
4098 .bustype = BUS_SPI,
4099 .manufacture_id = EXCEL_ID_NOPREFIX,
4100 .model_id = EXCEL_ES25P16,
4101 .total_size = 2 * 1024,
4102 .page_size = 256,
4103 /* 256-byte parameter page separate from memory array:
4104 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4105 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00004106 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004107 .probe = probe_spi_rdid,
4108 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004109 .block_erasers =
4110 {
4111 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004112 .eraseblocks = { {64 * 1024, 32} },
4113 .block_erase = spi_block_erase_d8,
Sean Nelson54596372010-01-09 05:30:14 +00004114 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004115 .eraseblocks = { {2 * 1024 * 1024, 1} },
4116 .block_erase = spi_block_erase_c7,
Sean Nelson54596372010-01-09 05:30:14 +00004117 }
4118 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10004119 .printlock = spi_prettyprint_status_register_bp2_srwd,
4120 .unlock = spi_disable_blockprotect_bp2_srwd,
4121 .write = spi_chip_write_256,
4122 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4123 .voltage = {2700, 3600},
4124 },
4125
4126 {
4127 .vendor = "ESI",
4128 .name = "ES25P40",
4129 .bustype = BUS_SPI,
4130 .manufacture_id = EXCEL_ID_NOPREFIX,
4131 .model_id = EXCEL_ES25P40,
4132 .total_size = 512,
4133 .page_size = 256,
4134 /* 256-byte parameter page separate from memory array:
4135 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4136 .feature_bits = FEATURE_WRSR_WREN,
4137 .tested = TEST_UNTESTED,
4138 .probe = probe_spi_rdid,
4139 .probe_timing = TIMING_ZERO,
4140 .block_erasers =
4141 {
4142 {
4143 .eraseblocks = { {64 * 1024, 8} },
4144 .block_erase = spi_block_erase_d8,
4145 }, {
4146 .eraseblocks = { {512 * 1024, 1} },
4147 .block_erase = spi_block_erase_c7,
4148 }
4149 },
4150 .printlock = spi_prettyprint_status_register_bp2_srwd,
4151 .unlock = spi_disable_blockprotect_bp2_srwd,
4152 .write = spi_chip_write_256,
4153 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4154 .voltage = {2700, 3600},
4155 },
4156
4157 {
4158 .vendor = "ESI",
4159 .name = "ES25P80",
4160 .bustype = BUS_SPI,
4161 .manufacture_id = EXCEL_ID_NOPREFIX,
4162 .model_id = EXCEL_ES25P80,
4163 .total_size = 1024,
4164 .page_size = 256,
4165 /* 256-byte parameter page separate from memory array:
4166 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4167 .feature_bits = FEATURE_WRSR_WREN,
4168 .tested = TEST_UNTESTED,
4169 .probe = probe_spi_rdid,
4170 .probe_timing = TIMING_ZERO,
4171 .block_erasers =
4172 {
4173 {
4174 .eraseblocks = { {64 * 1024, 16} },
4175 .block_erase = spi_block_erase_d8,
4176 }, {
4177 .eraseblocks = { {1024 * 1024, 1} },
4178 .block_erase = spi_block_erase_c7,
4179 }
4180 },
4181 .printlock = spi_prettyprint_status_register_bp2_srwd,
4182 .unlock = spi_disable_blockprotect_bp2_srwd,
4183 .write = spi_chip_write_256,
4184 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4185 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00004186 },
4187
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00004188 {
Stefan Tauner352e50b2013-02-22 15:58:45 +00004189 .vendor = "ESMT",
Michael Karcher80a59ea2010-06-19 22:06:35 +00004190 .name = "F25L008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004191 .bustype = BUS_SPI,
Stefan Tauner352e50b2013-02-22 15:58:45 +00004192 .manufacture_id = ESMT_ID,
4193 .model_id = ESMT_F25L008A,
Michael Karcher80a59ea2010-06-19 22:06:35 +00004194 .total_size = 1024,
4195 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004196 .feature_bits = FEATURE_WRSR_EITHER,
Stefan Taunereb582572012-09-21 12:52:50 +00004197 .tested = TEST_OK_PREW,
Michael Karcher80a59ea2010-06-19 22:06:35 +00004198 .probe = probe_spi_rdid,
4199 .probe_timing = TIMING_ZERO,
4200 .block_erasers =
4201 {
4202 {
4203 .eraseblocks = { {4 * 1024, 256} },
4204 .block_erase = spi_block_erase_20,
4205 }, {
4206 .eraseblocks = { {64 * 1024, 16} },
4207 .block_erase = spi_block_erase_d8,
4208 }, {
4209 .eraseblocks = { {1024 * 1024, 1} },
4210 .block_erase = spi_block_erase_60,
4211 }, {
4212 .eraseblocks = { {1024 * 1024, 1} },
4213 .block_erase = spi_block_erase_c7,
4214 }
4215 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004216 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004217 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger9a795d82010-07-14 16:19:05 +00004218 .write = spi_chip_write_1,
Michael Karcher4497e862010-07-10 19:34:15 +00004219 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004220 .voltage = {2700, 3600},
Michael Karcher80a59ea2010-06-19 22:06:35 +00004221 },
4222
4223 {
Stefan Tauner85f09f72014-05-27 21:27:14 +00004224 .vendor = "ESMT",
4225 .name = "F25L32PA",
4226 .bustype = BUS_SPI,
4227 .manufacture_id = ESMT_ID,
4228 .model_id = ESMT_F25L32PA,
4229 .total_size = 4096,
4230 .page_size = 256,
4231 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP,
4232 .tested = TEST_UNTESTED,
4233 .probe = probe_spi_rdid,
4234 .probe_timing = TIMING_ZERO,
4235 .block_erasers =
4236 {
4237 {
4238 .eraseblocks = { {4 * 1024, 1024} },
4239 .block_erase = spi_block_erase_20,
4240 }, {
4241 .eraseblocks = { {64 * 1024, 64} },
4242 .block_erase = spi_block_erase_d8,
4243 }, {
4244 .eraseblocks = { {4 * 1024 * 1024, 1} },
4245 .block_erase = spi_block_erase_60,
4246 }, {
4247 .eraseblocks = { {4 * 1024 * 1024, 1} },
4248 .block_erase = spi_block_erase_c7,
4249 }
4250 },
4251 .printlock = spi_prettyprint_status_register_bp2_bpl,
4252 .unlock = spi_disable_blockprotect,
4253 .write = spi_chip_write_256,
4254 .read = spi_chip_read,
4255 .voltage = {2700, 3600},
4256 },
4257
4258 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004259 .vendor = "ESMT",
4260 .name = "F49B002UA",
4261 .bustype = BUS_PARALLEL,
4262 .manufacture_id = ESMT_ID,
4263 .model_id = ESMT_F49B002UA,
4264 .total_size = 256,
4265 .page_size = 4096,
4266 .feature_bits = FEATURE_EITHER_RESET,
4267 .tested = TEST_UNTESTED,
4268 .probe = probe_jedec,
4269 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
4270 .block_erasers =
4271 {
4272 {
4273 .eraseblocks = {
4274 {128 * 1024, 1},
4275 {96 * 1024, 1},
4276 {8 * 1024, 2},
4277 {16 * 1024, 1},
4278 },
4279 .block_erase = erase_sector_jedec,
4280 }, {
4281 .eraseblocks = { {256 * 1024, 1} },
4282 .block_erase = erase_chip_block_jedec,
4283 }
4284 },
4285 .write = write_jedec_1,
4286 .read = read_memmapped,
4287 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004288 .prepare_access = prepare_memory_access,
4289 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004290 },
4291
4292 {
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004293 .vendor = "Eon",
4294 .name = "EN25B05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004295 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004296 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004297 .model_id = EON_EN25B05,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004298 .total_size = 64,
4299 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004300 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004301 .tested = TEST_UNTESTED,
4302 .probe = probe_spi_rdid,
4303 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004304 .block_erasers =
4305 {
4306 {
4307 .eraseblocks = {
4308 {4 * 1024, 2},
4309 {8 * 1024, 1},
4310 {16 * 1024, 1},
4311 {32 * 1024, 1},
4312 },
4313 .block_erase = spi_block_erase_d8,
4314 }, {
4315 .eraseblocks = { {64 * 1024, 1} },
4316 .block_erase = spi_block_erase_c7,
4317 }
4318 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004319 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004320 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004321 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004322 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004323 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004324 },
4325
4326 {
4327 .vendor = "Eon",
4328 .name = "EN25B05T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004329 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004330 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004331 .model_id = EON_EN25B05,
Sean Nelson54596372010-01-09 05:30:14 +00004332 .total_size = 64,
4333 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004334 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004335 .tested = TEST_UNTESTED,
4336 .probe = probe_spi_rdid,
4337 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004338 .block_erasers =
4339 {
4340 {
4341 .eraseblocks = {
4342 {32 * 1024, 1},
4343 {16 * 1024, 1},
4344 {8 * 1024, 1},
4345 {4 * 1024, 2},
4346 },
4347 .block_erase = spi_block_erase_d8,
4348 }, {
4349 .eraseblocks = { {64 * 1024, 1} },
4350 .block_erase = spi_block_erase_c7,
4351 }
4352 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004353 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004354 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004355 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004356 .read = spi_chip_read, /* Fast read (0x0B) supported */
4357 .voltage = {2700, 3600},
4358 },
4359
4360 {
4361 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004362 .name = "EN25B10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004363 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004364 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004365 .model_id = EON_EN25B10,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004366 .total_size = 128,
4367 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004368 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004369 .tested = TEST_UNTESTED,
4370 .probe = probe_spi_rdid,
4371 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004372 .block_erasers =
4373 {
4374 {
4375 .eraseblocks = {
4376 {4 * 1024, 2},
4377 {8 * 1024, 1},
4378 {16 * 1024, 1},
4379 {32 * 1024, 3},
4380 },
4381 .block_erase = spi_block_erase_d8,
4382 }, {
4383 .eraseblocks = { {128 * 1024, 1} },
4384 .block_erase = spi_block_erase_c7,
4385 }
4386 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004387 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004388 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004389 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004390 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004391 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004392 },
4393
4394 {
4395 .vendor = "Eon",
4396 .name = "EN25B10T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004397 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004398 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004399 .model_id = EON_EN25B10,
Sean Nelson54596372010-01-09 05:30:14 +00004400 .total_size = 128,
4401 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004402 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00004403 .tested = TEST_OK_PREW,
Sean Nelson54596372010-01-09 05:30:14 +00004404 .probe = probe_spi_rdid,
4405 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004406 .block_erasers =
4407 {
4408 {
4409 .eraseblocks = {
4410 {32 * 1024, 3},
4411 {16 * 1024, 1},
4412 {8 * 1024, 1},
4413 {4 * 1024, 2},
4414 },
4415 .block_erase = spi_block_erase_d8,
4416 }, {
4417 .eraseblocks = { {128 * 1024, 1} },
4418 .block_erase = spi_block_erase_c7,
4419 }
4420 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004421 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004422 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004423 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004424 .read = spi_chip_read, /* Fast read (0x0B) supported */
4425 .voltage = {2700, 3600},
4426 },
4427
4428 {
4429 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004430 .name = "EN25B16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004431 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004432 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004433 .model_id = EON_EN25B16,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004434 .total_size = 2048,
4435 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004436 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004437 .tested = TEST_UNTESTED,
4438 .probe = probe_spi_rdid,
4439 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004440 .block_erasers =
4441 {
4442 {
4443 .eraseblocks = {
4444 {4 * 1024, 2},
4445 {8 * 1024, 1},
4446 {16 * 1024, 1},
4447 {32 * 1024, 1},
4448 {64 * 1024, 31},
4449 },
4450 .block_erase = spi_block_erase_d8,
4451 }, {
4452 .eraseblocks = { {2 * 1024 * 1024, 1} },
4453 .block_erase = spi_block_erase_c7,
4454 }
4455 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004456 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004457 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004458 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004459 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004460 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004461 },
4462
4463 {
4464 .vendor = "Eon",
4465 .name = "EN25B16T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004466 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004467 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004468 .model_id = EON_EN25B16,
Sean Nelson54596372010-01-09 05:30:14 +00004469 .total_size = 2048,
4470 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004471 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004472 .tested = TEST_UNTESTED,
4473 .probe = probe_spi_rdid,
4474 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004475 .block_erasers =
4476 {
4477 {
4478 .eraseblocks = {
4479 {64 * 1024, 31},
4480 {32 * 1024, 1},
4481 {16 * 1024, 1},
4482 {8 * 1024, 1},
4483 {4 * 1024, 2},
4484 },
4485 .block_erase = spi_block_erase_d8,
4486 }, {
4487 .eraseblocks = { {2 * 1024 * 1024, 1} },
4488 .block_erase = spi_block_erase_c7,
4489 }
4490 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004491 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004492 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004493 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004494 .read = spi_chip_read, /* Fast read (0x0B) supported */
4495 .voltage = {2700, 3600},
4496 },
4497
4498 {
4499 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004500 .name = "EN25B20",
Stefan Taunerb175af52015-01-24 15:06:27 +00004501 .bustype = BUS_SPI,
4502 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004503 .model_id = EON_EN25B20,
4504 .total_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004505 .page_size = 256,
4506 .feature_bits = FEATURE_WRSR_WREN,
4507 .tested = TEST_UNTESTED,
4508 .probe = probe_spi_rdid,
4509 .probe_timing = TIMING_ZERO,
4510 .block_erasers =
4511 {
4512 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004513 .eraseblocks = {
4514 {4 * 1024, 2},
4515 {8 * 1024, 1},
4516 {16 * 1024, 1},
4517 {32 * 1024, 1},
4518 {64 * 1024, 3}
4519 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004520 .block_erase = spi_block_erase_d8,
4521 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004522 .eraseblocks = { {256 * 1024, 1} },
4523 .block_erase = spi_block_erase_c7,
4524 }
4525 },
4526 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4527 .unlock = spi_disable_blockprotect,
4528 .write = spi_chip_write_256,
4529 .read = spi_chip_read, /* Fast read (0x0B) supported */
4530 .voltage = {2700, 3600},
4531 },
4532
4533 {
4534 .vendor = "Eon",
4535 .name = "EN25B20T",
4536 .bustype = BUS_SPI,
4537 .manufacture_id = EON_ID_NOPREFIX,
4538 .model_id = EON_EN25B20,
4539 .total_size = 256,
4540 .page_size = 256,
4541 .feature_bits = FEATURE_WRSR_WREN,
4542 .tested = TEST_UNTESTED,
4543 .probe = probe_spi_rdid,
4544 .probe_timing = TIMING_ZERO,
4545 .block_erasers =
4546 {
4547 {
4548 .eraseblocks = {
4549 {64 * 1024, 3},
4550 {32 * 1024, 1},
4551 {16 * 1024, 1},
4552 {8 * 1024, 1},
4553 {4 * 1024, 2},
4554 },
4555 .block_erase = spi_block_erase_d8,
4556 }, {
4557 .eraseblocks = { {256 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004558 .block_erase = spi_block_erase_c7,
4559 }
4560 },
4561 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4562 .unlock = spi_disable_blockprotect,
4563 .write = spi_chip_write_256,
4564 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004565 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004566 },
4567
4568 {
4569 .vendor = "Eon",
4570 .name = "EN25B32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004571 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004572 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004573 .model_id = EON_EN25B32,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004574 .total_size = 4096,
4575 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004576 /* OTP: 512B total; enter 0x3A */
4577 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004578 .tested = TEST_UNTESTED,
4579 .probe = probe_spi_rdid,
4580 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004581 .block_erasers =
4582 {
4583 {
4584 .eraseblocks = {
4585 {4 * 1024, 2},
4586 {8 * 1024, 1},
4587 {16 * 1024, 1},
4588 {32 * 1024, 1},
4589 {64 * 1024, 63},
4590 },
4591 .block_erase = spi_block_erase_d8,
4592 }, {
4593 .eraseblocks = { {4 * 1024 * 1024, 1} },
4594 .block_erase = spi_block_erase_c7,
4595 }
4596 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004597 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004598 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004599 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004600 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004601 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004602 },
4603
4604 {
4605 .vendor = "Eon",
4606 .name = "EN25B32T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004607 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004608 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004609 .model_id = EON_EN25B32,
Sean Nelson54596372010-01-09 05:30:14 +00004610 .total_size = 4096,
4611 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004612 /* OTP: 512B total; enter 0x3A */
4613 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004614 .tested = TEST_UNTESTED,
4615 .probe = probe_spi_rdid,
4616 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004617 .block_erasers =
4618 {
4619 {
4620 .eraseblocks = {
4621 {64 * 1024, 63},
4622 {32 * 1024, 1},
4623 {16 * 1024, 1},
4624 {8 * 1024, 1},
4625 {4 * 1024, 2},
4626 },
4627 .block_erase = spi_block_erase_d8,
4628 }, {
4629 .eraseblocks = { {4 * 1024 * 1024, 1} },
4630 .block_erase = spi_block_erase_c7,
4631 }
4632 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004633 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004634 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004635 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004636 .read = spi_chip_read, /* Fast read (0x0B) supported */
4637 .voltage = {2700, 3600},
4638 },
4639
4640 {
4641 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004642 .name = "EN25B40",
Stefan Taunerb175af52015-01-24 15:06:27 +00004643 .bustype = BUS_SPI,
4644 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004645 .model_id = EON_EN25B40,
4646 .total_size = 512,
Stefan Taunerb175af52015-01-24 15:06:27 +00004647 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004648 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004649 .tested = TEST_UNTESTED,
4650 .probe = probe_spi_rdid,
4651 .probe_timing = TIMING_ZERO,
4652 .block_erasers =
4653 {
4654 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004655 .eraseblocks = {
4656 {4 * 1024, 2},
4657 {8 * 1024, 1},
4658 {16 * 1024, 1},
4659 {32 * 1024, 1},
4660 {64 * 1024, 7}
4661 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004662 .block_erase = spi_block_erase_d8,
4663 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004664 .eraseblocks = { {512 * 1024, 1} },
4665 .block_erase = spi_block_erase_c7,
4666 }
4667 },
4668 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4669 .unlock = spi_disable_blockprotect,
4670 .write = spi_chip_write_256,
4671 .read = spi_chip_read, /* Fast read (0x0B) supported */
4672 .voltage = {2700, 3600},
4673 },
4674
4675 {
4676 .vendor = "Eon",
4677 .name = "EN25B40T",
4678 .bustype = BUS_SPI,
4679 .manufacture_id = EON_ID_NOPREFIX,
4680 .model_id = EON_EN25B40,
4681 .total_size = 512,
4682 .page_size = 256,
4683 .feature_bits = FEATURE_WRSR_WREN,
4684 .tested = TEST_UNTESTED,
4685 .probe = probe_spi_rdid,
4686 .probe_timing = TIMING_ZERO,
4687 .block_erasers =
4688 {
4689 {
4690 .eraseblocks = {
4691 {64 * 1024, 7},
4692 {32 * 1024, 1},
4693 {16 * 1024, 1},
4694 {8 * 1024, 1},
4695 {4 * 1024, 2},
4696 },
4697 .block_erase = spi_block_erase_d8,
4698 }, {
4699 .eraseblocks = { {512 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004700 .block_erase = spi_block_erase_c7,
4701 }
4702 },
4703 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4704 .unlock = spi_disable_blockprotect,
4705 .write = spi_chip_write_256,
4706 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004707 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004708 },
4709
4710 {
4711 .vendor = "Eon",
4712 .name = "EN25B64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004713 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004714 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004715 .model_id = EON_EN25B64,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004716 .total_size = 8192,
4717 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004718 /* OTP: 512B total; enter 0x3A */
4719 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004720 .tested = TEST_UNTESTED,
4721 .probe = probe_spi_rdid,
4722 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004723 .block_erasers =
4724 {
4725 {
4726 .eraseblocks = {
4727 {4 * 1024, 2},
4728 {8 * 1024, 1},
4729 {16 * 1024, 1},
4730 {32 * 1024, 1},
4731 {64 * 1024, 127},
4732 },
4733 .block_erase = spi_block_erase_d8,
4734 }, {
4735 .eraseblocks = { {8 * 1024 * 1024, 1} },
4736 .block_erase = spi_block_erase_c7,
4737 }
4738 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004739 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004740 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004741 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004742 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004743 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004744 },
4745
4746 {
4747 .vendor = "Eon",
4748 .name = "EN25B64T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004749 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004750 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004751 .model_id = EON_EN25B64,
Sean Nelson54596372010-01-09 05:30:14 +00004752 .total_size = 8192,
4753 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004754 /* OTP: 512B total; enter 0x3A */
4755 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004756 .tested = TEST_UNTESTED,
4757 .probe = probe_spi_rdid,
4758 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004759 .block_erasers =
4760 {
4761 {
4762 .eraseblocks = {
4763 {64 * 1024, 127},
4764 {32 * 1024, 1},
4765 {16 * 1024, 1},
4766 {8 * 1024, 1},
4767 {4 * 1024, 2},
4768 },
4769 .block_erase = spi_block_erase_d8,
4770 }, {
4771 .eraseblocks = { {8 * 1024 * 1024, 1} },
4772 .block_erase = spi_block_erase_c7,
4773 }
4774 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004775 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004776 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004777 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004778 .read = spi_chip_read, /* Fast read (0x0B) supported */
4779 .voltage = {2700, 3600},
4780 },
4781
4782 {
4783 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004784 .name = "EN25B80",
Stefan Taunerb175af52015-01-24 15:06:27 +00004785 .bustype = BUS_SPI,
4786 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004787 .model_id = EON_EN25B80,
4788 .total_size = 1024,
Stefan Taunerb175af52015-01-24 15:06:27 +00004789 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004790 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004791 .tested = TEST_UNTESTED,
4792 .probe = probe_spi_rdid,
4793 .probe_timing = TIMING_ZERO,
4794 .block_erasers =
4795 {
4796 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004797 .eraseblocks = {
4798 {4 * 1024, 2},
4799 {8 * 1024, 1},
4800 {16 * 1024, 1},
4801 {32 * 1024, 1},
4802 {64 * 1024, 15}
4803 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004804 .block_erase = spi_block_erase_d8,
4805 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004806 .eraseblocks = { {1024 * 1024, 1} },
4807 .block_erase = spi_block_erase_c7,
4808 }
4809 },
4810 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4811 .unlock = spi_disable_blockprotect,
4812 .write = spi_chip_write_256,
4813 .read = spi_chip_read, /* Fast read (0x0B) supported */
4814 .voltage = {2700, 3600},
4815 },
4816
4817 {
4818 .vendor = "Eon",
4819 .name = "EN25B80T",
4820 .bustype = BUS_SPI,
4821 .manufacture_id = EON_ID_NOPREFIX,
4822 .model_id = EON_EN25B80,
4823 .total_size = 1024,
4824 .page_size = 256,
4825 .feature_bits = FEATURE_WRSR_WREN,
4826 .tested = TEST_UNTESTED,
4827 .probe = probe_spi_rdid,
4828 .probe_timing = TIMING_ZERO,
4829 .block_erasers =
4830 {
4831 {
4832 .eraseblocks = {
4833 {64 * 1024, 15},
4834 {32 * 1024, 1},
4835 {16 * 1024, 1},
4836 {8 * 1024, 1},
4837 {4 * 1024, 2},
4838 },
4839 .block_erase = spi_block_erase_d8,
4840 }, {
4841 .eraseblocks = { {1024 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004842 .block_erase = spi_block_erase_c7,
4843 }
4844 },
4845 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4846 .unlock = spi_disable_blockprotect,
4847 .write = spi_chip_write_256,
4848 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004849 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004850 },
4851
4852 {
4853 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004854 .name = "EN25F05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004855 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004856 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004857 .model_id = EON_EN25F05,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004858 .total_size = 64,
4859 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004860 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00004861 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004862 .probe = probe_spi_rdid,
4863 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004864 .block_erasers =
4865 {
4866 {
4867 .eraseblocks = { {4 * 1024, 16} },
4868 .block_erase = spi_block_erase_20,
4869 }, {
4870 .eraseblocks = { {32 * 1024, 2} },
4871 .block_erase = spi_block_erase_d8,
4872 }, {
4873 .eraseblocks = { {32 * 1024, 2} },
4874 .block_erase = spi_block_erase_52,
4875 }, {
4876 .eraseblocks = { {64 * 1024, 1} },
4877 .block_erase = spi_block_erase_60,
4878 }, {
4879 .eraseblocks = { {64 * 1024, 1} },
4880 .block_erase = spi_block_erase_c7,
4881 }
4882 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004883 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004884 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004885 .write = spi_chip_write_256,
4886 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004887 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004888 },
4889
4890 {
4891 .vendor = "Eon",
4892 .name = "EN25F10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004893 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004894 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004895 .model_id = EON_EN25F10,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004896 .total_size = 128,
4897 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004898 .feature_bits = FEATURE_WRSR_WREN,
Simon Buhrowd173ed42021-09-29 09:28:07 +02004899 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004900 .probe = probe_spi_rdid,
4901 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004902 .block_erasers =
4903 {
4904 {
4905 .eraseblocks = { {4 * 1024, 32} },
4906 .block_erase = spi_block_erase_20,
4907 }, {
4908 .eraseblocks = { {32 * 1024, 4} },
4909 .block_erase = spi_block_erase_d8,
4910 }, {
4911 .eraseblocks = { {32 * 1024, 4} },
4912 .block_erase = spi_block_erase_52,
4913 }, {
4914 .eraseblocks = { {128 * 1024, 1} },
4915 .block_erase = spi_block_erase_60,
4916 }, {
4917 .eraseblocks = { {128 * 1024, 1} },
4918 .block_erase = spi_block_erase_c7,
4919 }
4920 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004921 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004922 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004923 .write = spi_chip_write_256,
4924 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004925 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004926 },
4927
4928 {
4929 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004930 .name = "EN25F16",
4931 .bustype = BUS_SPI,
4932 .manufacture_id = EON_ID_NOPREFIX,
4933 .model_id = EON_EN25F16,
4934 .total_size = 2048,
4935 .page_size = 256,
4936 .feature_bits = FEATURE_WRSR_WREN,
4937 .tested = TEST_OK_PREW,
4938 .probe = probe_spi_rdid,
4939 .probe_timing = TIMING_ZERO,
4940 .block_erasers =
4941 {
4942 {
4943 .eraseblocks = { {4 * 1024, 512} },
4944 .block_erase = spi_block_erase_20,
4945 }, {
4946 .eraseblocks = { {64 * 1024, 32} },
4947 .block_erase = spi_block_erase_d8,
4948 }, {
4949 .eraseblocks = { {2 * 1024 * 1024, 1} },
4950 .block_erase = spi_block_erase_60,
4951 }, {
4952 .eraseblocks = { {2 * 1024 * 1024, 1} },
4953 .block_erase = spi_block_erase_c7,
4954 }
4955 },
4956 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4957 .unlock = spi_disable_blockprotect,
4958 .write = spi_chip_write_256,
4959 .read = spi_chip_read,
4960 .voltage = {2700, 3600},
4961 },
4962
4963 {
4964 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004965 .name = "EN25F20",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004966 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004967 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004968 .model_id = EON_EN25F20,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004969 .total_size = 256,
4970 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004971 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004972 .tested = TEST_UNTESTED,
4973 .probe = probe_spi_rdid,
4974 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004975 .block_erasers =
4976 {
4977 {
4978 .eraseblocks = { {4 * 1024, 64} },
4979 .block_erase = spi_block_erase_20,
4980 }, {
4981 .eraseblocks = { {64 * 1024, 4} },
4982 .block_erase = spi_block_erase_d8,
4983 }, {
4984 .eraseblocks = { {64 * 1024, 4} },
4985 .block_erase = spi_block_erase_52,
4986 }, {
4987 .eraseblocks = { {256 * 1024, 1} },
4988 .block_erase = spi_block_erase_60,
4989 }, {
4990 .eraseblocks = { {256 * 1024, 1} },
4991 .block_erase = spi_block_erase_c7,
4992 }
4993 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004994 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004995 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004996 .write = spi_chip_write_256,
4997 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004998 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004999 },
5000
5001 {
5002 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005003 .name = "EN25F32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005004 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005005 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00005006 .model_id = EON_EN25F32,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005007 .total_size = 4096,
5008 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00005009 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00005010 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005011 .probe = probe_spi_rdid,
5012 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00005013 .block_erasers =
5014 {
5015 {
5016 .eraseblocks = { {4 * 1024, 1024} },
5017 .block_erase = spi_block_erase_20,
5018 }, {
5019 .eraseblocks = { {64 * 1024, 64} },
5020 .block_erase = spi_block_erase_d8,
5021 }, {
5022 .eraseblocks = { {4 * 1024 * 1024, 1} },
5023 .block_erase = spi_block_erase_60,
5024 }, {
5025 .eraseblocks = { {4 * 1024 * 1024, 1} },
5026 .block_erase = spi_block_erase_c7,
5027 }
5028 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005029 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00005030 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005031 .write = spi_chip_write_256,
5032 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00005033 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005034 },
5035
5036 {
Russ Dill3cd5a122010-03-05 08:44:11 +00005037 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005038 .name = "EN25F40",
5039 .bustype = BUS_SPI,
5040 .manufacture_id = EON_ID_NOPREFIX,
5041 .model_id = EON_EN25F40,
5042 .total_size = 512,
5043 .page_size = 256,
5044 .feature_bits = FEATURE_WRSR_WREN,
5045 .tested = TEST_OK_PREW,
5046 .probe = probe_spi_rdid,
5047 .probe_timing = TIMING_ZERO,
5048 .block_erasers =
5049 {
5050 {
5051 .eraseblocks = { {4 * 1024, 128} },
5052 .block_erase = spi_block_erase_20,
5053 }, {
5054 .eraseblocks = { {64 * 1024, 8} },
5055 .block_erase = spi_block_erase_d8,
5056 }, {
5057 .eraseblocks = { {512 * 1024, 1} },
5058 .block_erase = spi_block_erase_60,
5059 }, {
5060 .eraseblocks = { {512 * 1024, 1} },
5061 .block_erase = spi_block_erase_c7,
5062 },
5063 },
5064 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5065 .unlock = spi_disable_blockprotect,
5066 .write = spi_chip_write_256,
5067 .read = spi_chip_read,
5068 .voltage = {2700, 3600},
5069 },
5070
5071 {
5072 .vendor = "Eon",
Stefan Taunerd932fd02012-09-06 17:37:16 +00005073 .name = "EN25F64",
5074 .bustype = BUS_SPI,
5075 .manufacture_id = EON_ID_NOPREFIX,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00005076 .model_id = EON_EN25F64,
Stefan Taunerd932fd02012-09-06 17:37:16 +00005077 .total_size = 8192,
5078 .page_size = 256,
5079 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunere34e3e82013-01-01 00:06:51 +00005080 .tested = TEST_OK_PREW,
Stefan Taunerd932fd02012-09-06 17:37:16 +00005081 .probe = probe_spi_rdid,
5082 .probe_timing = TIMING_ZERO,
5083 .block_erasers =
5084 {
5085 {
5086 .eraseblocks = { {4 * 1024, 2048} },
5087 .block_erase = spi_block_erase_20,
5088 }, {
5089 .eraseblocks = { {64 * 1024, 128} },
5090 .block_erase = spi_block_erase_d8,
5091 }, {
5092 .eraseblocks = { {8 * 1024 * 1024, 1} },
5093 .block_erase = spi_block_erase_60,
5094 }, {
5095 .eraseblocks = { {8 * 1024 * 1024, 1} },
5096 .block_erase = spi_block_erase_c7,
5097 }
5098 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005099 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Stefan Taunerd932fd02012-09-06 17:37:16 +00005100 .unlock = spi_disable_blockprotect,
5101 .write = spi_chip_write_256,
5102 .read = spi_chip_read,
5103 .voltage = {2700, 3600},
5104 },
5105
5106 {
5107 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005108 .name = "EN25F80",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005109 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005110 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005111 .model_id = EON_EN25F80,
David Hendricks6d715302011-07-24 22:21:57 +00005112 .total_size = 1024,
5113 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005114 .feature_bits = FEATURE_WRSR_WREN,
5115 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005116 .probe = probe_spi_rdid,
5117 .probe_timing = TIMING_ZERO,
5118 .block_erasers =
5119 {
5120 {
5121 .eraseblocks = { {4 * 1024, 256} },
5122 .block_erase = spi_block_erase_20,
5123 }, {
5124 .eraseblocks = { {64 * 1024, 16} },
5125 .block_erase = spi_block_erase_d8,
5126 }, {
5127 .eraseblocks = { {1024 * 1024, 1} },
5128 .block_erase = spi_block_erase_60,
5129 }, {
5130 .eraseblocks = { {1024 * 1024, 1} },
5131 .block_erase = spi_block_erase_c7,
5132 }
5133 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005134 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005135 .unlock = spi_disable_blockprotect,
5136 .write = spi_chip_write_256,
5137 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005138 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005139 },
5140
5141 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005142 .vendor = "Eon",
5143 .name = "EN25P05",
5144 .bustype = BUS_SPI,
5145 .manufacture_id = EON_ID_NOPREFIX,
5146 .model_id = EON_EN25B05,
5147 .total_size = 64,
5148 .page_size = 256,
5149 .feature_bits = FEATURE_WRSR_WREN,
5150 .tested = TEST_UNTESTED,
5151 .probe = probe_spi_rdid,
5152 .probe_timing = TIMING_ZERO,
5153 .block_erasers =
5154 {
5155 {
5156 .eraseblocks = {
5157 {32 * 1024, 2} },
5158 .block_erase = spi_block_erase_d8,
5159 }, {
5160 .eraseblocks = { {64 * 1024, 1} },
5161 .block_erase = spi_block_erase_c7,
5162 }
5163 },
5164 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5165 .unlock = spi_disable_blockprotect,
5166 .write = spi_chip_write_256,
5167 .read = spi_chip_read, /* Fast read (0x0B) supported */
5168 .voltage = {2700, 3600},
5169 },
5170
5171 {
5172 .vendor = "Eon",
5173 .name = "EN25P10",
5174 .bustype = BUS_SPI,
5175 .manufacture_id = EON_ID_NOPREFIX,
5176 .model_id = EON_EN25B10,
5177 .total_size = 128,
5178 .page_size = 256,
5179 .feature_bits = FEATURE_WRSR_WREN,
5180 .tested = TEST_UNTESTED,
5181 .probe = probe_spi_rdid,
5182 .probe_timing = TIMING_ZERO,
5183 .block_erasers =
5184 {
5185 {
5186 .eraseblocks = { {32 * 1024, 4} },
5187 .block_erase = spi_block_erase_d8,
5188 }, {
5189 .eraseblocks = { {128 * 1024, 1} },
5190 .block_erase = spi_block_erase_c7,
5191 }
5192 },
5193 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5194 .unlock = spi_disable_blockprotect,
5195 .write = spi_chip_write_256,
5196 .read = spi_chip_read, /* Fast read (0x0B) supported */
5197 .voltage = {2700, 3600},
5198 },
5199
5200 {
5201 .vendor = "Eon",
5202 .name = "EN25P16",
5203 .bustype = BUS_SPI,
5204 .manufacture_id = EON_ID_NOPREFIX,
5205 .model_id = EON_EN25B16,
5206 .total_size = 2048,
5207 .page_size = 256,
5208 .feature_bits = FEATURE_WRSR_WREN,
5209 .tested = TEST_UNTESTED,
5210 .probe = probe_spi_rdid,
5211 .probe_timing = TIMING_ZERO,
5212 .block_erasers =
5213 {
5214 {
5215 .eraseblocks = { {64 * 1024, 32} },
5216 .block_erase = spi_block_erase_d8,
5217 }, {
5218 .eraseblocks = { {2 * 1024 * 1024, 1} },
5219 .block_erase = spi_block_erase_c7,
5220 }
5221 },
5222 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5223 .unlock = spi_disable_blockprotect,
5224 .write = spi_chip_write_256,
5225 .read = spi_chip_read, /* Fast read (0x0B) supported */
5226 .voltage = {2700, 3600},
5227 },
5228
5229 {
5230 .vendor = "Eon",
5231 .name = "EN25P20",
5232 .bustype = BUS_SPI,
5233 .manufacture_id = EON_ID_NOPREFIX,
5234 .model_id = EON_EN25B20,
5235 .total_size = 256,
5236 .page_size = 256,
5237 .feature_bits = FEATURE_WRSR_WREN,
5238 .tested = TEST_UNTESTED,
5239 .probe = probe_spi_rdid,
5240 .probe_timing = TIMING_ZERO,
5241 .block_erasers =
5242 {
5243 {
5244 .eraseblocks = { {64 * 1024, 4} },
5245 .block_erase = spi_block_erase_d8,
5246 }, {
5247 .eraseblocks = { {256 * 1024, 1} },
5248 .block_erase = spi_block_erase_c7,
5249 }
5250 },
5251 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5252 .unlock = spi_disable_blockprotect,
5253 .write = spi_chip_write_256,
5254 .read = spi_chip_read, /* Fast read (0x0B) supported */
5255 .voltage = {2700, 3600},
5256 },
5257
5258 {
5259 .vendor = "Eon",
5260 .name = "EN25P32", /* Uniform version of EN25B32 */
5261 .bustype = BUS_SPI,
5262 .manufacture_id = EON_ID_NOPREFIX,
5263 .model_id = EON_EN25B32,
5264 .total_size = 4096,
5265 .page_size = 256,
5266 /* OTP: 512B total; enter 0x3A */
5267 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5268 .tested = TEST_UNTESTED,
5269 .probe = probe_spi_rdid,
5270 .probe_timing = TIMING_ZERO,
5271 .block_erasers =
5272 {
5273 {
5274 .eraseblocks = { {64 * 1024, 64} },
5275 .block_erase = spi_block_erase_d8,
5276 }, {
5277 .eraseblocks = { {4 * 1024 * 1024, 1} },
5278 .block_erase = spi_block_erase_c7,
5279 }
5280 },
5281 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5282 .unlock = spi_disable_blockprotect,
5283 .write = spi_chip_write_256,
5284 .read = spi_chip_read, /* Fast read (0x0B) supported */
5285 .voltage = {2700, 3600},
5286 },
5287
5288 {
5289 .vendor = "Eon",
5290 .name = "EN25P40",
5291 .bustype = BUS_SPI,
5292 .manufacture_id = EON_ID_NOPREFIX,
5293 .model_id = EON_EN25B40,
5294 .total_size = 512,
5295 .page_size = 256,
5296 .feature_bits = FEATURE_WRSR_WREN,
5297 .tested = TEST_UNTESTED,
5298 .probe = probe_spi_rdid,
5299 .probe_timing = TIMING_ZERO,
5300 .block_erasers =
5301 {
5302 {
5303 .eraseblocks = { {64 * 1024, 8} },
5304 .block_erase = spi_block_erase_d8,
5305 }, {
5306 .eraseblocks = { {512 * 1024, 1} },
5307 .block_erase = spi_block_erase_c7,
5308 }
5309 },
5310 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5311 .unlock = spi_disable_blockprotect,
5312 .write = spi_chip_write_256,
5313 .read = spi_chip_read, /* Fast read (0x0B) supported */
5314 .voltage = {2700, 3600},
5315 },
5316
5317 {
5318 .vendor = "Eon",
5319 .name = "EN25P64",
5320 .bustype = BUS_SPI,
5321 .manufacture_id = EON_ID_NOPREFIX,
5322 .model_id = EON_EN25B64,
5323 .total_size = 8192,
5324 .page_size = 256,
5325 /* OTP: 512B total; enter 0x3A */
5326 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5327 .tested = TEST_UNTESTED,
5328 .probe = probe_spi_rdid,
5329 .probe_timing = TIMING_ZERO,
5330 .block_erasers =
5331 {
5332 {
5333 .eraseblocks = { {64 * 1024, 128} },
5334 .block_erase = spi_block_erase_d8,
5335 }, {
5336 .eraseblocks = { {8 * 1024 * 1024, 1} },
5337 .block_erase = spi_block_erase_c7,
5338 }
5339 },
5340 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5341 .unlock = spi_disable_blockprotect,
5342 .write = spi_chip_write_256,
5343 .read = spi_chip_read, /* Fast read (0x0B) supported */
5344 .voltage = {2700, 3600},
5345 },
5346
5347 {
5348 .vendor = "Eon",
5349 .name = "EN25P80",
5350 .bustype = BUS_SPI,
5351 .manufacture_id = EON_ID_NOPREFIX,
5352 .model_id = EON_EN25B80,
5353 .total_size = 1024,
5354 .page_size = 256,
5355 .feature_bits = FEATURE_WRSR_WREN,
5356 .tested = TEST_UNTESTED,
5357 .probe = probe_spi_rdid,
5358 .probe_timing = TIMING_ZERO,
5359 .block_erasers =
5360 {
5361 {
5362 .eraseblocks = { {64 * 1024, 16} },
5363 .block_erase = spi_block_erase_d8,
5364 }, {
5365 .eraseblocks = { {1024 * 1024, 1} },
5366 .block_erase = spi_block_erase_c7,
5367 }
5368 },
5369 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5370 .unlock = spi_disable_blockprotect,
5371 .write = spi_chip_write_256,
5372 .read = spi_chip_read, /* Fast read (0x0B) supported */
5373 .voltage = {2700, 3600},
5374 },
5375
5376 {
5377 .vendor = "Eon",
5378 .name = "EN25Q128",
5379 .bustype = BUS_SPI,
5380 .manufacture_id = EON_ID_NOPREFIX,
5381 .model_id = EON_EN25Q128,
5382 .total_size = 16384,
5383 .page_size = 256,
5384 /* OTP: 512B total; enter 0x3A */
5385 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5386 .tested = TEST_OK_PREW,
5387 .probe = probe_spi_rdid,
5388 .probe_timing = TIMING_ZERO,
5389 .block_erasers =
5390 {
5391 {
5392 .eraseblocks = { {4 * 1024, 4096} },
5393 .block_erase = spi_block_erase_20,
5394 }, {
5395 .eraseblocks = { {64 * 1024, 256} },
5396 .block_erase = spi_block_erase_d8,
5397 }, {
5398 .eraseblocks = { {16 * 1024 * 1024, 1} },
5399 .block_erase = spi_block_erase_60,
5400 }, {
5401 .eraseblocks = { {16 * 1024 * 1024, 1} },
5402 .block_erase = spi_block_erase_c7,
5403 }
5404 },
5405 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5406 .unlock = spi_disable_blockprotect,
5407 .write = spi_chip_write_256,
5408 .read = spi_chip_read,
5409 },
5410
5411 {
David Hendricks6d715302011-07-24 22:21:57 +00005412 /* Note: EN25D16 is an evil twin which shares the model ID
5413 but has different write protection capabilities */
5414 .vendor = "Eon",
5415 .name = "EN25Q16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005416 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005417 .manufacture_id = EON_ID_NOPREFIX,
5418 .model_id = EON_EN25Q16,
5419 .total_size = 2048,
5420 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005421 /* OTP: D16 512B/Q16 128B total; enter 0x3A */
5422 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks6d715302011-07-24 22:21:57 +00005423 .tested = TEST_UNTESTED,
5424 .probe = probe_spi_rdid,
5425 .probe_timing = TIMING_ZERO,
5426 .block_erasers =
5427 {
5428 {
5429 .eraseblocks = { {4 * 1024, 512} },
5430 .block_erase = spi_block_erase_20,
5431 }, {
5432 .eraseblocks = { {64 * 1024, 32} },
5433 .block_erase = spi_block_erase_d8,
5434 }, {
5435 /* not supported by Q16 version */
5436 .eraseblocks = { {64 * 1024, 32} },
5437 .block_erase = spi_block_erase_52,
5438 }, {
5439 .eraseblocks = { {2 * 1024 * 1024, 1} },
5440 .block_erase = spi_block_erase_60,
5441 }, {
5442 .eraseblocks = { {2 * 1024 * 1024, 1} },
5443 .block_erase = spi_block_erase_c7,
5444 }
5445 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005446 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005447 .unlock = spi_disable_blockprotect,
5448 .write = spi_chip_write_256,
5449 .read = spi_chip_read,
5450 .voltage = {2700, 3600},
5451 },
5452
5453 {
5454 .vendor = "Eon",
5455 .name = "EN25Q32(A/B)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005456 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005457 .manufacture_id = EON_ID_NOPREFIX,
5458 .model_id = EON_EN25Q32,
5459 .total_size = 4096,
5460 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005461 /* OTP: 512B total; enter 0x3A */
5462 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005463 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005464 .probe = probe_spi_rdid,
5465 .probe_timing = TIMING_ZERO,
5466 .block_erasers =
5467 {
5468 {
5469 .eraseblocks = { {4 * 1024, 1024} },
5470 .block_erase = spi_block_erase_20,
5471 }, {
5472 .eraseblocks = { {64 * 1024, 64} },
5473 .block_erase = spi_block_erase_d8,
5474 }, {
5475 .eraseblocks = { {4 * 1024 * 1024, 1} },
5476 .block_erase = spi_block_erase_60,
5477 }, {
5478 .eraseblocks = { {4 * 1024 * 1024, 1} },
5479 .block_erase = spi_block_erase_c7,
5480 }
5481 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005482 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005483 .unlock = spi_disable_blockprotect,
5484 .write = spi_chip_write_256,
5485 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005486 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005487 },
5488
5489 {
5490 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005491 .name = "EN25Q40",
5492 .bustype = BUS_SPI,
5493 .manufacture_id = EON_ID_NOPREFIX,
5494 .model_id = EON_EN25Q40,
5495 .total_size = 512,
5496 .page_size = 256,
5497 /* OTP: 256B total; enter 0x3A */
5498 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5499 .tested = TEST_UNTESTED,
5500 .probe = probe_spi_rdid,
5501 .probe_timing = TIMING_ZERO,
5502 .block_erasers =
5503 {
5504 {
5505 .eraseblocks = { {4 * 1024, 128} },
5506 .block_erase = spi_block_erase_20,
5507 }, {
5508 .eraseblocks = { {64 * 1024, 8} },
5509 .block_erase = spi_block_erase_d8,
5510 }, {
5511 .eraseblocks = { {512 * 1024, 1} },
5512 .block_erase = spi_block_erase_60,
5513 }, {
5514 .eraseblocks = { {512 * 1024, 1} },
5515 .block_erase = spi_block_erase_c7,
5516 }
5517 },
5518 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5519 .unlock = spi_disable_blockprotect,
5520 .write = spi_chip_write_256,
5521 .read = spi_chip_read,
5522 .voltage = {2700, 3600},
5523 },
5524
5525 {
5526 .vendor = "Eon",
David Hendricks6d715302011-07-24 22:21:57 +00005527 .name = "EN25Q64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005528 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005529 .manufacture_id = EON_ID_NOPREFIX,
5530 .model_id = EON_EN25Q64,
5531 .total_size = 8192,
5532 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005533 /* OTP: 512B total; enter 0x3A */
5534 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005535 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005536 .probe = probe_spi_rdid,
5537 .probe_timing = TIMING_ZERO,
5538 .block_erasers =
5539 {
5540 {
5541 .eraseblocks = { {4 * 1024, 2048} },
5542 .block_erase = spi_block_erase_20,
5543 }, {
5544 .eraseblocks = { {64 * 1024, 128} },
5545 .block_erase = spi_block_erase_d8,
5546 }, {
5547 .eraseblocks = { {8 * 1024 * 1024, 1} },
5548 .block_erase = spi_block_erase_60,
5549 }, {
5550 .eraseblocks = { {8 * 1024 * 1024, 1} },
5551 .block_erase = spi_block_erase_c7,
5552 }
5553 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005554 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005555 .unlock = spi_disable_blockprotect,
5556 .write = spi_chip_write_256,
5557 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005558 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005559 },
5560
5561 {
5562 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005563 .name = "EN25Q80(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005564 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005565 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005566 .model_id = EON_EN25Q80,
5567 .total_size = 1024,
5568 .page_size = 256,
5569 /* OTP: 256B total; enter 0x3A */
5570 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5571 .tested = TEST_UNTESTED,
5572 .probe = probe_spi_rdid,
5573 .probe_timing = TIMING_ZERO,
5574 .block_erasers =
5575 {
5576 {
5577 .eraseblocks = { {4 * 1024, 256} },
5578 .block_erase = spi_block_erase_20,
5579 }, {
5580 .eraseblocks = { {64 * 1024, 16} },
5581 .block_erase = spi_block_erase_d8,
5582 }, {
5583 .eraseblocks = { {1024 * 1024, 1} },
5584 .block_erase = spi_block_erase_60,
5585 }, {
5586 .eraseblocks = { {1024 * 1024, 1} },
5587 .block_erase = spi_block_erase_c7,
5588 }
5589 },
5590 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5591 .unlock = spi_disable_blockprotect,
5592 .write = spi_chip_write_256,
5593 .read = spi_chip_read,
5594 .voltage = {2700, 3600},
5595 },
5596
5597 {
5598 .vendor = "Eon",
5599 .name = "EN25QH128",
5600 .bustype = BUS_SPI,
5601 .manufacture_id = EON_ID_NOPREFIX,
5602 .model_id = EON_EN25QH128,
David Hendricks6d715302011-07-24 22:21:57 +00005603 .total_size = 16384,
5604 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005605 /* supports SFDP */
Daniel Lenski65922a32012-02-15 23:40:23 +00005606 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005607 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5608 .dummy_cycles =
5609 {
5610 .qpi_fast_read = 6,
5611 .qpi_fast_read_qio = 6,
5612 },
Tim Chenbfe149a2020-07-06 14:59:21 +08005613 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005614 .probe = probe_spi_rdid,
5615 .probe_timing = TIMING_ZERO,
5616 .block_erasers =
5617 {
5618 {
5619 .eraseblocks = { {4 * 1024, 4096} },
5620 .block_erase = spi_block_erase_20,
5621 }, {
5622 .eraseblocks = { {64 * 1024, 256} },
5623 .block_erase = spi_block_erase_d8,
5624 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005625 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005626 .block_erase = spi_block_erase_60,
5627 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005628 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005629 .block_erase = spi_block_erase_c7,
5630 }
5631 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10005632 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5633 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005634 .write = spi_chip_write_256,
5635 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005636 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005637 .reg_bits =
5638 {
5639 .srp = {STATUS1, 7, RW},
5640 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5641 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5642 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005643 .wp_write_cfg = spi_wp_write_cfg,
5644 .wp_read_cfg = spi_wp_read_cfg,
5645 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005646 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005647 .prepare_access = spi_prepare_io,
5648 .finish_access = spi_finish_io,
David Hendricks6d715302011-07-24 22:21:57 +00005649 },
5650
5651 {
5652 .vendor = "Eon",
5653 .name = "EN25QH16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005654 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005655 .manufacture_id = EON_ID_NOPREFIX,
5656 .model_id = EON_EN25QH16,
5657 .total_size = 2048,
5658 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005659 /* supports SFDP */
5660 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005661 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5662 .dummy_cycles =
5663 {
5664 .qpi_fast_read = 6,
5665 .qpi_fast_read_qio = 6,
5666 },
Stefan Tauner5c316f92015-02-08 21:57:52 +00005667 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005668 .probe = probe_spi_rdid,
5669 .probe_timing = TIMING_ZERO,
5670 .block_erasers =
5671 {
5672 {
5673 .eraseblocks = { {4 * 1024, 512} },
5674 .block_erase = spi_block_erase_20,
5675 }, {
5676 .eraseblocks = { {64 * 1024, 32} },
5677 .block_erase = spi_block_erase_d8,
5678 }, {
5679 .eraseblocks = { {1024 * 2048, 1} },
5680 .block_erase = spi_block_erase_60,
5681 }, {
5682 .eraseblocks = { {1024 * 2048, 1} },
5683 .block_erase = spi_block_erase_c7,
5684 }
5685 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005686 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005687 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005688 .write = spi_chip_write_256,
5689 .read = spi_chip_read,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005690 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005691 .prepare_access = spi_prepare_io,
5692 .finish_access = spi_finish_io,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005693 },
5694
5695 {
5696 .vendor = "Eon",
5697 .name = "EN25QH32",
5698 .bustype = BUS_SPI,
5699 .manufacture_id = EON_ID_NOPREFIX,
5700 .model_id = EON_EN25QH32,
5701 .total_size = 4096,
5702 .page_size = 256,
5703 /* supports SFDP */
5704 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005705 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5706 .dummy_cycles =
5707 {
5708 .qpi_fast_read = 6,
5709 .qpi_fast_read_qio = 6,
5710 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005711 .tested = TEST_OK_PREW,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005712 .probe = probe_spi_rdid,
5713 .probe_timing = TIMING_ZERO,
5714 .block_erasers =
5715 {
5716 {
5717 .eraseblocks = { {4 * 1024, 1024} },
5718 .block_erase = spi_block_erase_20,
5719 }, {
5720 .eraseblocks = { {64 * 1024, 64} },
5721 .block_erase = spi_block_erase_d8,
5722 }, {
5723 .eraseblocks = { {1024 * 4096, 1} },
5724 .block_erase = spi_block_erase_60,
5725 }, {
5726 .eraseblocks = { {1024 * 4096, 1} },
5727 .block_erase = spi_block_erase_c7,
5728 }
5729 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005730 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005731 .unlock = spi_disable_blockprotect_bp3_srwd,
5732 .write = spi_chip_write_256,
5733 .read = spi_chip_read,
5734 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005735 .reg_bits =
5736 {
5737 .srp = {STATUS1, 7, RW},
5738 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5739 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5740 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005741 .wp_write_cfg = spi_wp_write_cfg,
5742 .wp_read_cfg = spi_wp_read_cfg,
5743 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005744 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005745 .prepare_access = spi_prepare_io,
5746 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005747 },
5748
5749 {
5750 .vendor = "Eon",
5751 .name = "EN25QH32B",
5752 .bustype = BUS_SPI,
5753 .manufacture_id = EON_ID_NOPREFIX,
5754 .model_id = EON_EN25QH32,
5755 .total_size = 4096,
5756 .page_size = 256,
5757 /* supports SFDP */
5758 /* OTP: 1536B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005759 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_38,
5760 .dummy_cycles =
5761 {
5762 .qpi_fast_read = 6,
5763 .qpi_fast_read_qio = 6,
5764 },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005765 .tested = TEST_OK_PREW,
5766 .probe = probe_spi_rdid,
5767 .probe_timing = TIMING_ZERO,
5768 .block_erasers =
5769 {
5770 {
5771 .eraseblocks = { {4 * 1024, 1024} },
5772 .block_erase = spi_block_erase_20,
5773 }, {
5774 .eraseblocks = { {32 * 1024, 128} },
5775 .block_erase = spi_block_erase_52,
5776 }, {
5777 .eraseblocks = { {64 * 1024, 64} },
5778 .block_erase = spi_block_erase_d8,
5779 }, {
5780 .eraseblocks = { {1024 * 4096, 1} },
5781 .block_erase = spi_block_erase_60,
5782 }, {
5783 .eraseblocks = { {1024 * 4096, 1} },
5784 .block_erase = spi_block_erase_c7,
5785 }
5786 },
5787 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5788 .unlock = spi_disable_blockprotect_bp3_srwd,
5789 .write = spi_chip_write_256,
5790 .read = spi_chip_read,
5791 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005792 .prepare_access = spi_prepare_io,
5793 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005794 },
5795
5796 {
5797 .vendor = "Eon",
5798 .name = "EN25QH64",
5799 .bustype = BUS_SPI,
5800 .manufacture_id = EON_ID_NOPREFIX,
5801 .model_id = EON_EN25QH64,
5802 .total_size = 8192,
5803 .page_size = 256,
5804 /* supports SFDP */
5805 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005806 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5807 .dummy_cycles =
5808 {
5809 .qpi_fast_read = 6,
5810 .qpi_fast_read_qio = 6,
5811 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005812 .tested = TEST_OK_PREW,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005813 .probe = probe_spi_rdid,
5814 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005815 .block_erasers =
5816 {
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005817 {
5818 .eraseblocks = { {4 * 1024, 2048} },
5819 .block_erase = spi_block_erase_20,
5820 }, {
5821 .eraseblocks = { {64 * 1024, 128} },
5822 .block_erase = spi_block_erase_d8,
5823 }, {
5824 .eraseblocks = { { 8192 * 1024, 1} },
5825 .block_erase = spi_block_erase_60,
5826 }, {
5827 .eraseblocks = { { 8192 * 1024, 1} },
5828 .block_erase = spi_block_erase_c7,
5829 }
5830 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005831 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005832 .unlock = spi_disable_blockprotect_bp3_srwd,
5833 .write = spi_chip_write_256,
5834 .read = spi_chip_read,
5835 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005836 .reg_bits =
5837 {
5838 .srp = {STATUS1, 7, RW},
5839 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5840 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5841 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005842 .wp_write_cfg = spi_wp_write_cfg,
5843 .wp_read_cfg = spi_wp_read_cfg,
5844 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005845 .decode_range = decode_range_spi25_64k_block,
Nico Huber930d4212024-05-04 18:59:15 +02005846 .prepare_access = spi_prepare_io,
5847 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005848 },
5849
5850 {
5851 .vendor = "Eon",
5852 .name = "EN25QH64A",
5853 .bustype = BUS_SPI,
5854 .manufacture_id = EON_ID_NOPREFIX,
5855 .model_id = EON_EN25QH64,
5856 .total_size = 8192,
5857 .page_size = 256,
5858 /* supports SFDP */
5859 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005860 /* Has a special, volatile status register 3 that is written with
5861 0xc0 like Set Read Parameters. Hence treating as QPI_SRP. */
5862 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP,
5863 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005864 .tested = TEST_OK_PREW,
5865 .probe = probe_spi_rdid,
5866 .probe_timing = TIMING_ZERO,
5867 .block_erasers =
5868 {
5869 {
5870 .eraseblocks = { {4 * 1024, 2048} },
5871 .block_erase = spi_block_erase_20,
5872 }, {
5873 .eraseblocks = { {32 * 1024, 256} },
5874 .block_erase = spi_block_erase_52,
5875 }, {
5876 .eraseblocks = { {64 * 1024, 128} },
5877 .block_erase = spi_block_erase_d8,
5878 }, {
5879 .eraseblocks = { { 8192 * 1024, 1} },
5880 .block_erase = spi_block_erase_60,
5881 }, {
5882 .eraseblocks = { { 8192 * 1024, 1} },
5883 .block_erase = spi_block_erase_c7,
5884 }
5885 },
5886 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5887 .unlock = spi_disable_blockprotect_bp3_srwd,
5888 .write = spi_chip_write_256,
5889 .read = spi_chip_read,
5890 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005891 .prepare_access = spi_prepare_io,
5892 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005893 },
5894
5895 {
5896 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005897 .name = "EN25S10",
5898 .bustype = BUS_SPI,
5899 .manufacture_id = EON_ID_NOPREFIX,
5900 .model_id = EON_EN25S10,
5901 .total_size = 128,
5902 .page_size = 256,
5903 /* OTP: 256B total; enter 0x3A */
5904 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5905 .tested = TEST_UNTESTED,
5906 .probe = probe_spi_rdid,
5907 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005908 .block_erasers =
5909 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005910 {
5911 .eraseblocks = { {4 * 1024, 32} },
5912 .block_erase = spi_block_erase_20,
5913 }, {
5914 .eraseblocks = { {32 * 1024, 4} },
5915 .block_erase = spi_block_erase_52,
5916 }, {
5917 .eraseblocks = { {128 * 1024, 1} },
5918 .block_erase = spi_block_erase_60,
5919 }, {
5920 .eraseblocks = { {128 * 1024, 1} },
5921 .block_erase = spi_block_erase_c7,
5922 }
5923 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005924 .printlock = spi_prettyprint_status_register_bp2_srwd,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005925 .unlock = spi_disable_blockprotect,
5926 .write = spi_chip_write_256,
5927 .read = spi_chip_read,
5928 .voltage = {1650, 1950},
5929 },
5930
5931 {
5932 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005933 .name = "EN25S16",
5934 .bustype = BUS_SPI,
5935 .manufacture_id = EON_ID_NOPREFIX,
5936 .model_id = EON_EN25S16,
5937 .total_size = 2048,
5938 .page_size = 256,
5939 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005940 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5941 .dummy_cycles =
5942 {
5943 .qpi_fast_read = 6,
5944 .qpi_fast_read_qio = 6,
5945 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005946 .tested = TEST_UNTESTED,
5947 .probe = probe_spi_rdid,
5948 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005949 .block_erasers =
5950 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005951 {
5952 .eraseblocks = { {4 * 1024, 512} },
5953 .block_erase = spi_block_erase_20,
5954 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005955 .eraseblocks = { {32 * 1024, 64} },
5956 .block_erase = spi_block_erase_d8,
5957 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05305958 .eraseblocks = { {64 * 1024, 32} },
5959 .block_erase = spi_block_erase_52,
5960 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005961 .eraseblocks = { {2048 * 1024, 1} },
5962 .block_erase = spi_block_erase_60,
5963 }, {
5964 .eraseblocks = { {2048 * 1024, 1} },
5965 .block_erase = spi_block_erase_c7,
5966 }
5967 },
5968 .printlock = spi_prettyprint_status_register_en25s_wp,
5969 .unlock = spi_disable_blockprotect_bp3_srwd,
5970 .write = spi_chip_write_256,
5971 .read = spi_chip_read,
5972 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02005973 .prepare_access = spi_prepare_io,
5974 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005975 },
5976
5977 {
5978 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005979 .name = "EN25S20",
5980 .bustype = BUS_SPI,
5981 .manufacture_id = EON_ID_NOPREFIX,
5982 .model_id = EON_EN25S20,
5983 .total_size = 256,
5984 .page_size = 256,
5985 /* OTP: 256B total; enter 0x3A */
5986 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5987 .tested = TEST_UNTESTED,
5988 .probe = probe_spi_rdid,
5989 .probe_timing = TIMING_ZERO,
5990 .block_erasers =
5991 {
5992 {
5993 .eraseblocks = { {4 * 1024, 64} },
5994 .block_erase = spi_block_erase_20,
5995 }, {
5996 .eraseblocks = { {64 * 1024, 4} },
5997 .block_erase = spi_block_erase_d8,
5998 }, {
5999 .eraseblocks = { {256 * 1024, 1} },
6000 .block_erase = spi_block_erase_60,
6001 }, {
6002 .eraseblocks = { {256 * 1024, 1} },
6003 .block_erase = spi_block_erase_c7,
6004 }
6005 },
6006 .printlock = spi_prettyprint_status_register_bp2_srwd,
6007 .unlock = spi_disable_blockprotect,
6008 .write = spi_chip_write_256,
6009 .read = spi_chip_read,
6010 .voltage = {1650, 1950},
6011 },
6012
6013 {
6014 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006015 .name = "EN25S32",
6016 .bustype = BUS_SPI,
6017 .manufacture_id = EON_ID_NOPREFIX,
6018 .model_id = EON_EN25S32,
6019 .total_size = 4096,
6020 .page_size = 256,
6021 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01006022 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
6023 .dummy_cycles =
6024 {
6025 .qpi_fast_read = 6,
6026 .qpi_fast_read_qio = 6,
6027 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006028 .tested = TEST_UNTESTED,
6029 .probe = probe_spi_rdid,
6030 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006031 .block_erasers =
6032 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006033 {
6034 .eraseblocks = { {4 * 1024, 1024} },
6035 .block_erase = spi_block_erase_20,
6036 }, {
6037 .eraseblocks = { {32 * 1024, 128} },
6038 .block_erase = spi_block_erase_52,
6039 }, {
6040 .eraseblocks = { {64 * 1024, 64} },
6041 .block_erase = spi_block_erase_d8,
6042 }, {
6043 .eraseblocks = { {4096 * 1024, 1} },
6044 .block_erase = spi_block_erase_60,
6045 }, {
6046 .eraseblocks = { {4096 * 1024, 1} },
6047 .block_erase = spi_block_erase_c7,
6048 }
6049 },
6050 .printlock = spi_prettyprint_status_register_en25s_wp,
6051 .unlock = spi_disable_blockprotect_bp3_srwd,
6052 .write = spi_chip_write_256,
6053 .read = spi_chip_read,
6054 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006055 .prepare_access = spi_prepare_io,
6056 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006057 },
6058
6059 {
6060 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006061 .name = "EN25S40",
6062 .bustype = BUS_SPI,
6063 .manufacture_id = EON_ID_NOPREFIX,
6064 .model_id = EON_EN25S40,
6065 .total_size = 512,
6066 .page_size = 256,
6067 /* OTP: 256B total; enter 0x3A */
6068 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6069 .tested = TEST_OK_PREW,
6070 .probe = probe_spi_rdid,
6071 .probe_timing = TIMING_ZERO,
6072 .block_erasers =
6073 {
6074 {
6075 .eraseblocks = { {4 * 1024, 128} },
6076 .block_erase = spi_block_erase_20,
6077 }, {
6078 .eraseblocks = { {64 * 1024, 8} },
6079 .block_erase = spi_block_erase_d8,
6080 }, {
6081 .eraseblocks = { {512 * 1024, 1} },
6082 .block_erase = spi_block_erase_60,
6083 }, {
6084 .eraseblocks = { {512 * 1024, 1} },
6085 .block_erase = spi_block_erase_c7,
6086 }
6087 },
6088 .printlock = spi_prettyprint_status_register_bp2_srwd,
6089 .unlock = spi_disable_blockprotect,
6090 .write = spi_chip_write_256,
6091 .read = spi_chip_read,
6092 .voltage = {1650, 1950},
6093 },
6094
6095 {
6096 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006097 .name = "EN25S64",
6098 .bustype = BUS_SPI,
6099 .manufacture_id = EON_ID_NOPREFIX,
6100 .model_id = EON_EN25S64,
6101 .total_size = 8192,
6102 .page_size = 256,
6103 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01006104 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
6105 .dummy_cycles =
6106 {
6107 .qpi_fast_read = 6,
6108 .qpi_fast_read_qio = 6,
6109 },
Nikolai Artemievdf889fa2021-03-23 17:10:45 +11006110 .tested = TEST_OK_PREW,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006111 .probe = probe_spi_rdid,
6112 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006113 .block_erasers =
6114 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006115 {
6116 .eraseblocks = { {4 * 1024, 2048} },
6117 .block_erase = spi_block_erase_20,
6118 }, {
6119 .eraseblocks = { {64 * 1024, 128} },
6120 .block_erase = spi_block_erase_d8,
6121 }, {
6122 .eraseblocks = { {8192 * 1024, 1} },
6123 .block_erase = spi_block_erase_60,
6124 }, {
6125 .eraseblocks = { {8192 * 1024, 1} },
6126 .block_erase = spi_block_erase_c7,
6127 }
6128 },
6129 .printlock = spi_prettyprint_status_register_en25s_wp,
6130 .unlock = spi_disable_blockprotect_bp3_srwd,
6131 .write = spi_chip_write_256,
6132 .read = spi_chip_read,
6133 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006134 .prepare_access = spi_prepare_io,
6135 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006136 },
6137
6138 {
6139 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006140 .name = "EN25S80",
6141 .bustype = BUS_SPI,
6142 .manufacture_id = EON_ID_NOPREFIX,
6143 .model_id = EON_EN25S80,
6144 .total_size = 1024,
6145 .page_size = 256,
6146 /* OTP: 256B total; enter 0x3A */
6147 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6148 .tested = TEST_UNTESTED,
6149 .probe = probe_spi_rdid,
6150 .probe_timing = TIMING_ZERO,
Russ Dill3cd5a122010-03-05 08:44:11 +00006151 .block_erasers =
6152 {
6153 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006154 .eraseblocks = { {4 * 1024, 256} },
6155 .block_erase = spi_block_erase_20,
6156 }, {
6157 .eraseblocks = { {64 * 1024, 16} },
6158 .block_erase = spi_block_erase_d8,
6159 }, {
6160 .eraseblocks = { {1024 * 1024, 1} },
6161 .block_erase = spi_block_erase_60,
6162 }, {
6163 .eraseblocks = { {1024 * 1024, 1} },
6164 .block_erase = spi_block_erase_c7,
6165 }
Russ Dill3cd5a122010-03-05 08:44:11 +00006166 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006167 .printlock = spi_prettyprint_status_register_bp2_srwd,
6168 .unlock = spi_disable_blockprotect,
6169 .write = spi_chip_write_256,
6170 .read = spi_chip_read,
6171 .voltage = {1650, 1950},
Russ Dill3cd5a122010-03-05 08:44:11 +00006172 },
6173
6174 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00006175 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006176 .name = "EN29F002(A)(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006177 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006178 .manufacture_id = EON_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006179 .model_id = EON_EN29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006180 .total_size = 256,
6181 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00006182 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Alan Green4362e622019-08-26 15:02:12 +10006183 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006184 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006185 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006186 .block_erasers =
6187 {
6188 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006189 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006190 {16 * 1024, 1},
Michael Karchere3cb0a12010-03-13 23:47:09 +00006191 {8 * 1024, 2},
6192 {32 * 1024, 1},
6193 {64 * 1024, 3},
Sean Nelson6b11ad22009-12-23 17:05:59 +00006194 },
6195 .block_erase = erase_sector_jedec,
6196 }, {
6197 .eraseblocks = { {256 * 1024, 1} },
6198 .block_erase = erase_chip_block_jedec,
6199 },
6200 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00006201 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006202 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006203 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006204 .prepare_access = prepare_memory_access,
6205 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006206 },
6207
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006208 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00006209 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006210 .name = "EN29F002(A)(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006211 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006212 .manufacture_id = EON_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006213 .model_id = EON_EN29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006214 .total_size = 256,
6215 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00006216 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +00006217 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006218 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006219 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006220 .block_erasers =
6221 {
6222 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006223 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006224 {64 * 1024, 3},
Michael Karchere3cb0a12010-03-13 23:47:09 +00006225 {32 * 1024, 1},
6226 {8 * 1024, 2},
6227 {16 * 1024, 1},
Sean Nelson6b11ad22009-12-23 17:05:59 +00006228 },
6229 .block_erase = erase_sector_jedec,
6230 }, {
6231 .eraseblocks = { {256 * 1024, 1} },
6232 .block_erase = erase_chip_block_jedec,
6233 },
6234 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00006235 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006236 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006237 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006238 .prepare_access = prepare_memory_access,
6239 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006240 },
6241
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006242 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006243 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006244 .name = "EN29F010",
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006245 .bustype = BUS_PARALLEL,
6246 .manufacture_id = EON_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006247 .model_id = EON_EN29F010,
6248 .total_size = 128,
6249 .page_size = 128,
6250 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
6251 .tested = TEST_OK_PRE,
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006252 .probe = probe_jedec,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006253 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006254 .block_erasers =
6255 {
6256 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006257 .eraseblocks = { {16 * 1024, 8} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006258 .block_erase = erase_sector_jedec,
6259 },
6260 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006261 .eraseblocks = { {128 * 1024, 1} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006262 .block_erase = erase_chip_block_jedec,
6263 },
6264 },
6265 .write = write_jedec_1,
6266 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006267 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006268 .prepare_access = prepare_memory_access,
6269 .finish_access = finish_memory_access,
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006270 },
6271
6272 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006273 .vendor = "Eon",
6274 .name = "EN29GL064(A)B",
6275 .bustype = BUS_PARALLEL,
6276 .manufacture_id = EON_ID,
6277 .model_id = EON_EN29GL064B,
6278 .total_size = 8192,
6279 .page_size = 128 * 1024, /* actual page size is 16 */
6280 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6281 .tested = TEST_UNTESTED,
6282 .probe = probe_jedec_29gl,
6283 .probe_timing = TIMING_ZERO,
6284 .block_erasers =
6285 {
6286 {
6287 .eraseblocks = {
6288 {8 * 1024, 8},
6289 {64 * 1024, 127},
6290 },
6291 .block_erase = erase_sector_jedec,
6292 }, {
6293 .eraseblocks = { {8 * 1024 * 1024, 1} },
6294 .block_erase = erase_chip_block_jedec,
6295 },
6296 },
6297 .write = write_jedec_1,
6298 .read = read_memmapped,
6299 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006300 .prepare_access = prepare_memory_access,
6301 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006302 },
6303
6304 {
6305 .vendor = "Eon",
6306 .name = "EN29GL064(A)T",
6307 .bustype = BUS_PARALLEL,
6308 .manufacture_id = EON_ID,
6309 .model_id = EON_EN29GL064T,
6310 .total_size = 8192,
6311 .page_size = 128 * 1024, /* actual page size is 16 */
6312 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6313 .tested = TEST_UNTESTED,
6314 .probe = probe_jedec_29gl,
6315 .probe_timing = TIMING_ZERO,
6316 .block_erasers =
6317 {
6318 {
6319 .eraseblocks = {
6320 {64 * 1024, 127},
6321 {8 * 1024, 8},
6322 },
6323 .block_erase = erase_sector_jedec,
6324 }, {
6325 .eraseblocks = { {8 * 1024 * 1024, 1} },
6326 .block_erase = erase_chip_block_jedec,
6327 },
6328 },
6329 .write = write_jedec_1,
6330 .read = read_memmapped,
6331 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006332 .prepare_access = prepare_memory_access,
6333 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006334 },
6335
6336 {
6337 .vendor = "Eon",
6338 .name = "EN29GL064H/L",
6339 .bustype = BUS_PARALLEL,
6340 .manufacture_id = EON_ID,
6341 .model_id = EON_EN29GL064HL,
6342 .total_size = 8192,
6343 .page_size = 128 * 1024, /* actual page size is 16 */
6344 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6345 .tested = TEST_UNTESTED,
6346 .probe = probe_jedec_29gl,
6347 .probe_timing = TIMING_ZERO,
6348 .block_erasers =
6349 {
6350 {
6351 .eraseblocks = { {64 * 1024, 128} },
6352 .block_erase = erase_sector_jedec,
6353 }, {
6354 .eraseblocks = { {8 * 1024 * 1024, 1} },
6355 .block_erase = erase_chip_block_jedec,
6356 },
6357 },
6358 .write = write_jedec_1,
6359 .read = read_memmapped,
6360 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006361 .prepare_access = prepare_memory_access,
6362 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006363 },
6364
6365 {
6366 .vendor = "Eon",
6367 .name = "EN29GL128",
6368 .bustype = BUS_PARALLEL,
6369 .manufacture_id = EON_ID,
6370 .model_id = EON_EN29GL128HL,
6371 .total_size = 16384,
6372 .page_size = 128 * 1024, /* actual page size is 16 */
6373 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6374 .tested = TEST_UNTESTED,
6375 .probe = probe_jedec_29gl,
6376 .probe_timing = TIMING_ZERO,
6377 .block_erasers =
6378 {
6379 {
6380 .eraseblocks = { {128 * 1024, 128} },
6381 .block_erase = erase_sector_jedec,
6382 }, {
6383 .eraseblocks = { {16 * 1024 * 1024, 1} },
6384 .block_erase = erase_chip_block_jedec,
6385 },
6386 },
6387 .write = write_jedec_1,
6388 .read = read_memmapped,
6389 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006390 .prepare_access = prepare_memory_access,
6391 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006392 },
6393
6394 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006395 .vendor = "Eon",
6396 .name = "EN29LV040(A)",
6397 .bustype = BUS_PARALLEL,
6398 .manufacture_id = EON_ID,
6399 .model_id = EON_EN29LV040,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006400 .total_size = 512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006401 .page_size = 4 * 1024,
6402 .tested = TEST_OK_PREW,
6403 .probe = probe_jedec,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006404 .probe_timing = TIMING_ZERO,
6405 .block_erasers =
6406 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006407 {
6408 .eraseblocks = { {64 * 1024, 8} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006409 .block_erase = erase_sector_jedec,
6410 },
6411 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006412 .eraseblocks = { {512 * 1024, 1} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006413 .block_erase = erase_chip_block_jedec,
6414 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006415 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006416 .write = write_jedec_1,
6417 .read = read_memmapped,
6418 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R and 55R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006419 .prepare_access = prepare_memory_access,
6420 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006421 },
6422
6423 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006424 .vendor = "Eon",
6425 .name = "EN29LV640B",
6426 .bustype = BUS_PARALLEL,
6427 .manufacture_id = EON_ID,
6428 .model_id = EON_EN29LV640B,
6429 .total_size = 8192,
6430 .page_size = 8192,
6431 .feature_bits = FEATURE_ADDR_SHIFTED,
6432 .tested = TEST_OK_PREW,
6433 .probe = probe_en29lv640b,
6434 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006435 .block_erasers =
6436 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006437 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006438 .eraseblocks = {
6439 {8 * 1024, 8},
6440 {64 * 1024, 127},
6441 },
6442 .block_erase = erase_block_jedec,
Stefan Tauner0be072c2016-03-13 15:16:30 +00006443 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006444 .eraseblocks = { {8 * 1024 * 1024, 1} },
6445 .block_erase = erase_chip_block_jedec,
6446 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006447 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006448 .write = write_en29lv640b,
6449 .read = read_memmapped,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006450 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006451 .prepare_access = prepare_memory_access,
6452 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006453 },
6454
6455 {
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006456 .vendor = "Fudan",
6457 .name = "FM25F005",
6458 .bustype = BUS_SPI,
6459 .manufacture_id = FUDAN_ID_NOPREFIX,
6460 .model_id = FUDAN_FM25F005,
6461 .total_size = 64,
6462 .page_size = 256,
6463 /* OTP: 256B total; enter 0x3A */
6464 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6465 .tested = TEST_UNTESTED,
6466 .probe = probe_spi_rdid,
6467 .probe_timing = TIMING_ZERO,
6468 .block_erasers = {
6469 {
6470 .eraseblocks = { {4 * 1024, 16} },
6471 .block_erase = spi_block_erase_20,
6472 }, {
6473 .eraseblocks = { {32 * 1024, 2} },
6474 .block_erase = spi_block_erase_52,
6475 }, {
6476 .eraseblocks = { {64 * 1024, 1} },
6477 .block_erase = spi_block_erase_d8,
6478 }, {
6479 .eraseblocks = { {64 * 1024, 1} },
6480 .block_erase = spi_block_erase_60,
6481 }, {
6482 .eraseblocks = { {64 * 1024, 1} },
6483 .block_erase = spi_block_erase_c7,
6484 }
6485 },
6486 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6487 .unlock = spi_disable_blockprotect_bp2_srwd,
6488 .write = spi_chip_write_256,
6489 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6490 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6491 },
6492
6493 {
6494 .vendor = "Fudan",
6495 .name = "FM25F01",
6496 .bustype = BUS_SPI,
6497 .manufacture_id = FUDAN_ID_NOPREFIX,
6498 .model_id = FUDAN_FM25F01,
6499 .total_size = 128,
6500 .page_size = 256,
6501 /* OTP: 256B total; enter 0x3A */
6502 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6503 .tested = TEST_UNTESTED,
6504 .probe = probe_spi_rdid,
6505 .probe_timing = TIMING_ZERO,
6506 .block_erasers = {
6507 {
6508 .eraseblocks = { {4 * 1024, 32} },
6509 .block_erase = spi_block_erase_20,
6510 }, {
6511 .eraseblocks = { {32 * 1024, 4} },
6512 .block_erase = spi_block_erase_52,
6513 }, {
6514 .eraseblocks = { {64 * 1024, 2} },
6515 .block_erase = spi_block_erase_d8,
6516 }, {
6517 .eraseblocks = { {128 * 1024, 1} },
6518 .block_erase = spi_block_erase_60,
6519 }, {
6520 .eraseblocks = { {128 * 1024, 1} },
6521 .block_erase = spi_block_erase_c7,
6522 }
6523 },
6524 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6525 .unlock = spi_disable_blockprotect_bp2_srwd,
6526 .write = spi_chip_write_256,
6527 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6528 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6529 },
6530
6531 {
6532 .vendor = "Fudan",
6533 .name = "FM25F02(A)",
6534 .bustype = BUS_SPI,
6535 .manufacture_id = FUDAN_ID_NOPREFIX,
6536 .model_id = FUDAN_FM25F02,
6537 .total_size = 256,
6538 .page_size = 256,
6539 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6540 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6541 .tested = TEST_UNTESTED,
6542 .probe = probe_spi_rdid,
6543 .probe_timing = TIMING_ZERO,
6544 .block_erasers = {
6545 {
6546 .eraseblocks = { {4 * 1024, 64} },
6547 .block_erase = spi_block_erase_20,
6548 }, {
6549 .eraseblocks = { {32 * 1024, 8} },
6550 .block_erase = spi_block_erase_52,
6551 }, {
6552 .eraseblocks = { {64 * 1024, 4} },
6553 .block_erase = spi_block_erase_d8,
6554 }, {
6555 .eraseblocks = { {1024 * 256, 1} },
6556 .block_erase = spi_block_erase_60,
6557 }, {
6558 .eraseblocks = { {1024 * 256, 1} },
6559 .block_erase = spi_block_erase_c7,
6560 },
6561 },
6562 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6563 .unlock = spi_disable_blockprotect_bp2_srwd,
6564 .write = spi_chip_write_256,
6565 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6566 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6567 },
6568
6569 {
6570 .vendor = "Fudan",
6571 .name = "FM25F04(A)",
6572 .bustype = BUS_SPI,
6573 .manufacture_id = FUDAN_ID_NOPREFIX,
6574 .model_id = FUDAN_FM25F04,
6575 .total_size = 512,
6576 .page_size = 256,
6577 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6578 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6579 .tested = TEST_UNTESTED,
6580 .probe = probe_spi_rdid,
6581 .probe_timing = TIMING_ZERO,
6582 .block_erasers = {
6583 {
6584 .eraseblocks = { {4 * 1024, 128} },
6585 .block_erase = spi_block_erase_20,
6586 }, {
6587 .eraseblocks = { {32 * 1024, 16} },
6588 .block_erase = spi_block_erase_52,
6589 }, {
6590 .eraseblocks = { {64 * 1024, 8} },
6591 .block_erase = spi_block_erase_d8,
6592 }, {
6593 .eraseblocks = { {1024 * 512, 1} },
6594 .block_erase = spi_block_erase_60,
6595 }, {
6596 .eraseblocks = { {1024 * 512, 1} },
6597 .block_erase = spi_block_erase_c7,
6598 },
6599 },
6600 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6601 .unlock = spi_disable_blockprotect_bp2_srwd,
6602 .write = spi_chip_write_256,
6603 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6604 .voltage = {2700, 3600},
6605 },
6606
6607 {
6608 .vendor = "Fudan",
Nico Huberc5915182024-10-21 23:40:10 +02006609 .name = "FM25Q02",
6610 .bustype = BUS_SPI,
6611 .manufacture_id = FUDAN_ID_NOPREFIX,
6612 .model_id = FUDAN_FM25Q02,
6613 .total_size = 256,
6614 .page_size = 256,
6615 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
6616 FEATURE_OTP | FEATURE_QPI_SRP,
6617 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6618 .tested = TEST_UNTESTED,
6619 .probe = probe_spi_rdid,
6620 .probe_timing = TIMING_ZERO,
6621 .block_erasers =
6622 {
6623 {
6624 .eraseblocks = { {4 * 1024, 64} },
6625 .block_erase = spi_block_erase_20,
6626 }, {
6627 .eraseblocks = { {32 * 1024, 8} },
6628 .block_erase = spi_block_erase_52,
6629 }, {
6630 .eraseblocks = { {64 * 1024, 4} },
6631 .block_erase = spi_block_erase_d8,
6632 }, {
6633 .eraseblocks = { {256 * 1024, 1} },
6634 .block_erase = spi_block_erase_60,
6635 }, {
6636 .eraseblocks = { {256 * 1024, 1} },
6637 .block_erase = spi_block_erase_c7,
6638 },
6639 },
6640 .reg_bits =
6641 {
6642 .qe = {STATUS2, 1, RW},
6643 .srp = {STATUS1, 7, RW},
6644 .srl = {STATUS2, 0, RW},
6645 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}},
6646 .tb = {STATUS1, 5, RW},
6647 .cmp = {STATUS2, 4, RW},
6648 .wps = {STATUS2, 5, RW},
6649 },
6650 .wp_write_cfg = spi_wp_write_cfg,
6651 .wp_read_cfg = spi_wp_read_cfg,
6652 .wp_get_ranges = spi_wp_get_available_ranges,
6653 .decode_range = decode_range_spi25,
6654 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6655 .unlock = spi_disable_blockprotect_bp2_srwd,
6656 .write = spi_chip_write_256,
6657 .read = spi_chip_read,
6658 .voltage = {2700, 3600},
6659 .prepare_access = spi_prepare_io,
6660 .finish_access = spi_finish_io,
6661 },
6662
6663 {
6664 .vendor = "Fudan",
6665 .name = "FM25Q04",
6666 .bustype = BUS_SPI,
6667 .manufacture_id = FUDAN_ID_NOPREFIX,
6668 .model_id = FUDAN_FM25Q04,
6669 .total_size = 512,
6670 .page_size = 256,
6671 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
6672 FEATURE_OTP | FEATURE_QPI_SRP,
6673 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6674 .tested = TEST_UNTESTED,
6675 .probe = probe_spi_rdid,
6676 .probe_timing = TIMING_ZERO,
6677 .block_erasers =
6678 {
6679 {
6680 .eraseblocks = { {4 * 1024, 128} },
6681 .block_erase = spi_block_erase_20,
6682 }, {
6683 .eraseblocks = { {32 * 1024, 16} },
6684 .block_erase = spi_block_erase_52,
6685 }, {
6686 .eraseblocks = { {64 * 1024, 8} },
6687 .block_erase = spi_block_erase_d8,
6688 }, {
6689 .eraseblocks = { {512 * 1024, 1} },
6690 .block_erase = spi_block_erase_60,
6691 }, {
6692 .eraseblocks = { {512 * 1024, 1} },
6693 .block_erase = spi_block_erase_c7,
6694 },
6695 },
6696 .reg_bits =
6697 {
6698 .qe = {STATUS2, 1, RW},
6699 .srp = {STATUS1, 7, RW},
6700 .srl = {STATUS2, 0, RW},
6701 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6702 .tb = {STATUS1, 5, RW},
6703 .cmp = {STATUS2, 4, RW},
6704 .wps = {STATUS2, 5, RW},
6705 },
6706 .wp_write_cfg = spi_wp_write_cfg,
6707 .wp_read_cfg = spi_wp_read_cfg,
6708 .wp_get_ranges = spi_wp_get_available_ranges,
6709 .decode_range = decode_range_spi25,
6710 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6711 .unlock = spi_disable_blockprotect_bp2_srwd,
6712 .write = spi_chip_write_256,
6713 .read = spi_chip_read,
6714 .voltage = {2700, 3600},
6715 .prepare_access = spi_prepare_io,
6716 .finish_access = spi_finish_io,
6717 },
6718
6719 {
6720 .vendor = "Fudan",
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006721 .name = "FM25Q08",
6722 .bustype = BUS_SPI,
6723 .manufacture_id = FUDAN_ID_NOPREFIX,
6724 .model_id = FUDAN_FM25Q08,
6725 .total_size = 1024,
6726 .page_size = 256,
6727 /* supports SFDP */
6728 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber7f7bffa2024-10-21 23:57:11 +02006729 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
Nico Huber226bb872024-04-09 23:30:34 +02006730 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006731 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006732 .tested = TEST_UNTESTED,
6733 .probe = probe_spi_rdid,
6734 .probe_timing = TIMING_ZERO,
6735 .block_erasers = {
6736 {
6737 .eraseblocks = { {4 * 1024, 256} },
6738 .block_erase = spi_block_erase_20,
6739 }, {
6740 .eraseblocks = { {32 * 1024, 32} },
6741 .block_erase = spi_block_erase_52,
6742 }, {
6743 .eraseblocks = { {64 * 1024, 16} },
6744 .block_erase = spi_block_erase_d8,
6745 }, {
6746 .eraseblocks = { {1024 * 1024, 1} },
6747 .block_erase = spi_block_erase_60,
6748 }, {
6749 .eraseblocks = { {1024 * 1024, 1} },
6750 .block_erase = spi_block_erase_c7,
6751 },
6752 },
Nico Huber226bb872024-04-09 23:30:34 +02006753 .reg_bits =
6754 {
6755 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006756 .srp = {STATUS1, 7, RW},
6757 .srl = {STATUS2, 0, RW},
6758 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6759 .tb = {STATUS1, 5, RW},
6760 .sec = {STATUS1, 6, RW},
6761 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02006762 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006763 .wp_write_cfg = spi_wp_write_cfg,
6764 .wp_read_cfg = spi_wp_read_cfg,
6765 .wp_get_ranges = spi_wp_get_available_ranges,
6766 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006767 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6768 .unlock = spi_disable_blockprotect_bp2_srwd,
6769 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006770 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006771 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006772 .prepare_access = spi_prepare_io,
6773 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006774 },
6775
6776 {
6777 .vendor = "Fudan",
Nico Huber4a351342024-10-22 00:03:52 +02006778 .name = "FM25Q08A",
6779 .bustype = BUS_SPI,
6780 .manufacture_id = FUDAN_ID_NOPREFIX,
6781 .model_id = FUDAN_FM25Q08,
6782 .total_size = 1024,
6783 .page_size = 256,
6784 /* supports SFDP */
6785 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
6786 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
6787 FEATURE_OTP | FEATURE_QPI_SRP,
6788 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6789 .tested = TEST_UNTESTED,
6790 .probe = probe_spi_rdid,
6791 .probe_timing = TIMING_ZERO,
6792 .block_erasers = {
6793 {
6794 .eraseblocks = { {4 * 1024, 256} },
6795 .block_erase = spi_block_erase_20,
6796 }, {
6797 .eraseblocks = { {32 * 1024, 32} },
6798 .block_erase = spi_block_erase_52,
6799 }, {
6800 .eraseblocks = { {64 * 1024, 16} },
6801 .block_erase = spi_block_erase_d8,
6802 }, {
6803 .eraseblocks = { {1024 * 1024, 1} },
6804 .block_erase = spi_block_erase_60,
6805 }, {
6806 .eraseblocks = { {1024 * 1024, 1} },
6807 .block_erase = spi_block_erase_c7,
6808 },
6809 },
6810 .reg_bits =
6811 {
6812 .qe = {STATUS2, 1, RW},
6813 .srp = {STATUS1, 7, RW},
6814 .srl = {STATUS2, 0, RW},
6815 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6816 .tb = {STATUS1, 5, RW},
6817 .sec = {STATUS1, 6, RW},
6818 .cmp = {STATUS2, 4, RW},
6819 },
6820 .wp_write_cfg = spi_wp_write_cfg,
6821 .wp_read_cfg = spi_wp_read_cfg,
6822 .wp_get_ranges = spi_wp_get_available_ranges,
6823 .decode_range = decode_range_spi25,
6824 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6825 .unlock = spi_disable_blockprotect_bp2_srwd,
6826 .write = spi_chip_write_256,
6827 .read = spi_chip_read,
6828 .voltage = {2700, 3600},
6829 .prepare_access = spi_prepare_io,
6830 .finish_access = spi_finish_io,
6831 },
6832
6833 {
6834 .vendor = "Fudan",
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006835 .name = "FM25Q16",
6836 .bustype = BUS_SPI,
6837 .manufacture_id = FUDAN_ID_NOPREFIX,
6838 .model_id = FUDAN_FM25Q16,
6839 .total_size = 2048,
6840 .page_size = 256,
6841 /* supports SFDP */
6842 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber7f7bffa2024-10-21 23:57:11 +02006843 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
Nico Huber226bb872024-04-09 23:30:34 +02006844 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006845 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006846 .tested = TEST_UNTESTED,
6847 .probe = probe_spi_rdid,
6848 .probe_timing = TIMING_ZERO,
6849 .block_erasers = {
6850 {
6851 .eraseblocks = { {4 * 1024, 512} },
6852 .block_erase = spi_block_erase_20,
6853 }, {
6854 .eraseblocks = { {32 * 1024, 64} },
6855 .block_erase = spi_block_erase_52,
6856 }, {
6857 .eraseblocks = { {64 * 1024, 32} },
6858 .block_erase = spi_block_erase_d8,
6859 }, {
6860 .eraseblocks = { {2 * 1024 * 1024, 1} },
6861 .block_erase = spi_block_erase_60,
6862 }, {
6863 .eraseblocks = { {2 * 1024 * 1024, 1} },
6864 .block_erase = spi_block_erase_c7,
6865 }
6866 },
Nico Huber226bb872024-04-09 23:30:34 +02006867 .reg_bits =
6868 {
6869 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006870 .srp = {STATUS1, 7, RW},
6871 .srl = {STATUS2, 0, RW},
6872 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6873 .tb = {STATUS1, 5, RW},
6874 .sec = {STATUS1, 6, RW},
6875 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02006876 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006877 .wp_write_cfg = spi_wp_write_cfg,
6878 .wp_read_cfg = spi_wp_read_cfg,
6879 .wp_get_ranges = spi_wp_get_available_ranges,
6880 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006881 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6882 .unlock = spi_disable_blockprotect_bp2_srwd,
6883 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006884 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006885 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006886 .prepare_access = spi_prepare_io,
6887 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006888 },
6889
6890 {
6891 .vendor = "Fudan",
6892 .name = "FM25Q32",
6893 .bustype = BUS_SPI,
6894 .manufacture_id = FUDAN_ID_NOPREFIX,
6895 .model_id = FUDAN_FM25Q32,
6896 .total_size = 4096,
6897 .page_size = 256,
6898 /* supports SFDP */
6899 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber7f7bffa2024-10-21 23:57:11 +02006900 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
Nico Huber226bb872024-04-09 23:30:34 +02006901 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006902 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006903 .tested = TEST_UNTESTED,
6904 .probe = probe_spi_rdid,
6905 .probe_timing = TIMING_ZERO,
6906 .block_erasers = {
6907 {
6908 .eraseblocks = { {4 * 1024, 1024} },
6909 .block_erase = spi_block_erase_20,
6910 }, {
6911 .eraseblocks = { {32 * 1024, 128} },
6912 .block_erase = spi_block_erase_52,
6913 }, {
6914 .eraseblocks = { {64 * 1024, 64} },
6915 .block_erase = spi_block_erase_d8,
6916 }, {
6917 .eraseblocks = { {4 * 1024 * 1024, 1} },
6918 .block_erase = spi_block_erase_60,
6919 }, {
6920 .eraseblocks = { {4 * 1024 * 1024, 1} },
6921 .block_erase = spi_block_erase_c7,
6922 },
6923 },
Nico Huber226bb872024-04-09 23:30:34 +02006924 .reg_bits =
6925 {
6926 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006927 .srp = {STATUS1, 7, RW},
6928 .srl = {STATUS2, 0, RW},
6929 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6930 .tb = {STATUS1, 5, RW},
6931 .sec = {STATUS1, 6, RW},
6932 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02006933 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006934 .wp_write_cfg = spi_wp_write_cfg,
6935 .wp_read_cfg = spi_wp_read_cfg,
6936 .wp_get_ranges = spi_wp_get_available_ranges,
6937 .decode_range = decode_range_spi25,
6938 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6939 .unlock = spi_disable_blockprotect_bp2_srwd,
6940 .write = spi_chip_write_256,
6941 .read = spi_chip_read,
6942 .voltage = {2700, 3600},
6943 .prepare_access = spi_prepare_io,
6944 .finish_access = spi_finish_io,
6945 },
6946
6947 {
6948 .vendor = "Fudan",
6949 .name = "FM25Q64",
6950 .bustype = BUS_SPI,
6951 .manufacture_id = FUDAN_ID_NOPREFIX,
6952 .model_id = FUDAN_FM25Q64,
6953 .total_size = 8192,
6954 .page_size = 256,
6955 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
6956 FEATURE_OTP | FEATURE_QPI_SRP,
6957 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6958 .tested = TEST_UNTESTED,
6959 .probe = probe_spi_rdid,
6960 .probe_timing = TIMING_ZERO,
6961 .block_erasers =
6962 {
6963 {
6964 .eraseblocks = { {4 * 1024, 2048} },
6965 .block_erase = spi_block_erase_20,
6966 }, {
6967 .eraseblocks = { {32 * 1024, 256} },
6968 .block_erase = spi_block_erase_52,
6969 }, {
6970 .eraseblocks = { {64 * 1024, 128} },
6971 .block_erase = spi_block_erase_d8,
6972 }, {
6973 .eraseblocks = { {8192 * 1024, 1} },
6974 .block_erase = spi_block_erase_60,
6975 }, {
6976 .eraseblocks = { {8192 * 1024, 1} },
6977 .block_erase = spi_block_erase_c7,
6978 },
6979 },
6980 .reg_bits =
6981 {
6982 .qe = {STATUS2, 1, RW},
6983 .srp = {STATUS1, 7, RW},
6984 .srl = {STATUS2, 0, RW},
6985 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6986 .tb = {STATUS1, 5, RW},
6987 .sec = {STATUS1, 6, RW},
6988 .cmp = {STATUS2, 6, RW},
6989 },
6990 .wp_write_cfg = spi_wp_write_cfg,
6991 .wp_read_cfg = spi_wp_read_cfg,
6992 .wp_get_ranges = spi_wp_get_available_ranges,
6993 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006994 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6995 .unlock = spi_disable_blockprotect_bp2_srwd,
6996 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006997 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006998 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006999 .prepare_access = spi_prepare_io,
7000 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01007001 },
7002
7003 {
Nico Hubered8b82c2024-10-22 00:12:03 +02007004 .vendor = "Fudan",
7005 .name = "FM25Q128",
7006 .bustype = BUS_SPI,
7007 .manufacture_id = FUDAN_ID_NOPREFIX,
7008 .model_id = FUDAN_FM25Q128,
7009 .total_size = 16384,
7010 .page_size = 256,
7011 /* Supports full QIO/QPI but has non-volatile DC bits controlling all modes. */
7012 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
7013 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
7014 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
7015 .tested = TEST_UNTESTED,
7016 .probe = probe_spi_rdid,
7017 .probe_timing = TIMING_ZERO,
7018 .block_erasers =
7019 {
7020 {
7021 .eraseblocks = { {4 * 1024, 4096} },
7022 .block_erase = spi_block_erase_20,
7023 }, {
7024 .eraseblocks = { {32 * 1024, 512} },
7025 .block_erase = spi_block_erase_52,
7026 }, {
7027 .eraseblocks = { {64 * 1024, 256} },
7028 .block_erase = spi_block_erase_d8,
7029 }, {
7030 .eraseblocks = { {16384 * 1024, 1} },
7031 .block_erase = spi_block_erase_60,
7032 }, {
7033 .eraseblocks = { {16384 * 1024, 1} },
7034 .block_erase = spi_block_erase_c7,
7035 },
7036 },
7037 .reg_bits =
7038 {
7039 .qe = {STATUS2, 1, RW},
7040 .dc = {{STATUS2, 6, RW}, {STATUS2, 7, RW}},
7041 .srp = {STATUS1, 7, RW},
7042 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7043 .tb = {STATUS1, 5, RW},
7044 .cmp = {STATUS1, 6, RW},
7045 .wps = {STATUS3, 2, RW},
7046 },
7047 .wp_write_cfg = spi_wp_write_cfg,
7048 .wp_read_cfg = spi_wp_read_cfg,
7049 .wp_get_ranges = spi_wp_get_available_ranges,
7050 .decode_range = decode_range_spi25,
7051 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
7052 .unlock = spi_disable_blockprotect_bp2_srwd,
7053 .write = spi_chip_write_256,
7054 .read = spi_chip_read,
7055 .voltage = {2700, 3600},
7056 .prepare_access = spi_prepare_io,
7057 .finish_access = spi_finish_io,
7058 },
7059
7060 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007061 .vendor = "Fujitsu",
7062 .name = "MBM29F004BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007063 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007064 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007065 .model_id = FUJITSU_MBM29F004BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007066 .total_size = 512,
7067 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00007068 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007069 .tested = TEST_UNTESTED,
7070 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00007071 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00007072 .block_erasers =
7073 {
7074 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007075 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007076 {16 * 1024, 1},
7077 {8 * 1024, 2},
7078 {32 * 1024, 1},
7079 {64 * 1024, 7},
7080 },
Sean Nelson35727f72010-01-28 23:55:12 +00007081 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007082 }, {
7083 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00007084 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007085 },
7086 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007087 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007088 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00007089 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007090 .prepare_access = prepare_memory_access,
7091 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007092 },
7093
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007094 {
7095 .vendor = "Fujitsu",
7096 .name = "MBM29F004TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007097 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007098 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007099 .model_id = FUJITSU_MBM29F004TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007100 .total_size = 512,
7101 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00007102 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007103 .tested = TEST_UNTESTED,
7104 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00007105 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00007106 .block_erasers =
7107 {
7108 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007109 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007110 {64 * 1024, 7},
7111 {32 * 1024, 1},
7112 {8 * 1024, 2},
7113 {16 * 1024, 1},
7114 },
Sean Nelson35727f72010-01-28 23:55:12 +00007115 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007116 }, {
7117 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00007118 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007119 },
7120 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007121 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007122 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00007123 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007124 .prepare_access = prepare_memory_access,
7125 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007126 },
7127
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007128 {
Sean Nelson35727f72010-01-28 23:55:12 +00007129 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007130 .vendor = "Fujitsu",
7131 .name = "MBM29F400BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007132 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007133 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007134 .model_id = FUJITSU_MBM29F400BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007135 .total_size = 512,
7136 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007137 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +00007138 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007139 .probe = probe_jedec,
7140 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00007141 .block_erasers =
7142 {
7143 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007144 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007145 {16 * 1024, 1},
7146 {8 * 1024, 2},
7147 {32 * 1024, 1},
7148 {64 * 1024, 7},
7149 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007150 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007151 }, {
7152 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007153 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007154 },
7155 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007156 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007157 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007158 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007159 .prepare_access = prepare_memory_access,
7160 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007161 },
7162
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007163 {
7164 .vendor = "Fujitsu",
7165 .name = "MBM29F400TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007166 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007167 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007168 .model_id = FUJITSU_MBM29F400TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007169 .total_size = 512,
7170 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007171 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007172 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007173 .probe = probe_jedec,
7174 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00007175 .block_erasers =
7176 {
7177 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007178 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007179 {64 * 1024, 7},
7180 {32 * 1024, 1},
7181 {8 * 1024, 2},
7182 {16 * 1024, 1},
7183 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007184 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007185 }, {
7186 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007187 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007188 },
7189 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007190 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007191 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007192 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007193 .prepare_access = prepare_memory_access,
7194 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007195 },
7196
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007197 {
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007198 .vendor = "Fujitsu",
7199 .name = "MBM29LV160BE",
7200 .bustype = BUS_PARALLEL,
7201 .manufacture_id = FUJITSU_ID,
7202 .model_id = FUJITSU_MBM29LV160BE,
7203 .total_size = 2 * 1024,
7204 .page_size = 0,
7205 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET,
7206 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007207 .probe = probe_jedec,
7208 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007209 .block_erasers =
7210 {
7211 {
7212 .eraseblocks = {
7213 {16 * 1024, 1},
7214 {8 * 1024, 2},
7215 {32 * 1024, 1},
7216 {64 * 1024, 31},
7217 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007218 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007219 }, {
7220 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007221 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007222 },
7223 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007224 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007225 .read = read_memmapped,
7226 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01007227 .prepare_access = prepare_memory_access,
7228 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007229 },
7230
7231 {
7232 .vendor = "Fujitsu",
7233 .name = "MBM29LV160TE",
7234 .bustype = BUS_PARALLEL,
7235 .manufacture_id = FUJITSU_ID,
7236 .model_id = FUJITSU_MBM29LV160TE,
7237 .total_size = 2 * 1024,
7238 .page_size = 0,
7239 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET,
7240 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007241 .probe = probe_jedec,
7242 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007243 .block_erasers =
7244 {
7245 {
7246 .eraseblocks = {
7247 {64 * 1024, 31},
7248 {32 * 1024, 1},
7249 {8 * 1024, 2},
7250 {16 * 1024, 1},
7251 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007252 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007253 }, {
7254 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007255 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007256 },
7257 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007258 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007259 .read = read_memmapped,
7260 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01007261 .prepare_access = prepare_memory_access,
7262 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007263 },
7264
7265 {
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007266 .vendor = "GigaDevice",
Nico Huberd4eb5322024-11-08 23:26:04 +01007267 .name = "GD25LF80E",
7268 .bustype = BUS_SPI,
7269 .manufacture_id = GIGADEVICE_ID,
7270 .model_id = GIGADEVICE_GD25LF80E,
7271 .total_size = 1024,
7272 .page_size = 256,
7273 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7274 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7275 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7276 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7277 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7278 .tested = TEST_UNTESTED,
7279 .probe = probe_spi_rdid,
7280 .probe_timing = TIMING_ZERO,
7281 .block_erasers =
7282 {
7283 {
7284 .eraseblocks = { {4 * 1024, 256} },
7285 .block_erase = spi_block_erase_20,
7286 }, {
7287 .eraseblocks = { {32 * 1024, 32} },
7288 .block_erase = spi_block_erase_52,
7289 }, {
7290 .eraseblocks = { {64 * 1024, 16} },
7291 .block_erase = spi_block_erase_d8,
7292 }, {
7293 .eraseblocks = { {1024 * 1024, 1} },
7294 .block_erase = spi_block_erase_60,
7295 }, {
7296 .eraseblocks = { {1024 * 1024, 1} },
7297 .block_erase = spi_block_erase_c7,
7298 }
7299 },
7300 .printlock = spi_prettyprint_status_register_bp4_srwd,
7301 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7302 .write = spi_chip_write_256,
7303 .read = spi_chip_read,
7304 .voltage = {1650, 2000},
7305 .reg_bits =
7306 {
7307 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7308 .srp = {STATUS1, 7, RW},
7309 .srl = {STATUS2, 0, RW},
7310 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7311 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7312 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7313 .cmp = {STATUS2, 6, RW},
7314 },
7315 .wp_write_cfg = spi_wp_write_cfg,
7316 .wp_read_cfg = spi_wp_read_cfg,
7317 .wp_get_ranges = spi_wp_get_available_ranges,
7318 .decode_range = decode_range_spi25,
7319 .prepare_access = spi_prepare_io,
7320 .finish_access = spi_finish_io,
7321 },
7322
7323 {
7324 .vendor = "GigaDevice",
7325 .name = "GD25LF16E",
7326 .bustype = BUS_SPI,
7327 .manufacture_id = GIGADEVICE_ID,
7328 .model_id = GIGADEVICE_GD25LF16E,
7329 .total_size = 2048,
7330 .page_size = 256,
7331 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7332 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7333 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7334 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7335 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7336 .tested = TEST_UNTESTED,
7337 .probe = probe_spi_rdid,
7338 .probe_timing = TIMING_ZERO,
7339 .block_erasers =
7340 {
7341 {
7342 .eraseblocks = { {4 * 1024, 512} },
7343 .block_erase = spi_block_erase_20,
7344 }, {
7345 .eraseblocks = { {32 * 1024, 64} },
7346 .block_erase = spi_block_erase_52,
7347 }, {
7348 .eraseblocks = { {64 * 1024, 32} },
7349 .block_erase = spi_block_erase_d8,
7350 }, {
7351 .eraseblocks = { {2048 * 1024, 1} },
7352 .block_erase = spi_block_erase_60,
7353 }, {
7354 .eraseblocks = { {2048 * 1024, 1} },
7355 .block_erase = spi_block_erase_c7,
7356 }
7357 },
7358 .printlock = spi_prettyprint_status_register_bp4_srwd,
7359 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7360 .write = spi_chip_write_256,
7361 .read = spi_chip_read,
7362 .voltage = {1650, 2000},
7363 .reg_bits =
7364 {
7365 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7366 .srp = {STATUS1, 7, RW},
7367 .srl = {STATUS2, 0, RW},
7368 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7369 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7370 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7371 .cmp = {STATUS2, 6, RW},
7372 },
7373 .wp_write_cfg = spi_wp_write_cfg,
7374 .wp_read_cfg = spi_wp_read_cfg,
7375 .wp_get_ranges = spi_wp_get_available_ranges,
7376 .decode_range = decode_range_spi25,
7377 .prepare_access = spi_prepare_io,
7378 .finish_access = spi_finish_io,
7379 },
7380
7381 {
7382 .vendor = "GigaDevice",
7383 .name = "GD25LF32E",
7384 .bustype = BUS_SPI,
7385 .manufacture_id = GIGADEVICE_ID,
7386 .model_id = GIGADEVICE_GD25LF32E,
7387 .total_size = 4096,
7388 .page_size = 256,
7389 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7390 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7391 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7392 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7393 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7394 .tested = TEST_UNTESTED,
7395 .probe = probe_spi_rdid,
7396 .probe_timing = TIMING_ZERO,
7397 .block_erasers =
7398 {
7399 {
7400 .eraseblocks = { {4 * 1024, 1024} },
7401 .block_erase = spi_block_erase_20,
7402 }, {
7403 .eraseblocks = { {32 * 1024, 128} },
7404 .block_erase = spi_block_erase_52,
7405 }, {
7406 .eraseblocks = { {64 * 1024, 64} },
7407 .block_erase = spi_block_erase_d8,
7408 }, {
7409 .eraseblocks = { {4096 * 1024, 1} },
7410 .block_erase = spi_block_erase_60,
7411 }, {
7412 .eraseblocks = { {4096 * 1024, 1} },
7413 .block_erase = spi_block_erase_c7,
7414 }
7415 },
7416 .printlock = spi_prettyprint_status_register_bp4_srwd,
7417 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7418 .write = spi_chip_write_256,
7419 .read = spi_chip_read,
7420 .voltage = {1650, 2000},
7421 .reg_bits =
7422 {
7423 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7424 .srp = {STATUS1, 7, RW},
7425 .srl = {STATUS2, 0, RW},
7426 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7427 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7428 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7429 .cmp = {STATUS2, 6, RW},
7430 },
7431 .wp_write_cfg = spi_wp_write_cfg,
7432 .wp_read_cfg = spi_wp_read_cfg,
7433 .wp_get_ranges = spi_wp_get_available_ranges,
7434 .decode_range = decode_range_spi25,
7435 .prepare_access = spi_prepare_io,
7436 .finish_access = spi_finish_io,
7437 },
7438
7439 {
7440 .vendor = "GigaDevice",
7441 .name = "GD25LF64E",
7442 .bustype = BUS_SPI,
7443 .manufacture_id = GIGADEVICE_ID,
7444 .model_id = GIGADEVICE_GD25LF64E,
7445 .total_size = 8192,
7446 .page_size = 256,
7447 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7448 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7449 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7450 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7451 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7452 .tested = TEST_UNTESTED,
7453 .probe = probe_spi_rdid,
7454 .probe_timing = TIMING_ZERO,
7455 .block_erasers =
7456 {
7457 {
7458 .eraseblocks = { {4 * 1024, 2048} },
7459 .block_erase = spi_block_erase_20,
7460 }, {
7461 .eraseblocks = { {32 * 1024, 256} },
7462 .block_erase = spi_block_erase_52,
7463 }, {
7464 .eraseblocks = { {64 * 1024, 128} },
7465 .block_erase = spi_block_erase_d8,
7466 }, {
7467 .eraseblocks = { {8192 * 1024, 1} },
7468 .block_erase = spi_block_erase_60,
7469 }, {
7470 .eraseblocks = { {8192 * 1024, 1} },
7471 .block_erase = spi_block_erase_c7,
7472 }
7473 },
7474 .printlock = spi_prettyprint_status_register_bp4_srwd,
7475 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7476 .write = spi_chip_write_256,
7477 .read = spi_chip_read,
7478 .voltage = {1650, 2000},
7479 .reg_bits =
7480 {
7481 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7482 .srp = {STATUS1, 7, RW},
7483 .srl = {STATUS2, 0, RW},
7484 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7485 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7486 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7487 .cmp = {STATUS2, 6, RW},
7488 },
7489 .wp_write_cfg = spi_wp_write_cfg,
7490 .wp_read_cfg = spi_wp_read_cfg,
7491 .wp_get_ranges = spi_wp_get_available_ranges,
7492 .decode_range = decode_range_spi25,
7493 .prepare_access = spi_prepare_io,
7494 .finish_access = spi_finish_io,
7495 },
7496
7497 {
7498 .vendor = "GigaDevice",
Nico Huber3646b182024-11-08 23:44:37 +01007499 .name = "GD25LF128E",
7500 .bustype = BUS_SPI,
7501 .manufacture_id = GIGADEVICE_ID,
7502 .model_id = GIGADEVICE_GD25LF128E,
7503 .total_size = 16384,
7504 .page_size = 256,
7505 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7506 /* Supports fast-read quad-i/o (0xeb) but with non-volatile DC bits. */
7507 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7508 FEATURE_OTP | (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7509 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7510 .tested = TEST_UNTESTED,
7511 .probe = probe_spi_rdid,
7512 .probe_timing = TIMING_ZERO,
7513 .block_erasers =
7514 {
7515 {
7516 .eraseblocks = { {4 * 1024, 4096} },
7517 .block_erase = spi_block_erase_20,
7518 }, {
7519 .eraseblocks = { {32 * 1024, 512} },
7520 .block_erase = spi_block_erase_52,
7521 }, {
7522 .eraseblocks = { {64 * 1024, 256} },
7523 .block_erase = spi_block_erase_d8,
7524 }, {
7525 .eraseblocks = { {16384 * 1024, 1} },
7526 .block_erase = spi_block_erase_60,
7527 }, {
7528 .eraseblocks = { {16384 * 1024, 1} },
7529 .block_erase = spi_block_erase_c7,
7530 }
7531 },
7532 .printlock = spi_prettyprint_status_register_bp4_srwd,
7533 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7534 .write = spi_chip_write_256,
7535 .read = spi_chip_read,
7536 .voltage = {1650, 2000},
7537 .reg_bits =
7538 {
7539 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7540 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
7541 .srp = {STATUS1, 7, RW},
7542 .srl = {STATUS2, 0, RW},
7543 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7544 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7545 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7546 .cmp = {STATUS2, 6, RW},
7547 },
7548 .wp_write_cfg = spi_wp_write_cfg,
7549 .wp_read_cfg = spi_wp_read_cfg,
7550 .wp_get_ranges = spi_wp_get_available_ranges,
7551 .decode_range = decode_range_spi25,
7552 .prepare_access = spi_prepare_io,
7553 .finish_access = spi_finish_io,
7554 },
7555
7556 {
7557 .vendor = "GigaDevice",
Edward O'Callaghan981a3442021-06-22 11:16:55 +10007558 .name = "GD25LQ128C/GD25LQ128D/GD25LQ128E",
Roman Titov95edc892015-04-03 21:29:04 +00007559 .bustype = BUS_SPI,
7560 .manufacture_id = GIGADEVICE_ID,
Alan Green188127e2019-08-06 16:10:34 +10007561 .model_id = GIGADEVICE_GD25LQ128CD,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007562 .total_size = 16384,
Roman Titov95edc892015-04-03 21:29:04 +00007563 .page_size = 256,
Nico Huber7d0f5562024-11-08 15:06:22 +01007564 /* OTP: 3x 512B, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7565 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber4da971f2024-03-27 01:18:12 +01007566 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007567 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00007568 .probe = probe_spi_rdid,
7569 .probe_timing = TIMING_ZERO,
7570 .block_erasers =
7571 {
7572 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007573 .eraseblocks = { {4 * 1024, 4096} },
Roman Titov95edc892015-04-03 21:29:04 +00007574 .block_erase = spi_block_erase_20,
7575 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007576 .eraseblocks = { {32 * 1024, 512} },
Roman Titov95edc892015-04-03 21:29:04 +00007577 .block_erase = spi_block_erase_52,
7578 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007579 .eraseblocks = { {64 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00007580 .block_erase = spi_block_erase_d8,
7581 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007582 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00007583 .block_erase = spi_block_erase_60,
7584 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007585 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00007586 .block_erase = spi_block_erase_c7,
7587 }
7588 },
7589 .printlock = spi_prettyprint_status_register_bp4_srwd,
7590 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7591 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007592 .read = spi_chip_read,
Nico Huber7d0f5562024-11-08 15:06:22 +01007593 .voltage = {1650, 1950},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007594 .reg_bits =
7595 {
Nico Huber4da971f2024-03-27 01:18:12 +01007596 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007597 .srp = {STATUS1, 7, RW},
7598 .srl = {STATUS2, 0, RW},
7599 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7600 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7601 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7602 .cmp = {STATUS2, 6, RW},
7603 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007604 .wp_write_cfg = spi_wp_write_cfg,
7605 .wp_read_cfg = spi_wp_read_cfg,
7606 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007607 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007608 .prepare_access = spi_prepare_io,
7609 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00007610 },
7611
7612 {
7613 .vendor = "GigaDevice",
7614 .name = "GD25LQ16",
7615 .bustype = BUS_SPI,
7616 .manufacture_id = GIGADEVICE_ID,
7617 .model_id = GIGADEVICE_GD25LQ16,
7618 .total_size = 2048,
7619 .page_size = 256,
Nico Huber7f8c12d2024-11-08 14:24:14 +01007620 /* OTP: 1024B total, 256B reserved, later 3x 512B; read 0x48; write 0x42, erase 0x44 */
7621 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for L.16C */
7622 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00007623 .tested = TEST_UNTESTED,
7624 .probe = probe_spi_rdid,
7625 .probe_timing = TIMING_ZERO,
7626 .block_erasers =
7627 {
7628 {
7629 .eraseblocks = { {4 * 1024, 512} },
7630 .block_erase = spi_block_erase_20,
7631 }, {
7632 .eraseblocks = { {32 * 1024, 64} },
7633 .block_erase = spi_block_erase_52,
7634 }, {
7635 .eraseblocks = { {64 * 1024, 32} },
7636 .block_erase = spi_block_erase_d8,
7637 }, {
7638 .eraseblocks = { {2 * 1024 * 1024, 1} },
7639 .block_erase = spi_block_erase_60,
7640 }, {
7641 .eraseblocks = { {2 * 1024 * 1024, 1} },
7642 .block_erase = spi_block_erase_c7,
7643 }
7644 },
Nico Huber7f8c12d2024-11-08 14:24:14 +01007645 .printlock = spi_prettyprint_status_register_bp4_srwd,
7646 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7647 .write = spi_chip_write_256,
7648 .read = spi_chip_read,
7649 .voltage = {1650, 1950}, /* 16C, 16E: up to 2.1V */
Nico Huber4da971f2024-03-27 01:18:12 +01007650 .reg_bits =
7651 {
7652 .qe = {STATUS2, 1, RW},
Nico Huber7f8c12d2024-11-08 14:24:14 +01007653 .srp = {STATUS1, 7, RW},
7654 .srl = {STATUS2, 0, RW},
7655 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7656 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7657 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7658 .cmp = {STATUS2, 6, RW},
7659 },
7660 .wp_write_cfg = spi_wp_write_cfg,
7661 .wp_read_cfg = spi_wp_read_cfg,
7662 .wp_get_ranges = spi_wp_get_available_ranges,
7663 .decode_range = decode_range_spi25,
7664 .prepare_access = spi_prepare_io,
7665 .finish_access = spi_finish_io,
7666 },
7667
7668 {
7669 .vendor = "GigaDevice",
7670 .name = "GD25LQ20",
7671 .bustype = BUS_SPI,
7672 .manufacture_id = GIGADEVICE_ID,
7673 .model_id = GIGADEVICE_GD25LQ20,
7674 .total_size = 256,
7675 .page_size = 256,
7676 /* OTP: 3x 512B; read 0x48; write 0x42, erase 0x44 */
7677 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
7678 .tested = TEST_UNTESTED,
7679 .probe = probe_spi_rdid,
7680 .probe_timing = TIMING_ZERO,
7681 .block_erasers =
7682 {
7683 {
7684 .eraseblocks = { {4 * 1024, 64} },
7685 .block_erase = spi_block_erase_20,
7686 }, {
7687 .eraseblocks = { {32 * 1024, 8} },
7688 .block_erase = spi_block_erase_52,
7689 }, {
7690 .eraseblocks = { {64 * 1024, 4} },
7691 .block_erase = spi_block_erase_d8,
7692 }, {
7693 .eraseblocks = { {256 * 1024, 1} },
7694 .block_erase = spi_block_erase_60,
7695 }, {
7696 .eraseblocks = { {256 * 1024, 1} },
7697 .block_erase = spi_block_erase_c7,
7698 }
Nico Huber4da971f2024-03-27 01:18:12 +01007699 },
Roman Titov95edc892015-04-03 21:29:04 +00007700 .printlock = spi_prettyprint_status_register_bp4_srwd,
7701 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7702 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007703 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01007704 .voltage = {1650, 1950}, /* 20C: up to 2.1V, 20E: up to 2.0V */
7705 .reg_bits =
7706 {
7707 .qe = {STATUS2, 1, RW},
7708 .srp = {STATUS1, 7, RW},
7709 .srl = {STATUS2, 0, RW},
7710 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7711 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7712 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7713 .cmp = {STATUS2, 6, RW},
7714 },
7715 .wp_write_cfg = spi_wp_write_cfg,
7716 .wp_read_cfg = spi_wp_read_cfg,
7717 .wp_get_ranges = spi_wp_get_available_ranges,
7718 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007719 .prepare_access = spi_prepare_io,
7720 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00007721 },
7722
7723 {
7724 .vendor = "GigaDevice",
Nico Huberbc001da2024-11-08 17:11:56 +01007725 .name = "GD25LQ256D/GD25LE256D/GD25LB256D/GD25LQ255E",
7726 .bustype = BUS_SPI,
7727 .manufacture_id = GIGADEVICE_ID,
7728 .model_id = GIGADEVICE_GD25LQ256D,
7729 .total_size = 32768,
7730 .page_size = 256,
7731 /* GD25LQ255E also supports native 4BA commands, EAR. */
7732 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7733 FEATURE_4BA_ENTER | FEATURE_QPI_SRP,
7734 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7735 .tested = TEST_UNTESTED,
7736 .probe = probe_spi_rdid,
7737 .probe_timing = TIMING_ZERO,
7738 .block_erasers =
7739 {
7740 {
7741 .eraseblocks = { {4 * 1024, 8192} },
7742 .block_erase = spi_block_erase_20,
7743 }, {
7744 .eraseblocks = { {32 * 1024, 1024} },
7745 .block_erase = spi_block_erase_52,
7746 }, {
7747 .eraseblocks = { {64 * 1024, 512} },
7748 .block_erase = spi_block_erase_d8,
7749 }, {
7750 .eraseblocks = { {32 * 1024 * 1024, 1} },
7751 .block_erase = spi_block_erase_60,
7752 }, {
7753 .eraseblocks = { {32 * 1024 * 1024, 1} },
7754 .block_erase = spi_block_erase_c7,
7755 }
7756 },
7757 .printlock = spi_prettyprint_status_register_bp4_srwd,
7758 .unlock = spi_disable_blockprotect_bp4_srwd,
7759 .write = spi_chip_write_256,
7760 .read = spi_chip_read,
7761 .voltage = {1650, 2000},
7762 .reg_bits =
7763 {
7764 .qe = {STATUS2, 1, RW}, /* GD25LB256D: Fixed QE=1 */
7765 .srp = {STATUS1, 7, RW},
7766 .srl = {STATUS2, 0, RW},
7767 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7768 .tb = {STATUS1, 5, RW},
7769 .sec = {STATUS1, 6, RW},
7770 .cmp = {STATUS2, 6, RW},
7771 },
7772 .wp_write_cfg = spi_wp_write_cfg,
7773 .wp_read_cfg = spi_wp_read_cfg,
7774 .wp_get_ranges = spi_wp_get_available_ranges,
7775 .decode_range = decode_range_spi25,
7776 .prepare_access = spi_prepare_io,
7777 .finish_access = spi_finish_io,
7778 },
7779
7780 {
7781 .vendor = "GigaDevice",
7782 .name = "GD25LQ256H/GD25LE256H/GD25LB256F",
7783 .bustype = BUS_SPI,
7784 .manufacture_id = GIGADEVICE_ID,
7785 .model_id = GIGADEVICE_GD25LQ256D,
7786 .total_size = 32768,
7787 .page_size = 256,
7788 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
7789 /* LE256H supports DTR. */
7790 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7791 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
7792 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
7793 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7794 .tested = TEST_UNTESTED,
7795 .probe = probe_spi_rdid,
7796 .probe_timing = TIMING_ZERO,
7797 .block_erasers =
7798 {
7799 {
7800 .eraseblocks = { {4 * 1024, 8192} },
7801 .block_erase = spi_block_erase_21,
7802 }, {
7803 .eraseblocks = { {4 * 1024, 8192} },
7804 .block_erase = spi_block_erase_20,
7805 }, {
7806 .eraseblocks = { {32 * 1024, 1024} },
7807 .block_erase = spi_block_erase_5c,
7808 }, {
7809 .eraseblocks = { {32 * 1024, 1024} },
7810 .block_erase = spi_block_erase_52,
7811 }, {
7812 .eraseblocks = { {64 * 1024, 512} },
7813 .block_erase = spi_block_erase_dc,
7814 }, {
7815 .eraseblocks = { {64 * 1024, 512} },
7816 .block_erase = spi_block_erase_d8,
7817 }, {
7818 .eraseblocks = { {32 * 1024 * 1024, 1} },
7819 .block_erase = spi_block_erase_60,
7820 }, {
7821 .eraseblocks = { {32 * 1024 * 1024, 1} },
7822 .block_erase = spi_block_erase_c7,
7823 }
7824 },
7825 .printlock = spi_prettyprint_status_register_bp4_srwd,
7826 .unlock = spi_disable_blockprotect_bp4_srwd,
7827 .write = spi_chip_write_256,
7828 .read = spi_chip_read,
7829 .voltage = {1650, 2000},
7830 .reg_bits =
7831 {
7832 .qe = {STATUS2, 1, RW}, /* GD25LB256F: Fixed QE=1 */
7833 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
7834 .srp = {STATUS1, 7, RW},
7835 .srl = {STATUS2, 0, RW},
7836 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7837 .tb = {STATUS1, 6, RW},
7838 .cmp = {STATUS2, 6, RW},
7839 },
7840 .wp_write_cfg = spi_wp_write_cfg,
7841 .wp_read_cfg = spi_wp_read_cfg,
7842 .wp_get_ranges = spi_wp_get_available_ranges,
7843 .decode_range = decode_range_spi25,
7844 .prepare_access = spi_prepare_io,
7845 .finish_access = spi_finish_io,
7846 },
7847
7848 {
7849 .vendor = "GigaDevice",
7850 .name = "GD25LE255E",
7851 .bustype = BUS_SPI,
7852 .manufacture_id = GIGADEVICE_ID,
7853 .model_id = GIGADEVICE_GD25LQ256D,
7854 .total_size = 32768,
7855 .page_size = 256,
7856 /* Non-volatile DC bits control SPI mode, hence disable fast-read commands. */
7857 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7858 FEATURE_OTP | (FEATURE_4BA & ~FEATURE_4BA_FAST_READ) |
7859 FEATURE_FAST_READ_QPI4B | (FEATURE_QPI_SRP & ~FEATURE_QIO),
Nico Hubere0600182025-03-01 12:29:28 +01007860 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 0 } },
Nico Huberbc001da2024-11-08 17:11:56 +01007861 .tested = TEST_UNTESTED,
7862 .probe = probe_spi_rdid,
7863 .probe_timing = TIMING_ZERO,
7864 .block_erasers =
7865 {
7866 {
7867 .eraseblocks = { {4 * 1024, 8192} },
7868 .block_erase = spi_block_erase_21,
7869 }, {
7870 .eraseblocks = { {4 * 1024, 8192} },
7871 .block_erase = spi_block_erase_20,
7872 }, {
7873 .eraseblocks = { {32 * 1024, 1024} },
7874 .block_erase = spi_block_erase_5c,
7875 }, {
7876 .eraseblocks = { {32 * 1024, 1024} },
7877 .block_erase = spi_block_erase_52,
7878 }, {
7879 .eraseblocks = { {64 * 1024, 512} },
7880 .block_erase = spi_block_erase_dc,
7881 }, {
7882 .eraseblocks = { {64 * 1024, 512} },
7883 .block_erase = spi_block_erase_d8,
7884 }, {
7885 .eraseblocks = { {32 * 1024 * 1024, 1} },
7886 .block_erase = spi_block_erase_60,
7887 }, {
7888 .eraseblocks = { {32 * 1024 * 1024, 1} },
7889 .block_erase = spi_block_erase_c7,
7890 }
7891 },
7892 .printlock = spi_prettyprint_status_register_bp4_srwd,
7893 .unlock = spi_disable_blockprotect_bp4_srwd,
7894 .write = spi_chip_write_256,
7895 .read = spi_chip_read,
7896 .voltage = {1650, 2000},
7897 .reg_bits =
7898 {
7899 .qe = {STATUS2, 1, RW},
7900 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
7901 .srp = {STATUS1, 7, RW},
7902 .srl = {STATUS2, 0, RW},
7903 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7904 .tb = {STATUS1, 6, RW},
7905 },
7906 .wp_write_cfg = spi_wp_write_cfg,
7907 .wp_read_cfg = spi_wp_read_cfg,
7908 .wp_get_ranges = spi_wp_get_available_ranges,
7909 .decode_range = decode_range_spi25,
7910 .prepare_access = spi_prepare_io,
7911 .finish_access = spi_finish_io,
7912 },
7913
7914 {
7915 .vendor = "GigaDevice",
Nico Huber06fbccc2024-11-08 17:36:28 +01007916 .name = "GD25LB256E/GD25LR256E",
7917 .bustype = BUS_SPI,
7918 .manufacture_id = GIGADEVICE_ID,
7919 .model_id = GIGADEVICE_GD25LB256E,
7920 .total_size = 32768,
7921 .page_size = 256,
7922 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
7923 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
7924 .tested = TEST_UNTESTED,
7925 .probe = probe_spi_rdid,
7926 .probe_timing = TIMING_ZERO,
7927 .block_erasers =
7928 {
7929 {
7930 .eraseblocks = { {4 * 1024, 8192} },
7931 .block_erase = spi_block_erase_21,
7932 }, {
7933 .eraseblocks = { {4 * 1024, 8192} },
7934 .block_erase = spi_block_erase_20,
7935 }, {
7936 .eraseblocks = { {32 * 1024, 1024} },
7937 .block_erase = spi_block_erase_5c,
7938 }, {
7939 .eraseblocks = { {32 * 1024, 1024} },
7940 .block_erase = spi_block_erase_52,
7941 }, {
7942 .eraseblocks = { {64 * 1024, 512} },
7943 .block_erase = spi_block_erase_dc,
7944 }, {
7945 .eraseblocks = { {64 * 1024, 512} },
7946 .block_erase = spi_block_erase_d8,
7947 }, {
7948 .eraseblocks = { {32 * 1024 * 1024, 1} },
7949 .block_erase = spi_block_erase_60,
7950 }, {
7951 .eraseblocks = { {32 * 1024 * 1024, 1} },
7952 .block_erase = spi_block_erase_c7,
7953 }
7954 },
7955 /* Has WPS bit in unsupported register. */
7956 .printlock = spi_prettyprint_status_register_bp4_srwd,
7957 .unlock = spi_disable_blockprotect_bp4_srwd,
7958 .write = spi_chip_write_256,
7959 .read = spi_chip_read,
7960 .voltage = {1650, 2000},
7961 .prepare_access = spi_prepare_io,
7962 .finish_access = spi_finish_io,
7963 },
7964
7965 {
7966 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007967 .name = "GD25LQ32",
7968 .bustype = BUS_SPI,
7969 .manufacture_id = GIGADEVICE_ID,
7970 .model_id = GIGADEVICE_GD25LQ32,
7971 .total_size = 4096,
7972 .page_size = 256,
Nico Huber7d0f5562024-11-08 15:06:22 +01007973 /* OTP: 1024B total, 256B reserved, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7974 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber4da971f2024-03-27 01:18:12 +01007975 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007976 .tested = TEST_OK_PREW,
7977 .probe = probe_spi_rdid,
7978 .probe_timing = TIMING_ZERO,
7979 .block_erasers =
7980 {
7981 {
7982 .eraseblocks = { {4 * 1024, 1024} },
7983 .block_erase = spi_block_erase_20,
7984 }, {
7985 .eraseblocks = { {32 * 1024, 128} },
7986 .block_erase = spi_block_erase_52,
7987 }, {
7988 .eraseblocks = { {64 * 1024, 64} },
7989 .block_erase = spi_block_erase_d8,
7990 }, {
7991 .eraseblocks = { {4 * 1024 * 1024, 1} },
7992 .block_erase = spi_block_erase_60,
7993 }, {
7994 .eraseblocks = { {4 * 1024 * 1024, 1} },
7995 .block_erase = spi_block_erase_c7,
7996 }
7997 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00007998 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007999 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8000 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008001 .read = spi_chip_read,
Nico Huber7d0f5562024-11-08 15:06:22 +01008002 .voltage = {1650, 1950},
8003 .reg_bits =
8004 {
8005 .qe = {STATUS2, 1, RW},
8006 .srp = {STATUS1, 7, RW},
8007 .srl = {STATUS2, 0, RW},
8008 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8009 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8010 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8011 .cmp = {STATUS2, 6, RW},
8012 },
8013 .wp_write_cfg = spi_wp_write_cfg,
8014 .wp_read_cfg = spi_wp_read_cfg,
8015 .wp_get_ranges = spi_wp_get_available_ranges,
8016 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008017 .prepare_access = spi_prepare_io,
8018 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00008019 },
8020
8021 {
8022 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008023 .name = "GD25LQ40",
8024 .bustype = BUS_SPI,
8025 .manufacture_id = GIGADEVICE_ID,
8026 .model_id = GIGADEVICE_GD25LQ40,
8027 .total_size = 512,
8028 .page_size = 256,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008029 /* OTP: 1024B total, 256B reserved, later 3x 512B; read 0x48; write 0x42, erase 0x44 */
8030 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ40B, LQ40C, LQ40E */
8031 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008032 .tested = TEST_UNTESTED,
8033 .probe = probe_spi_rdid,
8034 .probe_timing = TIMING_ZERO,
8035 .block_erasers =
8036 {
8037 {
8038 .eraseblocks = { {4 * 1024, 128} },
8039 .block_erase = spi_block_erase_20,
8040 }, {
8041 .eraseblocks = { {32 * 1024, 16} },
8042 .block_erase = spi_block_erase_52,
8043 }, {
8044 .eraseblocks = { {64 * 1024, 8} },
8045 .block_erase = spi_block_erase_d8,
8046 }, {
8047 .eraseblocks = { {512 * 1024, 1} },
8048 .block_erase = spi_block_erase_60,
8049 }, {
8050 .eraseblocks = { {512 * 1024, 1} },
8051 .block_erase = spi_block_erase_c7,
8052 }
8053 },
8054 .printlock = spi_prettyprint_status_register_bp4_srwd,
8055 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8056 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008057 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008058 .voltage = {1650, 1950}, /* 40C: up to 2.1V, 40E: up to 2.0V */
8059 .reg_bits =
8060 {
8061 .qe = {STATUS2, 1, RW},
8062 .srp = {STATUS1, 7, RW},
8063 .srl = {STATUS2, 0, RW},
8064 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8065 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8066 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8067 .cmp = {STATUS2, 6, RW},
8068 },
8069 .wp_write_cfg = spi_wp_write_cfg,
8070 .wp_read_cfg = spi_wp_read_cfg,
8071 .wp_get_ranges = spi_wp_get_available_ranges,
8072 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008073 .prepare_access = spi_prepare_io,
8074 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008075 },
8076
8077 {
8078 .vendor = "GigaDevice",
Roman Titov95edc892015-04-03 21:29:04 +00008079 .name = "GD25LQ64(B)",
8080 .bustype = BUS_SPI,
8081 .manufacture_id = GIGADEVICE_ID,
8082 .model_id = GIGADEVICE_GD25LQ64,
8083 .total_size = 8192,
8084 .page_size = 256,
Nico Huber7d0f5562024-11-08 15:06:22 +01008085 /* OTP: 1024B total, 256B reserved, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
8086 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber4da971f2024-03-27 01:18:12 +01008087 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03008088 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00008089 .probe = probe_spi_rdid,
8090 .probe_timing = TIMING_ZERO,
8091 .block_erasers =
8092 {
8093 {
8094 .eraseblocks = { {4 * 1024, 2048} },
8095 .block_erase = spi_block_erase_20,
8096 }, {
8097 .eraseblocks = { {32 * 1024, 256} },
8098 .block_erase = spi_block_erase_52,
8099 }, {
8100 .eraseblocks = { {64 * 1024, 128} },
8101 .block_erase = spi_block_erase_d8,
8102 }, {
8103 .eraseblocks = { {8 * 1024 * 1024, 1} },
8104 .block_erase = spi_block_erase_60,
8105 }, {
8106 .eraseblocks = { {8 * 1024 * 1024, 1} },
8107 .block_erase = spi_block_erase_c7,
8108 }
8109 },
8110 .printlock = spi_prettyprint_status_register_bp4_srwd,
8111 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8112 .write = spi_chip_write_256,
Nico Huber7d0f5562024-11-08 15:06:22 +01008113 .read = spi_chip_read,
8114 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008115 .reg_bits =
8116 {
Nico Huber4da971f2024-03-27 01:18:12 +01008117 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008118 .srp = {STATUS1, 7, RW},
8119 .srl = {STATUS2, 0, RW},
8120 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8121 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8122 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8123 .cmp = {STATUS2, 6, RW},
8124 },
Nico Huberaabb3e02023-01-13 00:22:30 +01008125 .wp_write_cfg = spi_wp_write_cfg,
8126 .wp_read_cfg = spi_wp_read_cfg,
8127 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008128 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008129 .prepare_access = spi_prepare_io,
8130 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00008131 },
8132
8133 {
8134 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008135 .name = "GD25LQ80",
Roman Titov95edc892015-04-03 21:29:04 +00008136 .bustype = BUS_SPI,
8137 .manufacture_id = GIGADEVICE_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008138 .model_id = GIGADEVICE_GD25LQ80,
8139 .total_size = 1024,
Roman Titov95edc892015-04-03 21:29:04 +00008140 .page_size = 256,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008141 /* OTP: 1024B total, 256B reserved, later 3x 512B; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01008142 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ80B, LQ80C */
Nico Huber7f8c12d2024-11-08 14:24:14 +01008143 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00008144 .tested = TEST_UNTESTED,
8145 .probe = probe_spi_rdid,
8146 .probe_timing = TIMING_ZERO,
8147 .block_erasers =
8148 {
8149 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008150 .eraseblocks = { {4 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00008151 .block_erase = spi_block_erase_20,
8152 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008153 .eraseblocks = { {32 * 1024, 32} },
Roman Titov95edc892015-04-03 21:29:04 +00008154 .block_erase = spi_block_erase_52,
8155 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008156 .eraseblocks = { {64 * 1024, 16} },
Roman Titov95edc892015-04-03 21:29:04 +00008157 .block_erase = spi_block_erase_d8,
8158 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008159 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00008160 .block_erase = spi_block_erase_60,
8161 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008162 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00008163 .block_erase = spi_block_erase_c7,
8164 }
8165 },
8166 .printlock = spi_prettyprint_status_register_bp4_srwd,
8167 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8168 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008169 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008170 .voltage = {1650, 1950}, /* 80C: up to 2.1V, 80E: up to 2.0V */
8171 .reg_bits =
8172 {
8173 .qe = {STATUS2, 1, RW},
8174 .srp = {STATUS1, 7, RW},
8175 .srl = {STATUS2, 0, RW},
8176 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8177 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8178 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8179 .cmp = {STATUS2, 6, RW},
8180 },
8181 .wp_write_cfg = spi_wp_write_cfg,
8182 .wp_read_cfg = spi_wp_read_cfg,
8183 .wp_get_ranges = spi_wp_get_available_ranges,
8184 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008185 .prepare_access = spi_prepare_io,
8186 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008187 },
8188
8189 {
8190 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008191 .name = "GD25LB512ME/GD25LR512ME",
Naresh Solanki768cfc42024-10-04 20:17:34 +05308192 .bustype = BUS_SPI,
8193 .manufacture_id = GIGADEVICE_ID,
Nico Huber1da02932024-11-08 17:56:39 +01008194 .model_id = GIGADEVICE_GD25LB512ME,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308195 .total_size = 65536,
8196 .page_size = 256,
Nico Huber1da02932024-11-08 17:56:39 +01008197 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8198 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308199 .tested = TEST_OK_PREW,
8200 .probe = probe_spi_rdid,
8201 .probe_timing = TIMING_ZERO,
8202 .block_erasers =
8203 {
8204 {
8205 .eraseblocks = { {4 * 1024, 16384} },
8206 .block_erase = spi_block_erase_21,
8207 }, {
8208 .eraseblocks = { {4 * 1024, 16384} },
8209 .block_erase = spi_block_erase_20,
8210 }, {
8211 .eraseblocks = { {32 * 1024, 2048} },
Nico Huber1da02932024-11-08 17:56:39 +01008212 .block_erase = spi_block_erase_5c,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308213 }, {
8214 .eraseblocks = { {32 * 1024, 2048} },
Nico Huber1da02932024-11-08 17:56:39 +01008215 .block_erase = spi_block_erase_52,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308216 }, {
8217 .eraseblocks = { {64 * 1024, 1024} },
8218 .block_erase = spi_block_erase_dc,
8219 }, {
8220 .eraseblocks = { {64 * 1024, 1024} },
8221 .block_erase = spi_block_erase_d8,
8222 }, {
8223 .eraseblocks = { {64 * 1024 * 1024, 1} },
8224 .block_erase = spi_block_erase_60,
8225 }, {
8226 .eraseblocks = { {64 * 1024 * 1024, 1} },
8227 .block_erase = spi_block_erase_c7,
8228 }
8229 },
Nico Huber1da02932024-11-08 17:56:39 +01008230 /* Has WPS bit in unsupported register. */
8231 .printlock = spi_prettyprint_status_register_bp4_srwd,
8232 .unlock = spi_disable_blockprotect_bp4_srwd,
8233 .write = spi_chip_write_256,
8234 .read = spi_chip_read,
8235 .voltage = {1650, 2000},
8236 .prepare_access = spi_prepare_io,
8237 .finish_access = spi_finish_io,
8238 },
8239
8240 {
8241 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008242 .name = "GD25LB512MF/GD25LR512MF",
8243 .bustype = BUS_SPI,
8244 .manufacture_id = GIGADEVICE_ID,
8245 .model_id = GIGADEVICE_GD25LB512MF,
8246 .total_size = 65536,
8247 .page_size = 256,
8248 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8249 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8250 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8251 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8252 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8253 .tested = TEST_UNTESTED,
8254 .probe = probe_spi_rdid,
8255 .probe_timing = TIMING_ZERO,
8256 .block_erasers =
8257 {
8258 {
8259 .eraseblocks = { {4 * 1024, 16384} },
8260 .block_erase = spi_block_erase_21,
8261 }, {
8262 .eraseblocks = { {4 * 1024, 16384} },
8263 .block_erase = spi_block_erase_20,
8264 }, {
8265 .eraseblocks = { {32 * 1024, 2048} },
8266 .block_erase = spi_block_erase_52,
8267 }, {
8268 .eraseblocks = { {32 * 1024, 2048} },
8269 .block_erase = spi_block_erase_5c,
8270 }, {
8271 .eraseblocks = { {64 * 1024, 1024} },
8272 .block_erase = spi_block_erase_dc,
8273 }, {
8274 .eraseblocks = { {64 * 1024, 1024} },
8275 .block_erase = spi_block_erase_d8,
8276 }, {
8277 .eraseblocks = { {64 * 1024 * 1024, 1} },
8278 .block_erase = spi_block_erase_60,
8279 }, {
8280 .eraseblocks = { {64 * 1024 * 1024, 1} },
8281 .block_erase = spi_block_erase_c7,
8282 }
8283 },
8284 .printlock = spi_prettyprint_status_register_bp4_srwd,
8285 .unlock = spi_disable_blockprotect_bp4_srwd,
8286 .write = spi_chip_write_256,
8287 .read = spi_chip_read,
8288 .voltage = {1650, 2000},
8289 .reg_bits =
8290 {
8291 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8292 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8293 .srp = {STATUS1, 7, RW},
8294 .srl = {STATUS2, 0, RW},
8295 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8296 .tb = {STATUS1, 6, RW},
8297 .cmp = {STATUS2, 6, RW},
8298 },
8299 .wp_write_cfg = spi_wp_write_cfg,
8300 .wp_read_cfg = spi_wp_read_cfg,
8301 .wp_get_ranges = spi_wp_get_available_ranges,
8302 .decode_range = decode_range_spi25,
8303 .prepare_access = spi_prepare_io,
8304 .finish_access = spi_finish_io,
8305 },
8306
8307 {
8308 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008309 .name = "GD55LB01GE",
8310 .bustype = BUS_SPI,
8311 .manufacture_id = GIGADEVICE_ID,
8312 .model_id = GIGADEVICE_GD55LB01GE,
8313 .total_size = 128 * 1024,
8314 .page_size = 256,
8315 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8316 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
8317 .tested = TEST_UNTESTED,
8318 .probe = probe_spi_rdid,
8319 .probe_timing = TIMING_ZERO,
8320 .block_erasers =
8321 {
8322 {
8323 .eraseblocks = { {4 * 1024, 32768} },
8324 .block_erase = spi_block_erase_21,
8325 }, {
8326 .eraseblocks = { {4 * 1024, 32768} },
8327 .block_erase = spi_block_erase_20,
8328 }, {
8329 .eraseblocks = { {32 * 1024, 4096} },
8330 .block_erase = spi_block_erase_5c,
8331 }, {
8332 .eraseblocks = { {32 * 1024, 4096} },
8333 .block_erase = spi_block_erase_52,
8334 }, {
8335 .eraseblocks = { {64 * 1024, 2048} },
8336 .block_erase = spi_block_erase_dc,
8337 }, {
8338 .eraseblocks = { {64 * 1024, 2048} },
8339 .block_erase = spi_block_erase_d8,
8340 }, {
8341 .eraseblocks = { {128 * 1024 * 1024, 1} },
8342 .block_erase = spi_block_erase_60,
8343 }, {
8344 .eraseblocks = { {128 * 1024 * 1024, 1} },
8345 .block_erase = spi_block_erase_c7,
8346 }
8347 },
8348 /* Has WPS bit in unsupported register. */
8349 .printlock = spi_prettyprint_status_register_bp4_srwd,
8350 .unlock = spi_disable_blockprotect_bp4_srwd,
8351 .write = spi_chip_write_256,
8352 .read = spi_chip_read,
8353 .voltage = {1650, 2000},
8354 .prepare_access = spi_prepare_io,
8355 .finish_access = spi_finish_io,
8356 },
8357
8358 {
8359 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008360 .name = "GD55LB01GF",
8361 .bustype = BUS_SPI,
8362 .manufacture_id = GIGADEVICE_ID,
8363 .model_id = GIGADEVICE_GD55LB01GF,
8364 .total_size = 128 * 1024,
8365 .page_size = 256,
8366 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8367 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8368 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8369 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8370 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8371 .tested = TEST_UNTESTED,
8372 .probe = probe_spi_rdid,
8373 .probe_timing = TIMING_ZERO,
8374 .block_erasers =
8375 {
8376 {
8377 .eraseblocks = { {4 * 1024, 32768} },
8378 .block_erase = spi_block_erase_21,
8379 }, {
8380 .eraseblocks = { {4 * 1024, 32768} },
8381 .block_erase = spi_block_erase_20,
8382 }, {
8383 .eraseblocks = { {32 * 1024, 4096} },
8384 .block_erase = spi_block_erase_52,
8385 }, {
8386 .eraseblocks = { {32 * 1024, 4096} },
8387 .block_erase = spi_block_erase_5c,
8388 }, {
8389 .eraseblocks = { {64 * 1024, 2048} },
8390 .block_erase = spi_block_erase_dc,
8391 }, {
8392 .eraseblocks = { {64 * 1024, 2048} },
8393 .block_erase = spi_block_erase_d8,
8394 }, {
8395 .eraseblocks = { {128 * 1024 * 1024, 1} },
8396 .block_erase = spi_block_erase_60,
8397 }, {
8398 .eraseblocks = { {128 * 1024 * 1024, 1} },
8399 .block_erase = spi_block_erase_c7,
8400 }
8401 },
8402 .printlock = spi_prettyprint_status_register_bp4_srwd,
8403 .unlock = spi_disable_blockprotect_bp4_srwd,
8404 .write = spi_chip_write_256,
8405 .read = spi_chip_read,
8406 .voltage = {1650, 2000},
8407 .reg_bits =
8408 {
8409 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8410 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8411 .srp = {STATUS1, 7, RW},
8412 .srl = {STATUS2, 0, RW},
8413 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8414 .tb = {STATUS1, 6, RW},
8415 .cmp = {STATUS2, 6, RW},
8416 },
8417 .wp_write_cfg = spi_wp_write_cfg,
8418 .wp_read_cfg = spi_wp_read_cfg,
8419 .wp_get_ranges = spi_wp_get_available_ranges,
8420 .decode_range = decode_range_spi25,
8421 .prepare_access = spi_prepare_io,
8422 .finish_access = spi_finish_io,
8423 },
8424
8425 {
8426 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008427 .name = "GD55LB02GE",
8428 .bustype = BUS_SPI,
8429 .manufacture_id = GIGADEVICE_ID,
8430 .model_id = GIGADEVICE_GD55LB02GE,
8431 .total_size = 256 * 1024,
8432 .page_size = 256,
8433 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8434 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
8435 .tested = TEST_UNTESTED,
8436 .probe = probe_spi_rdid,
8437 .probe_timing = TIMING_ZERO,
8438 .block_erasers =
8439 {
8440 {
8441 .eraseblocks = { {4 * 1024, 65536} },
8442 .block_erase = spi_block_erase_21,
8443 }, {
8444 .eraseblocks = { {4 * 1024, 65536} },
8445 .block_erase = spi_block_erase_20,
8446 }, {
8447 .eraseblocks = { {32 * 1024, 8192} },
8448 .block_erase = spi_block_erase_5c,
8449 }, {
8450 .eraseblocks = { {32 * 1024, 8192} },
8451 .block_erase = spi_block_erase_52,
8452 }, {
8453 .eraseblocks = { {64 * 1024, 4096} },
8454 .block_erase = spi_block_erase_dc,
8455 }, {
8456 .eraseblocks = { {64 * 1024, 4096} },
8457 .block_erase = spi_block_erase_d8,
8458 }, {
8459 .eraseblocks = { {256 * 1024 * 1024, 1} },
8460 .block_erase = spi_block_erase_60,
8461 }, {
8462 .eraseblocks = { {256 * 1024 * 1024, 1} },
8463 .block_erase = spi_block_erase_c7,
8464 }
8465 },
8466 /* Has WPS bit in unsupported register. */
Naresh Solanki768cfc42024-10-04 20:17:34 +05308467 .printlock = spi_prettyprint_status_register_bp4_srwd,
8468 .unlock = spi_disable_blockprotect_bp4_srwd,
8469 .write = spi_chip_write_256,
8470 .read = spi_chip_read,
8471 .voltage = {1650, 2000},
8472 .prepare_access = spi_prepare_io,
8473 .finish_access = spi_finish_io,
8474 },
8475
8476 {
8477 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008478 .name = "GD55LB02GF",
8479 .bustype = BUS_SPI,
8480 .manufacture_id = GIGADEVICE_ID,
8481 .model_id = GIGADEVICE_GD55LB02GF,
8482 .total_size = 256 * 1024,
8483 .page_size = 256,
8484 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8485 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8486 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8487 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8488 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8489 .tested = TEST_UNTESTED,
8490 .probe = probe_spi_rdid,
8491 .probe_timing = TIMING_ZERO,
8492 .block_erasers =
8493 {
8494 {
8495 .eraseblocks = { {4 * 1024, 65536} },
8496 .block_erase = spi_block_erase_21,
8497 }, {
8498 .eraseblocks = { {4 * 1024, 65536} },
8499 .block_erase = spi_block_erase_20,
8500 }, {
8501 .eraseblocks = { {32 * 1024, 8192} },
8502 .block_erase = spi_block_erase_52,
8503 }, {
8504 .eraseblocks = { {32 * 1024, 8192} },
8505 .block_erase = spi_block_erase_5c,
8506 }, {
8507 .eraseblocks = { {64 * 1024, 4096} },
8508 .block_erase = spi_block_erase_dc,
8509 }, {
8510 .eraseblocks = { {64 * 1024, 4096} },
8511 .block_erase = spi_block_erase_d8,
8512 }, {
8513 .eraseblocks = { {256 * 1024 * 1024, 1} },
8514 .block_erase = spi_block_erase_60,
8515 }, {
8516 .eraseblocks = { {256 * 1024 * 1024, 1} },
8517 .block_erase = spi_block_erase_c7,
8518 }
8519 },
8520 .printlock = spi_prettyprint_status_register_bp4_srwd,
8521 .unlock = spi_disable_blockprotect_bp4_srwd,
8522 .write = spi_chip_write_256,
8523 .read = spi_chip_read,
8524 .voltage = {1650, 2000},
8525 .reg_bits =
8526 {
8527 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8528 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8529 .srp = {STATUS1, 7, RW},
8530 .srl = {STATUS2, 0, RW},
8531 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8532 .tb = {STATUS1, 6, RW},
8533 .cmp = {STATUS2, 6, RW},
8534 },
8535 .wp_write_cfg = spi_wp_write_cfg,
8536 .wp_read_cfg = spi_wp_read_cfg,
8537 .wp_get_ranges = spi_wp_get_available_ranges,
8538 .decode_range = decode_range_spi25,
8539 .prepare_access = spi_prepare_io,
8540 .finish_access = spi_finish_io,
8541 },
8542
8543 {
8544 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008545 .name = "GD25Q10",
8546 .bustype = BUS_SPI,
8547 .manufacture_id = GIGADEVICE_ID,
8548 .model_id = GIGADEVICE_GD25Q10,
8549 .total_size = 128,
8550 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01008551 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008552 .tested = TEST_UNTESTED,
8553 .probe = probe_spi_rdid,
8554 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10008555 .block_erasers =
8556 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008557 {
8558 .eraseblocks = { {4 * 1024, 32} },
8559 .block_erase = spi_block_erase_20,
8560 }, {
8561 .eraseblocks = { {32 * 1024, 4} },
8562 .block_erase = spi_block_erase_52,
8563 }, {
8564 .eraseblocks = { {64 * 1024, 2} },
8565 .block_erase = spi_block_erase_d8,
8566 }, {
8567 .eraseblocks = { {128 * 1024, 1} },
8568 .block_erase = spi_block_erase_60,
8569 }, {
8570 .eraseblocks = { {128 * 1024, 1} },
8571 .block_erase = spi_block_erase_c7,
8572 }
8573 },
Nico Huber4da971f2024-03-27 01:18:12 +01008574 .reg_bits =
8575 {
8576 .qe = {STATUS2, 1, RW},
8577 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00008578 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008579 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8580 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008581 .read = spi_chip_read,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008582 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008583 .prepare_access = spi_prepare_io,
8584 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008585 },
8586
8587 {
8588 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008589 .name = "GD25Q127C/GD25B127D",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008590 .bustype = BUS_SPI,
8591 .manufacture_id = GIGADEVICE_ID,
8592 .model_id = GIGADEVICE_GD25Q128,
8593 .total_size = 16384,
8594 .page_size = 256,
8595 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
Nico Huber6ee2f892024-10-27 12:15:50 +01008596 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
8597 FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03008598 .tested = TEST_OK_PREWB,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008599 .probe = probe_spi_rdid,
8600 .probe_timing = TIMING_ZERO,
8601 .block_erasers =
8602 {
8603 {
8604 .eraseblocks = { {4 * 1024, 4096} },
8605 .block_erase = spi_block_erase_20,
8606 }, {
8607 .eraseblocks = { {32 * 1024, 512} },
8608 .block_erase = spi_block_erase_52,
8609 }, {
8610 .eraseblocks = { {64 * 1024, 256} },
8611 .block_erase = spi_block_erase_d8,
8612 }, {
8613 .eraseblocks = { {16 * 1024 * 1024, 1} },
8614 .block_erase = spi_block_erase_60,
8615 }, {
8616 .eraseblocks = { {16 * 1024 * 1024, 1} },
8617 .block_erase = spi_block_erase_c7,
8618 }
8619 },
8620 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8621 .printlock = spi_prettyprint_status_register_bp4_srwd,
8622 .unlock = spi_disable_blockprotect_bp4_srwd,
8623 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01008624 .read = spi_chip_read,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008625 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008626 .reg_bits =
8627 {
Nico Huber4da971f2024-03-27 01:18:12 +01008628 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008629 .srp = {STATUS1, 7, RW},
8630 .srl = {STATUS2, 0, RW},
8631 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8632 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8633 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8634 .cmp = {STATUS2, 6, RW},
8635 },
Nico Huberaabb3e02023-01-13 00:22:30 +01008636 .wp_write_cfg = spi_wp_write_cfg,
8637 .wp_read_cfg = spi_wp_read_cfg,
8638 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008639 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008640 .prepare_access = spi_prepare_io,
8641 .finish_access = spi_finish_io,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008642 },
8643
8644 {
8645 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008646 .name = "GD25Q128B/GD25B128B",
8647 .bustype = BUS_SPI,
8648 .manufacture_id = GIGADEVICE_ID,
8649 .model_id = GIGADEVICE_GD25Q128,
8650 .total_size = 16384,
8651 .page_size = 256,
8652 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
8653 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
8654 .tested = TEST_OK_PREW,
8655 .probe = probe_spi_rdid,
8656 .probe_timing = TIMING_ZERO,
8657 .block_erasers =
8658 {
8659 {
8660 .eraseblocks = { {4 * 1024, 4096} },
8661 .block_erase = spi_block_erase_20,
8662 }, {
8663 .eraseblocks = { {32 * 1024, 512} },
8664 .block_erase = spi_block_erase_52,
8665 }, {
8666 .eraseblocks = { {64 * 1024, 256} },
8667 .block_erase = spi_block_erase_d8,
8668 }, {
8669 .eraseblocks = { {16 * 1024 * 1024, 1} },
8670 .block_erase = spi_block_erase_60,
8671 }, {
8672 .eraseblocks = { {16 * 1024 * 1024, 1} },
8673 .block_erase = spi_block_erase_c7,
8674 }
8675 },
8676 .printlock = spi_prettyprint_status_register_bp4_srwd,
8677 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8678 .write = spi_chip_write_256,
8679 .read = spi_chip_read,
8680 .voltage = {2700, 3600},
8681 .reg_bits =
8682 {
8683 .qe = {STATUS2, 1, RW}, /* GD25B128B: Fixed QE=1 */
8684 .srp = {STATUS1, 7, RW},
8685 .srl = {STATUS2, 0, RW},
8686 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8687 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8688 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8689 .cmp = {STATUS2, 6, RW},
8690 },
8691 .wp_write_cfg = spi_wp_write_cfg,
8692 .wp_read_cfg = spi_wp_read_cfg,
8693 .wp_get_ranges = spi_wp_get_available_ranges,
8694 .decode_range = decode_range_spi25,
8695 .prepare_access = spi_prepare_io,
8696 .finish_access = spi_finish_io,
8697 },
8698
8699 {
8700 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01008701 .name = "GD25Q128C",
8702 .bustype = BUS_SPI,
8703 .manufacture_id = GIGADEVICE_ID,
8704 .model_id = GIGADEVICE_GD25Q128,
8705 .total_size = 16384,
8706 .page_size = 256,
8707 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
Nico Huber6ee2f892024-10-27 12:15:50 +01008708 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
8709 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber68573af2024-01-06 18:28:22 +01008710 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8711 .tested = TEST_OK_PREWB,
8712 .probe = probe_spi_rdid,
8713 .probe_timing = TIMING_ZERO,
8714 .block_erasers =
8715 {
8716 {
8717 .eraseblocks = { {4 * 1024, 4096} },
8718 .block_erase = spi_block_erase_20,
8719 }, {
8720 .eraseblocks = { {32 * 1024, 512} },
8721 .block_erase = spi_block_erase_52,
8722 }, {
8723 .eraseblocks = { {64 * 1024, 256} },
8724 .block_erase = spi_block_erase_d8,
8725 }, {
8726 .eraseblocks = { {16 * 1024 * 1024, 1} },
8727 .block_erase = spi_block_erase_60,
8728 }, {
8729 .eraseblocks = { {16 * 1024 * 1024, 1} },
8730 .block_erase = spi_block_erase_c7,
8731 }
8732 },
8733 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8734 .printlock = spi_prettyprint_status_register_bp4_srwd,
8735 .unlock = spi_disable_blockprotect_bp4_srwd,
8736 .write = spi_chip_write_256,
8737 .read = spi_chip_read,
8738 .voltage = {2700, 3600},
8739 .reg_bits =
8740 {
8741 .qe = {STATUS2, 1, RW},
8742 .srp = {STATUS1, 7, RW},
8743 .srl = {STATUS2, 0, RW},
8744 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8745 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8746 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8747 .cmp = {STATUS2, 6, RW},
Nico Huber284d55b2025-02-26 23:37:49 +01008748 .wps = {STATUS3, 2, RW},
Nico Huber68573af2024-01-06 18:28:22 +01008749 },
Nico Huber2a1036b2024-10-20 23:19:49 +02008750 .wp_write_cfg = spi_wp_write_cfg,
8751 .wp_read_cfg = spi_wp_read_cfg,
8752 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber68573af2024-01-06 18:28:22 +01008753 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008754 .prepare_access = spi_prepare_io,
8755 .finish_access = spi_finish_io,
Nico Huber68573af2024-01-06 18:28:22 +01008756 },
8757
8758 {
8759 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008760 .name = "GD25Q128E/GD25B128E/GD25R128E/GD25Q128H/GD25B128H",
8761 .bustype = BUS_SPI,
8762 .manufacture_id = GIGADEVICE_ID,
8763 .model_id = GIGADEVICE_GD25Q128,
8764 .total_size = 16384,
8765 .page_size = 256,
8766 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
8767 /* Supports full QIO but has a non-volatile DC bit. */
8768 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
8769 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
8770 .tested = TEST_UNTESTED,
8771 .probe = probe_spi_rdid,
8772 .probe_timing = TIMING_ZERO,
8773 .block_erasers =
8774 {
8775 {
8776 .eraseblocks = { {4 * 1024, 4096} },
8777 .block_erase = spi_block_erase_20,
8778 }, {
8779 .eraseblocks = { {32 * 1024, 512} },
8780 .block_erase = spi_block_erase_52,
8781 }, {
8782 .eraseblocks = { {64 * 1024, 256} },
8783 .block_erase = spi_block_erase_d8,
8784 }, {
8785 .eraseblocks = { {16 * 1024 * 1024, 1} },
8786 .block_erase = spi_block_erase_60,
8787 }, {
8788 .eraseblocks = { {16 * 1024 * 1024, 1} },
8789 .block_erase = spi_block_erase_c7,
8790 }
8791 },
8792 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8793 .printlock = spi_prettyprint_status_register_bp4_srwd,
8794 .unlock = spi_disable_blockprotect_bp4_srwd,
8795 .write = spi_chip_write_256,
8796 .read = spi_chip_read,
8797 .voltage = {2700, 3600},
8798 .reg_bits =
8799 {
8800 .qe = {STATUS2, 1, RW}, /* GD25B/R: Fixed QE=1 */
8801 .dc = {{STATUS3, 0, RW}},
8802 .srp = {STATUS1, 7, RW},
8803 .srl = {STATUS2, 0, RW},
8804 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8805 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8806 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8807 .cmp = {STATUS2, 6, RW},
8808 },
8809 .wp_write_cfg = spi_wp_write_cfg,
8810 .wp_read_cfg = spi_wp_read_cfg,
8811 .wp_get_ranges = spi_wp_get_available_ranges,
8812 .decode_range = decode_range_spi25,
8813 .prepare_access = spi_prepare_io,
8814 .finish_access = spi_finish_io,
8815 },
8816
8817 {
8818 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008819 .name = "GD25Q16(B)",
8820 .bustype = BUS_SPI,
8821 .manufacture_id = GIGADEVICE_ID,
8822 .model_id = GIGADEVICE_GD25Q16,
8823 .total_size = 2048,
8824 .page_size = 256,
8825 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01008826 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008827 .tested = TEST_OK_PREW,
8828 .probe = probe_spi_rdid,
8829 .probe_timing = TIMING_ZERO,
8830 .block_erasers =
8831 {
8832 {
8833 .eraseblocks = { {4 * 1024, 512} },
8834 .block_erase = spi_block_erase_20,
8835 }, {
8836 .eraseblocks = { {32 * 1024, 64} },
8837 .block_erase = spi_block_erase_52,
8838 }, {
8839 .eraseblocks = { {64 * 1024, 32} },
8840 .block_erase = spi_block_erase_d8,
8841 }, {
8842 .eraseblocks = { {2 * 1024 * 1024, 1} },
8843 .block_erase = spi_block_erase_60,
8844 }, {
8845 .eraseblocks = { {2 * 1024 * 1024, 1} },
8846 .block_erase = spi_block_erase_c7,
8847 }
8848 },
Nico Huber4da971f2024-03-27 01:18:12 +01008849 .reg_bits =
8850 {
8851 .qe = {STATUS2, 1, RW},
8852 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008853 .printlock = spi_prettyprint_status_register_bp4_srwd,
8854 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8855 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008856 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008857 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008858 .prepare_access = spi_prepare_io,
8859 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008860 },
8861
8862 {
8863 .vendor = "GigaDevice",
8864 .name = "GD25Q20(B)",
8865 .bustype = BUS_SPI,
8866 .manufacture_id = GIGADEVICE_ID,
8867 .model_id = GIGADEVICE_GD25Q20,
8868 .total_size = 256,
8869 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01008870 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008871 .tested = TEST_OK_PREW,
8872 .probe = probe_spi_rdid,
8873 .probe_timing = TIMING_ZERO,
8874 .block_erasers =
8875 {
8876 {
8877 .eraseblocks = { {4 * 1024, 64} },
8878 .block_erase = spi_block_erase_20,
8879 }, {
8880 .eraseblocks = { {32 * 1024, 8} },
8881 .block_erase = spi_block_erase_52,
8882 }, {
8883 .eraseblocks = { {64 * 1024, 4} },
8884 .block_erase = spi_block_erase_d8,
8885 }, {
8886 .eraseblocks = { {256 * 1024, 1} },
8887 .block_erase = spi_block_erase_60,
8888 }, {
8889 .eraseblocks = { {256 * 1024, 1} },
8890 .block_erase = spi_block_erase_c7,
8891 }
8892 },
Nico Huber4da971f2024-03-27 01:18:12 +01008893 .reg_bits = {
8894 .qe = {STATUS2, 1, RW},
8895 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008896 .printlock = spi_prettyprint_status_register_bp4_srwd,
8897 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8898 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008899 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008900 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008901 .prepare_access = spi_prepare_io,
8902 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008903 },
8904
8905 {
8906 .vendor = "GigaDevice",
Nico Huber493a4e02024-10-27 15:15:26 +01008907 .name = "GD25Q256D/GD25B256D",
Alan Green86fc9cf2019-08-26 15:02:12 +10008908 .bustype = BUS_SPI,
8909 .manufacture_id = GIGADEVICE_ID,
8910 .model_id = GIGADEVICE_GD25Q256D,
8911 .total_size = 32768,
8912 .page_size = 256,
Nico Huber493a4e02024-10-27 15:15:26 +01008913 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA |
Nico Huber4da971f2024-03-27 01:18:12 +01008914 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
8915 FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03008916 .tested = TEST_OK_PREWB,
Alan Green86fc9cf2019-08-26 15:02:12 +10008917 .probe = probe_spi_rdid,
8918 .probe_timing = TIMING_ZERO,
8919 .block_erasers =
8920 {
8921 {
8922 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber5374dc32019-10-04 16:16:15 +02008923 .block_erase = spi_block_erase_21,
8924 }, {
8925 .eraseblocks = { {4 * 1024, 8192} },
Alan Green86fc9cf2019-08-26 15:02:12 +10008926 .block_erase = spi_block_erase_20,
8927 }, {
8928 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber5374dc32019-10-04 16:16:15 +02008929 .block_erase = spi_block_erase_5c,
8930 }, {
8931 .eraseblocks = { {32 * 1024, 1024} },
Alan Green86fc9cf2019-08-26 15:02:12 +10008932 .block_erase = spi_block_erase_52,
8933 }, {
8934 .eraseblocks = { {64 * 1024, 512} },
Nico Huber5374dc32019-10-04 16:16:15 +02008935 .block_erase = spi_block_erase_dc,
8936 }, {
8937 .eraseblocks = { {64 * 1024, 512} },
Alan Green86fc9cf2019-08-26 15:02:12 +10008938 .block_erase = spi_block_erase_d8,
8939 }, {
8940 .eraseblocks = { {32 * 1024 * 1024, 1} },
8941 .block_erase = spi_block_erase_60,
8942 }, {
8943 .eraseblocks = { {32 * 1024 * 1024, 1} },
8944 .block_erase = spi_block_erase_c7,
8945 }
8946 },
Nico Huber493a4e02024-10-27 15:15:26 +01008947 .printlock = spi_prettyprint_status_register_bp4_srwd,
8948 .unlock = spi_disable_blockprotect_bp4_srwd,
Alan Green86fc9cf2019-08-26 15:02:12 +10008949 .write = spi_chip_write_256,
8950 .read = spi_chip_read,
8951 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11008952 .reg_bits =
8953 {
Nico Huber493a4e02024-10-27 15:15:26 +01008954 .qe = {STATUS2, 1, RW}, /* GD25B256D: Fixed QE=1 */
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11008955 .srp = {STATUS1, 7, RW},
8956 .srl = {STATUS2, 6, RW},
8957 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8958 .tb = {STATUS1, 6, RW},
8959 },
Nico Huberaabb3e02023-01-13 00:22:30 +01008960 .wp_write_cfg = spi_wp_write_cfg,
8961 .wp_read_cfg = spi_wp_read_cfg,
8962 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11008963 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008964 .prepare_access = spi_prepare_io,
8965 .finish_access = spi_finish_io,
Alan Green86fc9cf2019-08-26 15:02:12 +10008966 },
8967
8968 {
8969 .vendor = "GigaDevice",
Nico Huber493a4e02024-10-27 15:15:26 +01008970 .name = "GD25Q257D/GD25B257D",
8971 .bustype = BUS_SPI,
8972 .manufacture_id = GIGADEVICE_ID,
8973 .model_id = GIGADEVICE_GD25Q256D,
8974 .total_size = 32768,
8975 .page_size = 256,
8976 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
8977 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
8978 .tested = TEST_UNTESTED,
8979 .probe = probe_spi_rdid,
8980 .probe_timing = TIMING_ZERO,
8981 .block_erasers =
8982 {
8983 {
8984 .eraseblocks = { {4 * 1024, 8192} },
8985 .block_erase = spi_block_erase_21,
8986 }, {
8987 .eraseblocks = { {4 * 1024, 8192} },
8988 .block_erase = spi_block_erase_20,
8989 }, {
8990 .eraseblocks = { {32 * 1024, 1024} },
8991 .block_erase = spi_block_erase_5c,
8992 }, {
8993 .eraseblocks = { {32 * 1024, 1024} },
8994 .block_erase = spi_block_erase_52,
8995 }, {
8996 .eraseblocks = { {64 * 1024, 512} },
8997 .block_erase = spi_block_erase_dc,
8998 }, {
8999 .eraseblocks = { {64 * 1024, 512} },
9000 .block_erase = spi_block_erase_d8,
9001 }, {
9002 .eraseblocks = { {32 * 1024 * 1024, 1} },
9003 .block_erase = spi_block_erase_60,
9004 }, {
9005 .eraseblocks = { {32 * 1024 * 1024, 1} },
9006 .block_erase = spi_block_erase_c7,
9007 }
9008 },
9009 .printlock = spi_prettyprint_status_register_bp4_srwd,
9010 .unlock = spi_disable_blockprotect_bp4_srwd,
9011 .write = spi_chip_write_256,
9012 .read = spi_chip_read,
9013 .voltage = {2700, 3600},
9014 .reg_bits =
9015 {
9016 .qe = {STATUS2, 1, RW}, /* GD25B257D: Fixed QE=1 */
9017 .srp = {STATUS1, 7, RW},
9018 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9019 .tb = {STATUS1, 6, RW},
9020 },
9021 .wp_write_cfg = spi_wp_write_cfg,
9022 .wp_read_cfg = spi_wp_read_cfg,
9023 .wp_get_ranges = spi_wp_get_available_ranges,
9024 .decode_range = decode_range_spi25,
9025 .prepare_access = spi_prepare_io,
9026 .finish_access = spi_finish_io,
9027 },
9028
9029 {
9030 .vendor = "GigaDevice",
9031 .name = "GD25Q256E/GD25B256E/GD25R256E",
9032 .bustype = BUS_SPI,
9033 .manufacture_id = GIGADEVICE_ID,
9034 .model_id = GIGADEVICE_GD25Q256D,
9035 .total_size = 32768,
9036 .page_size = 256,
9037 /* Supports full QIO but has non-volatile DC bits. */
9038 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
9039 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ |
9040 FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
9041 .tested = TEST_UNTESTED,
9042 .probe = probe_spi_rdid,
9043 .probe_timing = TIMING_ZERO,
9044 .block_erasers =
9045 {
9046 {
9047 .eraseblocks = { {4 * 1024, 8192} },
9048 .block_erase = spi_block_erase_21,
9049 }, {
9050 .eraseblocks = { {4 * 1024, 8192} },
9051 .block_erase = spi_block_erase_20,
9052 }, {
9053 .eraseblocks = { {32 * 1024, 1024} },
9054 .block_erase = spi_block_erase_5c,
9055 }, {
9056 .eraseblocks = { {32 * 1024, 1024} },
9057 .block_erase = spi_block_erase_52,
9058 }, {
9059 .eraseblocks = { {64 * 1024, 512} },
9060 .block_erase = spi_block_erase_dc,
9061 }, {
9062 .eraseblocks = { {64 * 1024, 512} },
9063 .block_erase = spi_block_erase_d8,
9064 }, {
9065 .eraseblocks = { {32 * 1024 * 1024, 1} },
9066 .block_erase = spi_block_erase_60,
9067 }, {
9068 .eraseblocks = { {32 * 1024 * 1024, 1} },
9069 .block_erase = spi_block_erase_c7,
9070 }
9071 },
9072 .printlock = spi_prettyprint_status_register_bp4_srwd,
9073 .unlock = spi_disable_blockprotect_bp4_srwd,
9074 .write = spi_chip_write_256,
9075 .read = spi_chip_read,
9076 .voltage = {2700, 3600},
9077 .reg_bits =
9078 {
9079 .qe = {STATUS2, 1, RW}, /* GD25B/R: Fixed QE=1 */
9080 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9081 .srp = {STATUS1, 7, RW},
9082 .srl = {STATUS2, 6, RW},
9083 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9084 .tb = {STATUS1, 6, RW},
9085 },
9086 .wp_write_cfg = spi_wp_write_cfg,
9087 .wp_read_cfg = spi_wp_read_cfg,
9088 .wp_get_ranges = spi_wp_get_available_ranges,
9089 .decode_range = decode_range_spi25,
9090 .prepare_access = spi_prepare_io,
9091 .finish_access = spi_finish_io,
9092 },
9093
9094 {
9095 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009096 .name = "GD25Q32(B)",
9097 .bustype = BUS_SPI,
9098 .manufacture_id = GIGADEVICE_ID,
9099 .model_id = GIGADEVICE_GD25Q32,
9100 .total_size = 4096,
9101 .page_size = 256,
9102 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009103 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03009104 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009105 .probe = probe_spi_rdid,
9106 .probe_timing = TIMING_ZERO,
9107 .block_erasers =
9108 {
9109 {
9110 .eraseblocks = { {4 * 1024, 1024} },
9111 .block_erase = spi_block_erase_20,
9112 }, {
9113 .eraseblocks = { {32 * 1024, 128} },
9114 .block_erase = spi_block_erase_52,
9115 }, {
9116 .eraseblocks = { {64 * 1024, 64} },
9117 .block_erase = spi_block_erase_d8,
9118 }, {
9119 .eraseblocks = { {4 * 1024 * 1024, 1} },
9120 .block_erase = spi_block_erase_60,
9121 }, {
9122 .eraseblocks = { {4 * 1024 * 1024, 1} },
9123 .block_erase = spi_block_erase_c7,
9124 }
9125 },
9126 .printlock = spi_prettyprint_status_register_bp4_srwd,
9127 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9128 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009129 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009130 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11009131 .reg_bits =
9132 {
Nico Huber4da971f2024-03-27 01:18:12 +01009133 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11009134 .srp = {STATUS1, 7, RW},
9135 .srl = {STATUS2, 0, RW},
9136 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
9137 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
9138 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
9139 .cmp = {STATUS2, 6, RW},
9140 },
Nico Huberaabb3e02023-01-13 00:22:30 +01009141 .wp_write_cfg = spi_wp_write_cfg,
9142 .wp_read_cfg = spi_wp_read_cfg,
9143 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11009144 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02009145 .prepare_access = spi_prepare_io,
9146 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009147 },
9148
9149 {
9150 .vendor = "GigaDevice",
9151 .name = "GD25Q40(B)",
9152 .bustype = BUS_SPI,
9153 .manufacture_id = GIGADEVICE_ID,
9154 .model_id = GIGADEVICE_GD25Q40,
9155 .total_size = 512,
9156 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01009157 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Simon Buhrow551664c2022-03-09 16:09:08 +01009158 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009159 .probe = probe_spi_rdid,
9160 .probe_timing = TIMING_ZERO,
9161 .block_erasers =
9162 {
9163 {
9164 .eraseblocks = { {4 * 1024, 128} },
9165 .block_erase = spi_block_erase_20,
9166 }, {
9167 .eraseblocks = { {32 * 1024, 16} },
9168 .block_erase = spi_block_erase_52,
9169 }, {
9170 .eraseblocks = { {64 * 1024, 8} },
9171 .block_erase = spi_block_erase_d8,
9172 }, {
9173 .eraseblocks = { {512 * 1024, 1} },
9174 .block_erase = spi_block_erase_60,
9175 }, {
9176 .eraseblocks = { {512 * 1024, 1} },
9177 .block_erase = spi_block_erase_c7,
9178 }
9179 },
Nico Huber4da971f2024-03-27 01:18:12 +01009180 .reg_bits =
9181 {
9182 .qe = {STATUS2, 1, RW},
9183 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009184 .printlock = spi_prettyprint_status_register_bp4_srwd,
9185 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9186 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009187 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009188 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009189 .prepare_access = spi_prepare_io,
9190 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009191 },
9192
9193 {
9194 .vendor = "GigaDevice",
9195 .name = "GD25Q512",
9196 .bustype = BUS_SPI,
9197 .manufacture_id = GIGADEVICE_ID,
9198 .model_id = GIGADEVICE_GD25Q512,
9199 .total_size = 64,
9200 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01009201 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009202 .tested = TEST_OK_PREW,
9203 .probe = probe_spi_rdid,
9204 .probe_timing = TIMING_ZERO,
9205 .block_erasers =
9206 {
9207 {
9208 .eraseblocks = { {4 * 1024, 16} },
9209 .block_erase = spi_block_erase_20,
9210 }, {
9211 .eraseblocks = { {32 * 1024, 2} },
9212 .block_erase = spi_block_erase_52,
9213 }, {
9214 .eraseblocks = { {64 * 1024, 1} },
9215 .block_erase = spi_block_erase_60,
9216 }, {
9217 .eraseblocks = { {64 * 1024, 1} },
9218 .block_erase = spi_block_erase_c7,
9219 }
9220 },
Nico Huber4da971f2024-03-27 01:18:12 +01009221 .reg_bits =
9222 {
9223 .qe = {STATUS2, 1, RW},
9224 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009225 .printlock = spi_prettyprint_status_register_bp4_srwd,
9226 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9227 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009228 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009229 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009230 .prepare_access = spi_prepare_io,
9231 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009232 },
9233
9234 {
9235 .vendor = "GigaDevice",
9236 .name = "GD25Q64(B)",
9237 .bustype = BUS_SPI,
9238 .manufacture_id = GIGADEVICE_ID,
9239 .model_id = GIGADEVICE_GD25Q64,
9240 .total_size = 8192,
9241 .page_size = 256,
9242 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009243 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03009244 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009245 .probe = probe_spi_rdid,
9246 .probe_timing = TIMING_ZERO,
9247 .block_erasers =
9248 {
9249 {
9250 .eraseblocks = { {4 * 1024, 2048} },
9251 .block_erase = spi_block_erase_20,
9252 }, {
9253 .eraseblocks = { {32 * 1024, 256} },
9254 .block_erase = spi_block_erase_52,
9255 }, {
9256 .eraseblocks = { {64 * 1024, 128} },
9257 .block_erase = spi_block_erase_d8,
9258 }, {
9259 .eraseblocks = { {8 * 1024 * 1024, 1} },
9260 .block_erase = spi_block_erase_60,
9261 }, {
9262 .eraseblocks = { {8 * 1024 * 1024, 1} },
9263 .block_erase = spi_block_erase_c7,
9264 }
9265 },
9266 .printlock = spi_prettyprint_status_register_bp4_srwd,
9267 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9268 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009269 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009270 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009271 .reg_bits =
9272 {
Nico Huber4da971f2024-03-27 01:18:12 +01009273 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009274 .srp = {STATUS1, 7, RW},
9275 .srl = {STATUS2, 0, RW},
9276 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
9277 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
9278 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
9279 .cmp = {STATUS2, 6, RW},
9280 },
Nico Huberaabb3e02023-01-13 00:22:30 +01009281 .wp_write_cfg = spi_wp_write_cfg,
9282 .wp_read_cfg = spi_wp_read_cfg,
9283 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009284 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02009285 .prepare_access = spi_prepare_io,
9286 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009287 },
9288
9289 {
9290 .vendor = "GigaDevice",
9291 .name = "GD25Q80(B)",
9292 .bustype = BUS_SPI,
9293 .manufacture_id = GIGADEVICE_ID,
9294 .model_id = GIGADEVICE_GD25Q80,
9295 .total_size = 1024,
9296 .page_size = 256,
9297 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01009298 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009299 .tested = TEST_OK_PREW,
9300 .probe = probe_spi_rdid,
9301 .probe_timing = TIMING_ZERO,
9302 .block_erasers =
9303 {
9304 {
9305 .eraseblocks = { {4 * 1024, 256} },
9306 .block_erase = spi_block_erase_20,
9307 }, {
9308 .eraseblocks = { {32 * 1024, 32} },
9309 .block_erase = spi_block_erase_52,
9310 }, {
9311 .eraseblocks = { {64 * 1024, 16} },
9312 .block_erase = spi_block_erase_d8,
9313 }, {
9314 .eraseblocks = { {1024 * 1024, 1} },
9315 .block_erase = spi_block_erase_60,
9316 }, {
9317 .eraseblocks = { {1024 * 1024, 1} },
9318 .block_erase = spi_block_erase_c7,
9319 }
9320 },
Nico Huber4da971f2024-03-27 01:18:12 +01009321 .reg_bits =
9322 {
9323 .qe = {STATUS2, 1, RW},
9324 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009325 .printlock = spi_prettyprint_status_register_bp4_srwd,
9326 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9327 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009328 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009329 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009330 .prepare_access = spi_prepare_io,
9331 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009332 },
9333
9334 {
9335 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009336 .name = "GD25B512ME/GD25R512ME",
9337 .bustype = BUS_SPI,
9338 .manufacture_id = GIGADEVICE_ID,
9339 .model_id = GIGADEVICE_GD25B512ME,
9340 .total_size = 65536,
9341 .page_size = 256,
9342 /* Supports QPI_38, but with non-volatile DC bits
9343 (which probably also affect QIO (0xeb) in SPI mode). */
9344 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9345 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9346 .tested = TEST_UNTESTED,
9347 .probe = probe_spi_rdid,
9348 .probe_timing = TIMING_ZERO,
9349 .block_erasers =
9350 {
9351 {
9352 .eraseblocks = { {4 * 1024, 16384} },
9353 .block_erase = spi_block_erase_21,
9354 }, {
9355 .eraseblocks = { {4 * 1024, 16384} },
9356 .block_erase = spi_block_erase_20,
9357 }, {
9358 .eraseblocks = { {32 * 1024, 2048} },
9359 .block_erase = spi_block_erase_5c,
9360 }, {
9361 .eraseblocks = { {32 * 1024, 2048} },
9362 .block_erase = spi_block_erase_52,
9363 }, {
9364 .eraseblocks = { {64 * 1024, 1024} },
9365 .block_erase = spi_block_erase_dc,
9366 }, {
9367 .eraseblocks = { {64 * 1024, 1024} },
9368 .block_erase = spi_block_erase_d8,
9369 }, {
9370 .eraseblocks = { {65536 * 1024, 1} },
9371 .block_erase = spi_block_erase_60,
9372 }, {
9373 .eraseblocks = { {65536 * 1024, 1} },
9374 .block_erase = spi_block_erase_c7,
9375 }
9376 },
9377 /* Has WPS bit in unsupported register. */
9378 .printlock = spi_prettyprint_status_register_bp4_srwd,
9379 .unlock = spi_disable_blockprotect_bp4_srwd,
9380 .write = spi_chip_write_256,
9381 .read = spi_chip_read,
9382 .voltage = {2700, 3600},
9383 .wp_write_cfg = spi_wp_write_cfg,
9384 .wp_read_cfg = spi_wp_read_cfg,
9385 .wp_get_ranges = spi_wp_get_available_ranges,
9386 .decode_range = decode_range_spi25,
9387 .prepare_access = spi_prepare_io,
9388 .finish_access = spi_finish_io,
9389 },
9390
9391 {
9392 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009393 .name = "GD25B512MF/GD25R512MF",
9394 .bustype = BUS_SPI,
9395 .manufacture_id = GIGADEVICE_ID,
9396 .model_id = GIGADEVICE_GD25B512MF,
9397 .total_size = 65536,
9398 .page_size = 256,
9399 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9400 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9401 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9402 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9403 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9404 .tested = TEST_UNTESTED,
9405 .probe = probe_spi_rdid,
9406 .probe_timing = TIMING_ZERO,
9407 .block_erasers =
9408 {
9409 {
9410 .eraseblocks = { {4 * 1024, 16384} },
9411 .block_erase = spi_block_erase_21,
9412 }, {
9413 .eraseblocks = { {4 * 1024, 16384} },
9414 .block_erase = spi_block_erase_20,
9415 }, {
9416 .eraseblocks = { {32 * 1024, 2048} },
9417 .block_erase = spi_block_erase_5c,
9418 }, {
9419 .eraseblocks = { {32 * 1024, 2048} },
9420 .block_erase = spi_block_erase_52,
9421 }, {
9422 .eraseblocks = { {64 * 1024, 1024} },
9423 .block_erase = spi_block_erase_dc,
9424 }, {
9425 .eraseblocks = { {64 * 1024, 1024} },
9426 .block_erase = spi_block_erase_d8,
9427 }, {
9428 .eraseblocks = { {65536 * 1024, 1} },
9429 .block_erase = spi_block_erase_60,
9430 }, {
9431 .eraseblocks = { {65536 * 1024, 1} },
9432 .block_erase = spi_block_erase_c7,
9433 }
9434 },
9435 .printlock = spi_prettyprint_status_register_bp4_srwd,
9436 .unlock = spi_disable_blockprotect_bp4_srwd,
9437 .write = spi_chip_write_256,
9438 .read = spi_chip_read,
9439 .voltage = {2700, 3600},
9440 .reg_bits =
9441 {
9442 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
9443 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9444 .srp = {STATUS1, 7, RW},
9445 .srl = {STATUS2, 6, RW},
9446 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9447 .tb = {STATUS1, 6, RW},
9448 .cmp = {STATUS3, 3, RW},
9449 },
9450 .wp_write_cfg = spi_wp_write_cfg,
9451 .wp_read_cfg = spi_wp_read_cfg,
9452 .wp_get_ranges = spi_wp_get_available_ranges,
9453 .decode_range = decode_range_spi25,
9454 .prepare_access = spi_prepare_io,
9455 .finish_access = spi_finish_io,
9456 },
9457
9458 {
9459 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009460 .name = "GD55B01GE",
9461 .bustype = BUS_SPI,
9462 .manufacture_id = GIGADEVICE_ID,
9463 .model_id = GIGADEVICE_GD55B01GE,
9464 .total_size = 128 * 1024,
9465 .page_size = 256,
9466 /* Supports QPI_38, but with non-volatile DC bits
9467 (which probably also affect QIO (0xeb) in SPI mode). */
9468 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9469 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9470 .tested = TEST_UNTESTED,
9471 .probe = probe_spi_rdid,
9472 .probe_timing = TIMING_ZERO,
9473 .block_erasers =
9474 {
9475 {
9476 .eraseblocks = { {4 * 1024, 32768} },
9477 .block_erase = spi_block_erase_21,
9478 }, {
9479 .eraseblocks = { {4 * 1024, 32768} },
9480 .block_erase = spi_block_erase_20,
9481 }, {
9482 .eraseblocks = { {32 * 1024, 4096} },
9483 .block_erase = spi_block_erase_5c,
9484 }, {
9485 .eraseblocks = { {32 * 1024, 4096} },
9486 .block_erase = spi_block_erase_52,
9487 }, {
9488 .eraseblocks = { {64 * 1024, 2048} },
9489 .block_erase = spi_block_erase_dc,
9490 }, {
9491 .eraseblocks = { {64 * 1024, 2048} },
9492 .block_erase = spi_block_erase_d8,
9493 }, {
9494 .eraseblocks = { {128 * 1024 * 1024, 1} },
9495 .block_erase = spi_block_erase_60,
9496 }, {
9497 .eraseblocks = { {128 * 1024 * 1024, 1} },
9498 .block_erase = spi_block_erase_c7,
9499 }
9500 },
9501 /* Has WPS bit in unsupported register. */
9502 .printlock = spi_prettyprint_status_register_bp4_srwd,
9503 .unlock = spi_disable_blockprotect_bp4_srwd,
9504 .write = spi_chip_write_256,
9505 .read = spi_chip_read,
9506 .voltage = {2700, 3600},
9507 .wp_write_cfg = spi_wp_write_cfg,
9508 .wp_read_cfg = spi_wp_read_cfg,
9509 .wp_get_ranges = spi_wp_get_available_ranges,
9510 .decode_range = decode_range_spi25,
9511 .prepare_access = spi_prepare_io,
9512 .finish_access = spi_finish_io,
9513 },
9514
9515 {
9516 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009517 .name = "GD55B01GF",
9518 .bustype = BUS_SPI,
9519 .manufacture_id = GIGADEVICE_ID,
9520 .model_id = GIGADEVICE_GD55B01GF,
9521 .total_size = 128 * 1024,
9522 .page_size = 256,
9523 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9524 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9525 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9526 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9527 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9528 .tested = TEST_UNTESTED,
9529 .probe = probe_spi_rdid,
9530 .probe_timing = TIMING_ZERO,
9531 .block_erasers =
9532 {
9533 {
9534 .eraseblocks = { {4 * 1024, 32768} },
9535 .block_erase = spi_block_erase_21,
9536 }, {
9537 .eraseblocks = { {4 * 1024, 32768} },
9538 .block_erase = spi_block_erase_20,
9539 }, {
9540 .eraseblocks = { {32 * 1024, 4096} },
9541 .block_erase = spi_block_erase_5c,
9542 }, {
9543 .eraseblocks = { {32 * 1024, 4096} },
9544 .block_erase = spi_block_erase_52,
9545 }, {
9546 .eraseblocks = { {64 * 1024, 2048} },
9547 .block_erase = spi_block_erase_dc,
9548 }, {
9549 .eraseblocks = { {64 * 1024, 2048} },
9550 .block_erase = spi_block_erase_d8,
9551 }, {
9552 .eraseblocks = { {128 * 1024 * 1024, 1} },
9553 .block_erase = spi_block_erase_60,
9554 }, {
9555 .eraseblocks = { {128 * 1024 * 1024, 1} },
9556 .block_erase = spi_block_erase_c7,
9557 }
9558 },
9559 .printlock = spi_prettyprint_status_register_bp4_srwd,
9560 .unlock = spi_disable_blockprotect_bp4_srwd,
9561 .write = spi_chip_write_256,
9562 .read = spi_chip_read,
9563 .voltage = {2700, 3600},
9564 .reg_bits =
9565 {
9566 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
9567 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9568 .srp = {STATUS1, 7, RW},
9569 .srl = {STATUS2, 6, RW},
9570 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9571 .tb = {STATUS1, 6, RW},
9572 .cmp = {STATUS3, 3, RW},
9573 },
9574 .wp_write_cfg = spi_wp_write_cfg,
9575 .wp_read_cfg = spi_wp_read_cfg,
9576 .wp_get_ranges = spi_wp_get_available_ranges,
9577 .decode_range = decode_range_spi25,
9578 .prepare_access = spi_prepare_io,
9579 .finish_access = spi_finish_io,
9580 },
9581
9582 {
9583 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009584 .name = "GD55B02GE",
9585 .bustype = BUS_SPI,
9586 .manufacture_id = GIGADEVICE_ID,
9587 .model_id = GIGADEVICE_GD55B02GE,
9588 .total_size = 256 * 1024,
9589 .page_size = 256,
9590 /* Supports QPI_38, but with non-volatile DC bits
9591 (which probably also affect QIO (0xeb) in SPI mode). */
9592 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9593 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9594 .tested = TEST_UNTESTED,
9595 .probe = probe_spi_rdid,
9596 .probe_timing = TIMING_ZERO,
9597 .block_erasers =
9598 {
9599 {
9600 .eraseblocks = { {4 * 1024, 65536} },
9601 .block_erase = spi_block_erase_21,
9602 }, {
9603 .eraseblocks = { {4 * 1024, 65536} },
9604 .block_erase = spi_block_erase_20,
9605 }, {
9606 .eraseblocks = { {32 * 1024, 8192} },
9607 .block_erase = spi_block_erase_5c,
9608 }, {
9609 .eraseblocks = { {32 * 1024, 8192} },
9610 .block_erase = spi_block_erase_52,
9611 }, {
9612 .eraseblocks = { {64 * 1024, 4096} },
9613 .block_erase = spi_block_erase_dc,
9614 }, {
9615 .eraseblocks = { {64 * 1024, 4096} },
9616 .block_erase = spi_block_erase_d8,
9617 }, {
9618 .eraseblocks = { {256 * 1024 * 1024, 1} },
9619 .block_erase = spi_block_erase_60,
9620 }, {
9621 .eraseblocks = { {256 * 1024 * 1024, 1} },
9622 .block_erase = spi_block_erase_c7,
9623 }
9624 },
9625 /* Has WPS bit in unsupported register. */
9626 .printlock = spi_prettyprint_status_register_bp4_srwd,
9627 .unlock = spi_disable_blockprotect_bp4_srwd,
9628 .write = spi_chip_write_256,
9629 .read = spi_chip_read,
9630 .voltage = {2700, 3600},
9631 .wp_write_cfg = spi_wp_write_cfg,
9632 .wp_read_cfg = spi_wp_read_cfg,
9633 .wp_get_ranges = spi_wp_get_available_ranges,
9634 .decode_range = decode_range_spi25,
9635 .prepare_access = spi_prepare_io,
9636 .finish_access = spi_finish_io,
9637 },
9638
9639 {
9640 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009641 .name = "GD55B02GF",
9642 .bustype = BUS_SPI,
9643 .manufacture_id = GIGADEVICE_ID,
9644 .model_id = GIGADEVICE_GD55B02GF,
9645 .total_size = 256 * 1024,
9646 .page_size = 256,
9647 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9648 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9649 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9650 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9651 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9652 .tested = TEST_UNTESTED,
9653 .probe = probe_spi_rdid,
9654 .probe_timing = TIMING_ZERO,
9655 .block_erasers =
9656 {
9657 {
9658 .eraseblocks = { {4 * 1024, 65536} },
9659 .block_erase = spi_block_erase_21,
9660 }, {
9661 .eraseblocks = { {4 * 1024, 65536} },
9662 .block_erase = spi_block_erase_20,
9663 }, {
9664 .eraseblocks = { {32 * 1024, 8192} },
9665 .block_erase = spi_block_erase_5c,
9666 }, {
9667 .eraseblocks = { {32 * 1024, 8192} },
9668 .block_erase = spi_block_erase_52,
9669 }, {
9670 .eraseblocks = { {64 * 1024, 4096} },
9671 .block_erase = spi_block_erase_dc,
9672 }, {
9673 .eraseblocks = { {64 * 1024, 4096} },
9674 .block_erase = spi_block_erase_d8,
9675 }, {
9676 .eraseblocks = { {256 * 1024 * 1024, 1} },
9677 .block_erase = spi_block_erase_60,
9678 }, {
9679 .eraseblocks = { {256 * 1024 * 1024, 1} },
9680 .block_erase = spi_block_erase_c7,
9681 }
9682 },
9683 .printlock = spi_prettyprint_status_register_bp4_srwd,
9684 .unlock = spi_disable_blockprotect_bp4_srwd,
9685 .write = spi_chip_write_256,
9686 .read = spi_chip_read,
9687 .voltage = {2700, 3600},
9688 .reg_bits =
9689 {
9690 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
9691 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9692 .srp = {STATUS1, 7, RW},
9693 .srl = {STATUS2, 6, RW},
9694 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9695 .tb = {STATUS1, 6, RW},
9696 .cmp = {STATUS3, 3, RW},
9697 },
9698 .wp_write_cfg = spi_wp_write_cfg,
9699 .wp_read_cfg = spi_wp_read_cfg,
9700 .wp_get_ranges = spi_wp_get_available_ranges,
9701 .decode_range = decode_range_spi25,
9702 .prepare_access = spi_prepare_io,
9703 .finish_access = spi_finish_io,
9704 },
9705
9706 {
9707 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00009708 .name = "GD25T80",
9709 .bustype = BUS_SPI,
9710 .manufacture_id = GIGADEVICE_ID,
9711 .model_id = GIGADEVICE_GD25T80,
9712 .total_size = 1024,
9713 .page_size = 256,
9714 /* OTP: 256B total; enter 0x3A */
9715 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
9716 .tested = TEST_UNTESTED,
9717 .probe = probe_spi_rdid,
9718 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10009719 .block_erasers =
9720 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00009721 {
9722 .eraseblocks = { {4 * 1024, 256} },
9723 .block_erase = spi_block_erase_20,
9724 }, {
9725 .eraseblocks = { {64 * 1024, 16} },
9726 .block_erase = spi_block_erase_52,
9727 }, {
9728 .eraseblocks = { {64 * 1024, 16} },
9729 .block_erase = spi_block_erase_d8,
9730 }, {
9731 .eraseblocks = { {1024 * 1024, 1} },
9732 .block_erase = spi_block_erase_60,
9733 }, {
9734 .eraseblocks = { {1024 * 1024, 1} },
9735 .block_erase = spi_block_erase_c7,
9736 }
9737 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00009738 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Justin Chevrier1525b2a2012-04-14 21:59:23 +00009739 .unlock = spi_disable_blockprotect,
9740 .write = spi_chip_write_256,
9741 .read = spi_chip_read,
Stefan Tauner352e50b2013-02-22 15:58:45 +00009742 .voltage = {2700, 3600},
Justin Chevrier1525b2a2012-04-14 21:59:23 +00009743 },
9744
9745 {
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009746 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009747 .name = "GD25VQ16C",
9748 .bustype = BUS_SPI,
9749 .manufacture_id = GIGADEVICE_ID,
9750 .model_id = GIGADEVICE_GD25VQ16C,
9751 .total_size = 2 * 1024,
9752 .page_size = 256,
9753 /* Supports SFDP */
9754 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009755 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009756 .tested = TEST_UNTESTED,
9757 .probe = probe_spi_rdid,
9758 .probe_timing = TIMING_ZERO,
9759 .block_erasers =
9760 {
9761 {
9762 .eraseblocks = { { 4 * 1024, 512} },
9763 .block_erase = spi_block_erase_20,
9764 }, {
9765 .eraseblocks = { { 32 * 1024, 64} },
9766 .block_erase = spi_block_erase_52,
9767 }, {
9768 .eraseblocks = { { 64 * 1024, 32} },
9769 .block_erase = spi_block_erase_d8,
9770 }, {
9771 .eraseblocks = { {2 * 1024 * 1024, 1} },
9772 .block_erase = spi_block_erase_60,
9773 }, {
9774 .eraseblocks = { {2 * 1024 * 1024, 1} },
9775 .block_erase = spi_block_erase_c7,
9776 }
9777 },
Nico Huber4da971f2024-03-27 01:18:12 +01009778 .reg_bits =
9779 {
9780 .qe = {STATUS2, 1, RW},
9781 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009782 .printlock = spi_prettyprint_status_register_bp4_srwd,
9783 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9784 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009785 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009786 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009787 .prepare_access = spi_prepare_io,
9788 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009789 },
9790
9791 {
9792 .vendor = "GigaDevice",
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009793 .name = "GD25VQ21B",
9794 .bustype = BUS_SPI,
9795 .manufacture_id = GIGADEVICE_ID,
9796 .model_id = GIGADEVICE_GD25VQ21B,
9797 .total_size = 256,
9798 .page_size = 256,
9799 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009800 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
9801 FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009802 .tested = TEST_UNTESTED,
9803 .probe = probe_spi_rdid,
9804 .probe_timing = TIMING_ZERO,
9805 .block_erasers =
9806 {
9807 {
9808 .eraseblocks = { { 4 * 1024, 64} },
9809 .block_erase = spi_block_erase_20,
9810 }, {
9811 .eraseblocks = { { 32 * 1024, 8} },
9812 .block_erase = spi_block_erase_52,
9813 }, {
9814 .eraseblocks = { { 64 * 1024, 4} },
9815 .block_erase = spi_block_erase_d8,
9816 }, {
9817 .eraseblocks = { {256 * 1024, 1} },
9818 .block_erase = spi_block_erase_60,
9819 }, {
9820 .eraseblocks = { {256 * 1024, 1} },
9821 .block_erase = spi_block_erase_c7,
9822 }
9823 },
Nico Huber4da971f2024-03-27 01:18:12 +01009824 .reg_bits =
9825 {
9826 .qe = {STATUS2, 1, RW},
9827 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009828 .printlock = spi_prettyprint_status_register_bp4_srwd,
9829 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9830 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009831 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009832 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009833 .prepare_access = spi_prepare_io,
9834 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009835 },
9836
9837 {
9838 .vendor = "GigaDevice",
9839 .name = "GD25VQ40C",
9840 .bustype = BUS_SPI,
9841 .manufacture_id = GIGADEVICE_ID,
9842 .model_id = GIGADEVICE_GD25VQ41B,
9843 .total_size = 512,
9844 .page_size = 256,
9845 /* Supports SFDP */
9846 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009847 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009848 .tested = TEST_UNTESTED,
9849 .probe = probe_spi_rdid,
9850 .probe_timing = TIMING_ZERO,
9851 .block_erasers =
9852 {
9853 {
9854 .eraseblocks = { { 4 * 1024, 128} },
9855 .block_erase = spi_block_erase_20,
9856 }, {
9857 .eraseblocks = { { 32 * 1024, 16} },
9858 .block_erase = spi_block_erase_52,
9859 }, {
9860 .eraseblocks = { { 64 * 1024, 8} },
9861 .block_erase = spi_block_erase_d8,
9862 }, {
9863 .eraseblocks = { {512 * 1024, 1} },
9864 .block_erase = spi_block_erase_60,
9865 }, {
9866 .eraseblocks = { {512 * 1024, 1} },
9867 .block_erase = spi_block_erase_c7,
9868 }
9869 },
Nico Huber4da971f2024-03-27 01:18:12 +01009870 .reg_bits =
9871 {
9872 .qe = {STATUS2, 1, RW},
9873 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009874 .printlock = spi_prettyprint_status_register_bp4_srwd,
9875 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9876 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009877 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009878 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009879 .prepare_access = spi_prepare_io,
9880 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009881 },
9882
9883 {
9884 .vendor = "GigaDevice",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009885 .name = "GD25VQ41B",
9886 .bustype = BUS_SPI,
9887 .manufacture_id = GIGADEVICE_ID,
9888 .model_id = GIGADEVICE_GD25VQ41B,
9889 .total_size = 512,
9890 .page_size = 256,
9891 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009892 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
9893 FEATURE_OTP | FEATURE_QIO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00009894 .tested = TEST_OK_PREW,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009895 .probe = probe_spi_rdid,
9896 .probe_timing = TIMING_ZERO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00009897 .block_erasers =
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009898 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00009899 {
9900 .eraseblocks = { { 4 * 1024, 128} },
9901 .block_erase = spi_block_erase_20,
9902 }, {
9903 .eraseblocks = { { 32 * 1024, 16} },
9904 .block_erase = spi_block_erase_52,
9905 }, {
9906 .eraseblocks = { { 64 * 1024, 8} },
9907 .block_erase = spi_block_erase_d8,
9908 }, {
9909 .eraseblocks = { {512 * 1024, 1} },
9910 .block_erase = spi_block_erase_60,
9911 }, {
9912 .eraseblocks = { {512 * 1024, 1} },
9913 .block_erase = spi_block_erase_c7,
9914 }
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009915 },
Nico Huber4da971f2024-03-27 01:18:12 +01009916 .reg_bits =
9917 {
9918 .qe = {STATUS2, 1, RW},
9919 },
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009920 .printlock = spi_prettyprint_status_register_bp4_srwd,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009921 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9922 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009923 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009924 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009925 .prepare_access = spi_prepare_io,
9926 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009927 },
9928
9929 {
9930 .vendor = "GigaDevice",
9931 .name = "GD25VQ80C",
9932 .bustype = BUS_SPI,
9933 .manufacture_id = GIGADEVICE_ID,
9934 .model_id = GIGADEVICE_GD25VQ80C,
9935 .total_size = 1024,
9936 .page_size = 256,
9937 /* Supports SFDP */
9938 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009939 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009940 .tested = TEST_UNTESTED,
9941 .probe = probe_spi_rdid,
9942 .probe_timing = TIMING_ZERO,
9943 .block_erasers =
9944 {
9945 {
9946 .eraseblocks = { { 4 * 1024, 256} },
9947 .block_erase = spi_block_erase_20,
9948 }, {
9949 .eraseblocks = { { 32 * 1024, 32} },
9950 .block_erase = spi_block_erase_52,
9951 }, {
9952 .eraseblocks = { { 64 * 1024, 16} },
9953 .block_erase = spi_block_erase_d8,
9954 }, {
9955 .eraseblocks = { {1024 * 1024, 1} },
9956 .block_erase = spi_block_erase_60,
9957 }, {
9958 .eraseblocks = { {1024 * 1024, 1} },
9959 .block_erase = spi_block_erase_c7,
9960 }
9961 },
Nico Huber4da971f2024-03-27 01:18:12 +01009962 .reg_bits =
9963 {
9964 .qe = {STATUS2, 1, RW},
9965 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009966 .printlock = spi_prettyprint_status_register_bp4_srwd,
9967 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9968 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009969 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009970 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009971 .prepare_access = spi_prepare_io,
9972 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009973 },
9974
9975 {
Dino Li3214f582020-03-25 17:39:53 +08009976 .vendor = "GigaDevice",
9977 .name = "GD25WQ80E",
9978 .bustype = BUS_SPI,
9979 .manufacture_id = GIGADEVICE_ID,
9980 .model_id = GIGADEVICE_GD25WQ80E,
9981 .total_size = 1024,
9982 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01009983 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Dino Li3214f582020-03-25 17:39:53 +08009984 .tested = TEST_OK_PREW,
9985 .probe = probe_spi_rdid,
9986 .probe_timing = TIMING_ZERO,
9987 .block_erasers =
9988 {
9989 {
9990 .eraseblocks = { {4 * 1024, 256} },
9991 .block_erase = spi_block_erase_20,
9992 }, {
9993 .eraseblocks = { {32 * 1024, 32} },
9994 .block_erase = spi_block_erase_52,
9995 }, {
9996 .eraseblocks = { {64 * 1024, 16} },
9997 .block_erase = spi_block_erase_d8,
9998 }, {
9999 .eraseblocks = { {1 * 1024 * 1024, 1} },
10000 .block_erase = spi_block_erase_60,
10001 }, {
10002 .eraseblocks = { {1 * 1024 * 1024, 1} },
10003 .block_erase = spi_block_erase_c7,
10004 }
10005 },
Nico Huber4da971f2024-03-27 01:18:12 +010010006 .reg_bits =
10007 {
10008 .qe = {STATUS2, 1, RW},
10009 },
Dino Li3214f582020-03-25 17:39:53 +080010010 .printlock = spi_prettyprint_status_register_bp4_srwd,
10011 .unlock = spi_disable_blockprotect_bp4_srwd,
10012 .write = spi_chip_write_256,
10013 .read = spi_chip_read,
10014 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010015 .prepare_access = spi_prepare_io,
10016 .finish_access = spi_finish_io,
Dino Li3214f582020-03-25 17:39:53 +080010017 },
10018
10019 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010020 .vendor = "Hyundai",
10021 .name = "HY29F002B",
10022 .bustype = BUS_PARALLEL,
10023 .manufacture_id = HYUNDAI_ID,
10024 .model_id = HYUNDAI_HY29F002B,
10025 .total_size = 256,
10026 .page_size = 256 * 1024,
10027 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Hatim Kanchwalad0595352016-03-06 14:33:49 +000010028 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010029 .probe = probe_jedec,
10030 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalad0595352016-03-06 14:33:49 +000010031 .block_erasers =
10032 {
10033 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010034 .eraseblocks = {
10035 {16 * 1024, 1},
10036 {8 * 1024, 2},
10037 {32 * 1024, 1},
10038 {64 * 1024, 3},
10039 },
10040 .block_erase = erase_sector_jedec,
Hatim Kanchwalad0595352016-03-06 14:33:49 +000010041 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010042 .eraseblocks = { {256 * 1024, 1} },
10043 .block_erase = erase_chip_block_jedec,
10044 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +000010045 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010046 .write = write_jedec_1,
10047 .read = read_memmapped,
10048 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010010049 .prepare_access = prepare_memory_access,
10050 .finish_access = finish_memory_access,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +000010051 },
10052
10053 {
David Borgc96a8bd2010-06-21 16:12:22 +000010054 .vendor = "Hyundai",
10055 .name = "HY29F002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010056 .bustype = BUS_PARALLEL,
David Borgc96a8bd2010-06-21 16:12:22 +000010057 .manufacture_id = HYUNDAI_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010058 .model_id = HYUNDAI_HY29F002T,
David Borgc96a8bd2010-06-21 16:12:22 +000010059 .total_size = 256,
10060 .page_size = 256 * 1024,
10061 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000010062 .tested = TEST_OK_PRE,
David Borgc96a8bd2010-06-21 16:12:22 +000010063 .probe = probe_jedec,
10064 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10065 .block_erasers =
10066 {
10067 {
10068 .eraseblocks = {
10069 {64 * 1024, 3},
10070 {32 * 1024, 1},
10071 {8 * 1024, 2},
10072 {16 * 1024, 1},
10073 },
10074 .block_erase = erase_sector_jedec,
10075 }, {
10076 .eraseblocks = { {256 * 1024, 1} },
10077 .block_erase = erase_chip_block_jedec,
10078 },
10079 },
10080 .write = write_jedec_1,
10081 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000010082 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010010083 .prepare_access = prepare_memory_access,
10084 .finish_access = finish_memory_access,
David Borgc96a8bd2010-06-21 16:12:22 +000010085 },
10086
10087 {
10088 .vendor = "Hyundai",
Joshua Roysf1324e02010-09-16 00:51:51 +000010089 .name = "HY29F040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010090 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +000010091 .manufacture_id = HYUNDAI_ID,
10092 .model_id = HYUNDAI_HY29F040A,
10093 .total_size = 512,
10094 .page_size = 64 * 1024,
10095 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
10096 .tested = TEST_UNTESTED,
10097 .probe = probe_jedec,
10098 .probe_timing = TIMING_ZERO,
10099 .block_erasers =
10100 {
10101 {
10102 .eraseblocks = { {64 * 1024, 8} },
10103 .block_erase = erase_sector_jedec,
10104 }, {
10105 .eraseblocks = { {512 * 1024, 1} },
10106 .block_erase = erase_chip_block_jedec,
10107 },
10108 },
10109 .write = write_jedec_1,
10110 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000010111 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010112 .prepare_access = prepare_memory_access,
10113 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +000010114 },
10115
10116 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010117 .vendor = "ISSI",
Angel Pons2ef47f32018-09-30 16:47:30 +020010118 .name = "IS25LP064",
10119 .bustype = BUS_SPI,
10120 .manufacture_id = ISSI_ID_SPI,
10121 .model_id = ISSI_IS25LP064,
10122 .total_size = 8192,
10123 .page_size = 256,
10124 /* OTP: 1024B total; read 0x48; write 0x42 */
10125 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Simon Buhrow9bf829d2021-10-20 17:09:09 +020010126 .tested = TEST_OK_PREW,
Angel Pons2ef47f32018-09-30 16:47:30 +020010127 .probe = probe_spi_rdid,
10128 .probe_timing = TIMING_ZERO,
10129 .block_erasers =
10130 {
10131 {
10132 .eraseblocks = { {4 * 1024, 2048} },
10133 .block_erase = spi_block_erase_20,
10134 }, {
10135 .eraseblocks = { {4 * 1024, 2048} },
10136 .block_erase = spi_block_erase_d7,
10137 }, {
10138 .eraseblocks = { {32 * 1024, 256} },
10139 .block_erase = spi_block_erase_52,
10140 }, {
10141 .eraseblocks = { {64 * 1024, 128} },
10142 .block_erase = spi_block_erase_d8,
10143 }, {
10144 .eraseblocks = { {8 * 1024 * 1024, 1} },
10145 .block_erase = spi_block_erase_60,
10146 }, {
10147 .eraseblocks = { {8 * 1024 * 1024, 1} },
10148 .block_erase = spi_block_erase_c7,
10149 }
10150 },
10151 .unlock = spi_disable_blockprotect,
10152 .write = spi_chip_write_256,
10153 .read = spi_chip_read,
10154 .voltage = {2300, 3600},
10155 },
10156
10157 {
10158 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -070010159 .name = "IS25LP128",
10160 .bustype = BUS_SPI,
10161 .manufacture_id = ISSI_ID_SPI,
10162 .model_id = ISSI_IS25LP128,
10163 .total_size = 16384,
10164 .page_size = 256,
10165 /* OTP: 1024B total; read 0x48; write 0x42 */
10166 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10167 .tested = TEST_OK_PREW,
10168 .probe = probe_spi_rdid,
10169 .probe_timing = TIMING_ZERO,
10170 .block_erasers =
10171 {
10172 {
10173 .eraseblocks = { {4 * 1024, 4096} },
10174 .block_erase = spi_block_erase_20,
10175 }, {
10176 .eraseblocks = { {4 * 1024, 4096} },
10177 .block_erase = spi_block_erase_d7,
10178 }, {
10179 .eraseblocks = { {32 * 1024, 512} },
10180 .block_erase = spi_block_erase_52,
10181 }, {
10182 .eraseblocks = { {64 * 1024, 256} },
10183 .block_erase = spi_block_erase_d8,
10184 }, {
10185 .eraseblocks = { {16 * 1024 * 1024, 1} },
10186 .block_erase = spi_block_erase_60,
10187 }, {
10188 .eraseblocks = { {16 * 1024 * 1024, 1} },
10189 .block_erase = spi_block_erase_c7,
10190 }
10191 },
10192 .unlock = spi_disable_blockprotect,
10193 .write = spi_chip_write_256,
10194 .read = spi_chip_read,
10195 .voltage = {2300, 3600},
10196 },
10197
10198 {
10199 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +000010200 .name = "IS25LP256",
10201 .bustype = BUS_SPI,
10202 .manufacture_id = ISSI_ID_SPI,
10203 .model_id = ISSI_IS25LP256,
10204 .total_size = 32768,
10205 .page_size = 256,
10206 /* supports SFDP */
10207 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +020010208 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
10209 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +000010210 .tested = TEST_OK_PREW,
10211 .probe = probe_spi_rdid,
10212 .probe_timing = TIMING_ZERO,
10213 .block_erasers =
10214 {
10215 {
10216 .eraseblocks = { {4 * 1024, 8192} },
10217 .block_erase = spi_block_erase_21,
10218 }, {
10219 .eraseblocks = { {4 * 1024, 8192} },
10220 .block_erase = spi_block_erase_20,
10221 /* could also use spi_block_erase_d7 */
10222 }, {
10223 .eraseblocks = { {32 * 1024, 1024} },
10224 .block_erase = spi_block_erase_5c,
10225 }, {
10226 .eraseblocks = { {32 * 1024, 1024} },
10227 .block_erase = spi_block_erase_52,
10228 }, {
10229 .eraseblocks = { {64 * 1024, 512} },
10230 .block_erase = spi_block_erase_dc,
10231 }, {
10232 .eraseblocks = { {64 * 1024, 512} },
10233 .block_erase = spi_block_erase_d8,
10234 }, {
10235 .eraseblocks = { {32 * 1024 * 1024, 1} },
10236 .block_erase = spi_block_erase_60,
10237 }, {
10238 .eraseblocks = { {32 * 1024 * 1024, 1} },
10239 .block_erase = spi_block_erase_c7,
10240 }
10241 },
10242 .unlock = spi_disable_blockprotect,
10243 .write = spi_chip_write_256,
10244 .read = spi_chip_read,
10245 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010246 .prepare_access = spi_prepare_io,
10247 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +000010248 },
10249
10250 {
10251 .vendor = "ISSI",
Nico Huberb27b8d12018-10-02 20:46:21 +020010252 .name = "IS25WP032",
10253 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100010254 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +020010255 .model_id = ISSI_IS25WP032,
10256 .total_size = 4096,
10257 .page_size = 256,
10258 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010259 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
10260 dummy cycles; non-volatile read parameters, so disable for now */
10261 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +020010262 .tested = TEST_UNTESTED,
10263 .probe = probe_spi_rdid,
10264 .probe_timing = TIMING_ZERO,
10265 .block_erasers =
10266 {
10267 {
10268 .eraseblocks = { {4 * 1024, 1024} },
10269 .block_erase = spi_block_erase_20,
10270 }, {
10271 .eraseblocks = { {4 * 1024, 1024} },
10272 .block_erase = spi_block_erase_d7,
10273 }, {
10274 .eraseblocks = { {32 * 1024, 128} },
10275 .block_erase = spi_block_erase_52,
10276 }, {
10277 .eraseblocks = { {64 * 1024, 64} },
10278 .block_erase = spi_block_erase_d8,
10279 }, {
10280 .eraseblocks = { {4 * 1024 * 1024, 1} },
10281 .block_erase = spi_block_erase_60,
10282 }, {
10283 .eraseblocks = { {4 * 1024 * 1024, 1} },
10284 .block_erase = spi_block_erase_c7,
10285 }
10286 },
10287 .unlock = spi_disable_blockprotect,
10288 .write = spi_chip_write_256,
10289 .read = spi_chip_read,
10290 .voltage = {1650, 1950},
10291 },
10292
10293 {
10294 .vendor = "ISSI",
10295 .name = "IS25WP064",
10296 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100010297 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +020010298 .model_id = ISSI_IS25WP064,
10299 .total_size = 8192,
10300 .page_size = 256,
10301 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010302 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
10303 dummy cycles; non-volatile read parameters, so disable for now */
10304 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +020010305 .tested = TEST_OK_PREW,
10306 .probe = probe_spi_rdid,
10307 .probe_timing = TIMING_ZERO,
10308 .block_erasers =
10309 {
10310 {
10311 .eraseblocks = { {4 * 1024, 2048} },
10312 .block_erase = spi_block_erase_20,
10313 }, {
10314 .eraseblocks = { {4 * 1024, 2048} },
10315 .block_erase = spi_block_erase_d7,
10316 }, {
10317 .eraseblocks = { {32 * 1024, 256} },
10318 .block_erase = spi_block_erase_52,
10319 }, {
10320 .eraseblocks = { {64 * 1024, 128} },
10321 .block_erase = spi_block_erase_d8,
10322 }, {
10323 .eraseblocks = { {8 * 1024 * 1024, 1} },
10324 .block_erase = spi_block_erase_60,
10325 }, {
10326 .eraseblocks = { {8 * 1024 * 1024, 1} },
10327 .block_erase = spi_block_erase_c7,
10328 }
10329 },
10330 .unlock = spi_disable_blockprotect,
10331 .write = spi_chip_write_256,
10332 .read = spi_chip_read,
10333 .voltage = {1650, 1950},
10334 },
10335
10336 {
10337 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -070010338 .name = "IS25WP128",
10339 .bustype = BUS_SPI,
10340 .manufacture_id = ISSI_ID_SPI,
10341 .model_id = ISSI_IS25WP128,
10342 .total_size = 16384,
10343 .page_size = 256,
10344 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010345 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
10346 dummy cycles; non-volatile read parameters, so disable for now */
10347 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks3083ed92017-05-02 13:25:56 -070010348 .tested = TEST_OK_PREW,
10349 .probe = probe_spi_rdid,
10350 .probe_timing = TIMING_ZERO,
10351 .block_erasers =
10352 {
10353 {
10354 .eraseblocks = { {4 * 1024, 4096} },
10355 .block_erase = spi_block_erase_20,
10356 }, {
10357 .eraseblocks = { {4 * 1024, 4096} },
10358 .block_erase = spi_block_erase_d7,
10359 }, {
10360 .eraseblocks = { {32 * 1024, 512} },
10361 .block_erase = spi_block_erase_52,
10362 }, {
10363 .eraseblocks = { {64 * 1024, 256} },
10364 .block_erase = spi_block_erase_d8,
10365 }, {
10366 .eraseblocks = { {16 * 1024 * 1024, 1} },
10367 .block_erase = spi_block_erase_60,
10368 }, {
10369 .eraseblocks = { {16 * 1024 * 1024, 1} },
10370 .block_erase = spi_block_erase_c7,
10371 }
10372 },
10373 .unlock = spi_disable_blockprotect,
10374 .write = spi_chip_write_256,
10375 .read = spi_chip_read,
10376 .voltage = {1650, 1950},
10377 },
10378
10379 {
10380 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +000010381 .name = "IS25WP256",
10382 .bustype = BUS_SPI,
10383 .manufacture_id = ISSI_ID_SPI,
10384 .model_id = ISSI_IS25WP256,
10385 .total_size = 32768,
10386 .page_size = 256,
10387 /* supports SFDP */
10388 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +020010389 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
10390 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +000010391 .tested = TEST_OK_PREW,
10392 .probe = probe_spi_rdid,
10393 .probe_timing = TIMING_ZERO,
10394 .block_erasers =
10395 {
10396 {
10397 .eraseblocks = { {4 * 1024, 8192} },
10398 .block_erase = spi_block_erase_21,
10399 }, {
10400 .eraseblocks = { {4 * 1024, 8192} },
10401 .block_erase = spi_block_erase_20,
10402 /* could also use spi_block_erase_d7 */
10403 }, {
10404 .eraseblocks = { {32 * 1024, 1024} },
10405 .block_erase = spi_block_erase_5c,
10406 }, {
10407 .eraseblocks = { {32 * 1024, 1024} },
10408 .block_erase = spi_block_erase_52,
10409 }, {
10410 .eraseblocks = { {64 * 1024, 512} },
10411 .block_erase = spi_block_erase_dc,
10412 }, {
10413 .eraseblocks = { {64 * 1024, 512} },
10414 .block_erase = spi_block_erase_d8,
10415 }, {
10416 .eraseblocks = { {32 * 1024 * 1024, 1} },
10417 .block_erase = spi_block_erase_60,
10418 }, {
10419 .eraseblocks = { {32 * 1024 * 1024, 1} },
10420 .block_erase = spi_block_erase_c7,
10421 }
10422 },
10423 .unlock = spi_disable_blockprotect,
10424 .write = spi_chip_write_256,
10425 .read = spi_chip_read,
10426 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020010427 .prepare_access = spi_prepare_io,
10428 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +000010429 },
10430
10431 {
10432 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010433 .name = "IS29GL064B",
10434 .bustype = BUS_PARALLEL,
10435 .manufacture_id = ISSI_ID,
10436 .model_id = ISSI_PMC_IS29GL064B,
10437 .total_size = 8192,
10438 .page_size = 128 * 1024, /* actual page size is 16 */
10439 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10440 .tested = TEST_UNTESTED,
10441 .probe = probe_jedec_29gl,
10442 .probe_timing = TIMING_ZERO,
10443 .block_erasers =
10444 {
10445 {
10446 .eraseblocks = {
10447 {8 * 1024, 8},
10448 {64 * 1024, 127},
10449 },
10450 .block_erase = erase_sector_jedec,
10451 }, {
10452 .eraseblocks = { {8 * 1024 * 1024, 1} },
10453 .block_erase = erase_chip_block_jedec,
10454 },
10455 },
10456 .write = write_jedec_1,
10457 .read = read_memmapped,
10458 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010459 .prepare_access = prepare_memory_access,
10460 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010461 },
10462
10463 {
10464 .vendor = "ISSI",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010465 .name = "IS29GL064H/L",
10466 .bustype = BUS_PARALLEL,
10467 .manufacture_id = ISSI_ID,
10468 .model_id = ISSI_PMC_IS29GL064HL,
10469 .total_size = 8192,
10470 .page_size = 128 * 1024, /* actual page size is 16 */
10471 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10472 .tested = TEST_UNTESTED,
10473 .probe = probe_jedec_29gl,
10474 .probe_timing = TIMING_ZERO,
10475 .block_erasers =
10476 {
10477 {
10478 .eraseblocks = { {64 * 1024, 128} },
10479 .block_erase = erase_sector_jedec,
10480 }, {
10481 .eraseblocks = { {8 * 1024 * 1024, 1} },
10482 .block_erase = erase_chip_block_jedec,
10483 },
10484 },
10485 .write = write_jedec_1,
10486 .read = read_memmapped,
10487 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010488 .prepare_access = prepare_memory_access,
10489 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010490 },
10491
10492 {
10493 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010494 .name = "IS29GL064T",
10495 .bustype = BUS_PARALLEL,
10496 .manufacture_id = ISSI_ID,
10497 .model_id = ISSI_PMC_IS29GL064T,
10498 .total_size = 8192,
10499 .page_size = 128 * 1024, /* actual page size is 16 */
10500 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10501 .tested = TEST_UNTESTED,
10502 .probe = probe_jedec_29gl,
10503 .probe_timing = TIMING_ZERO,
10504 .block_erasers =
10505 {
10506 {
10507 .eraseblocks = {
10508 {64 * 1024, 127},
10509 {8 * 1024, 8},
10510 },
10511 .block_erase = erase_sector_jedec,
10512 }, {
10513 .eraseblocks = { {8 * 1024 * 1024, 1} },
10514 .block_erase = erase_chip_block_jedec,
10515 },
10516 },
10517 .write = write_jedec_1,
10518 .read = read_memmapped,
10519 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010520 .prepare_access = prepare_memory_access,
10521 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010522 },
10523
10524 {
10525 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010526 .name = "IS29GL128H/L",
10527 .bustype = BUS_PARALLEL,
10528 .manufacture_id = ISSI_ID,
10529 .model_id = ISSI_PMC_IS29GL128HL,
10530 .total_size = 16384,
10531 .page_size = 128 * 1024, /* actual page size is 16 */
10532 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10533 .tested = TEST_UNTESTED,
10534 .probe = probe_jedec_29gl,
10535 .probe_timing = TIMING_ZERO,
10536 .block_erasers =
10537 {
10538 {
10539 .eraseblocks = { {128 * 1024, 128} },
10540 .block_erase = erase_sector_jedec,
10541 }, {
10542 .eraseblocks = { {16 * 1024 * 1024, 1} },
10543 .block_erase = erase_chip_block_jedec,
10544 },
10545 },
10546 .write = write_jedec_1,
10547 .read = read_memmapped,
10548 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010549 .prepare_access = prepare_memory_access,
10550 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010551 },
10552
10553 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010554 .vendor = "Intel",
10555 .name = "25F160S33B8",
10556 .bustype = BUS_SPI,
10557 .manufacture_id = INTEL_ID,
10558 .model_id = INTEL_25F160S33B8,
10559 .total_size = 2048,
10560 .page_size = 256,
10561 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10562 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10563 .tested = TEST_UNTESTED,
10564 .probe = probe_spi_rdid,
10565 .probe_timing = TIMING_ZERO,
10566 .block_erasers =
10567 {
10568 {
10569 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10570 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10571 * have no effect on the memory contents, but sets a flag in the SR.
10572 .eraseblocks = {
10573 {8 * 1024, 8},
10574 {64 * 1024, 31} // inaccessible
10575 },
10576 .block_erase = spi_block_erase_40,
10577 }, { */
10578 .eraseblocks = { {64 * 1024, 32} },
10579 .block_erase = spi_block_erase_d8,
10580 }, {
10581 .eraseblocks = { {2 * 1024 * 1024, 1} },
10582 .block_erase = spi_block_erase_c7,
10583 }
10584 },
10585 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10586 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10587 .write = spi_chip_write_256,
10588 .read = spi_chip_read, /* also fast read 0x0B */
10589 .voltage = {2700, 3600},
10590 },
10591
10592 {
10593 .vendor = "Intel",
10594 .name = "25F160S33T8",
10595 .bustype = BUS_SPI,
10596 .manufacture_id = INTEL_ID,
10597 .model_id = INTEL_25F160S33T8,
10598 .total_size = 2048,
10599 .page_size = 256,
10600 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10601 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10602 .tested = TEST_UNTESTED,
10603 .probe = probe_spi_rdid,
10604 .probe_timing = TIMING_ZERO,
10605 .block_erasers =
10606 {
10607 {
10608 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10609 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10610 * have no effect on the memory contents, but sets a flag in the SR.
10611 .eraseblocks = {
10612 {64 * 1024, 31}, // inaccessible
10613 {8 * 1024, 8}
10614 },
10615 .block_erase = spi_block_erase_40,
10616 }, { */
10617 .eraseblocks = { {64 * 1024, 32} },
10618 .block_erase = spi_block_erase_d8,
10619 }, {
10620 .eraseblocks = { {2 * 1024 * 1024, 1} },
10621 .block_erase = spi_block_erase_c7,
10622 }
10623 },
10624 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10625 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10626 .write = spi_chip_write_256,
10627 .read = spi_chip_read, /* also fast read 0x0B */
10628 .voltage = {2700, 3600},
10629 },
10630
10631 {
10632 .vendor = "Intel",
10633 .name = "25F320S33B8",
10634 .bustype = BUS_SPI,
10635 .manufacture_id = INTEL_ID,
10636 .model_id = INTEL_25F320S33B8,
10637 .total_size = 4096,
10638 .page_size = 256,
10639 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10640 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10641 .tested = TEST_UNTESTED,
10642 .probe = probe_spi_rdid,
10643 .probe_timing = TIMING_ZERO,
10644 .block_erasers =
10645 {
10646 {
10647 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10648 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10649 * have no effect on the memory contents, but sets a flag in the SR.
10650 .eraseblocks = {
10651 {8 * 1024, 8},
10652 {64 * 1024, 63} // inaccessible
10653 },
10654 .block_erase = spi_block_erase_40,
10655 }, { */
10656 .eraseblocks = { {64 * 1024, 64} },
10657 .block_erase = spi_block_erase_d8,
10658 }, {
10659 .eraseblocks = { {4 * 1024 * 1024, 1} },
10660 .block_erase = spi_block_erase_c7,
10661 }
10662 },
10663 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10664 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10665 .write = spi_chip_write_256,
10666 .read = spi_chip_read, /* also fast read 0x0B */
10667 .voltage = {2700, 3600},
10668 },
10669
10670 {
10671 .vendor = "Intel",
10672 .name = "25F320S33T8",
10673 .bustype = BUS_SPI,
10674 .manufacture_id = INTEL_ID,
10675 .model_id = INTEL_25F320S33T8,
10676 .total_size = 4096,
10677 .page_size = 256,
10678 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10679 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10680 .tested = TEST_UNTESTED,
10681 .probe = probe_spi_rdid,
10682 .probe_timing = TIMING_ZERO,
10683 .block_erasers =
10684 {
10685 {
10686 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10687 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10688 * have no effect on the memory contents, but sets a flag in the SR.
10689 .eraseblocks = {
10690 {64 * 1024, 63}, // inaccessible
10691 {8 * 1024, 8}
10692 },
10693 .block_erase = spi_block_erase_40,
10694 }, { */
10695 .eraseblocks = { {64 * 1024, 64} },
10696 .block_erase = spi_block_erase_d8,
10697 }, {
10698 .eraseblocks = { {4 * 1024 * 1024, 1} },
10699 .block_erase = spi_block_erase_c7,
10700 }
10701 },
10702 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10703 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10704 .write = spi_chip_write_256,
10705 .read = spi_chip_read, /* also fast read 0x0B */
10706 .voltage = {2700, 3600},
10707 },
10708
10709 {
10710 .vendor = "Intel",
10711 .name = "25F640S33B8",
10712 .bustype = BUS_SPI,
10713 .manufacture_id = INTEL_ID,
10714 .model_id = INTEL_25F640S33B8,
10715 .total_size = 8192,
10716 .page_size = 256,
10717 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10718 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Zoltan HERPAIe0e8b2b2020-08-08 16:04:34 +020010719 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010720 .probe = probe_spi_rdid,
10721 .probe_timing = TIMING_ZERO,
10722 .block_erasers =
10723 {
10724 {
10725 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10726 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10727 * have no effect on the memory contents, but sets a flag in the SR.
10728 .eraseblocks = {
10729 {8 * 1024, 8},
10730 {64 * 1024, 127} // inaccessible
10731 },
10732 .block_erase = spi_block_erase_40,
10733 }, { */
10734 .eraseblocks = { {64 * 1024, 128} },
10735 .block_erase = spi_block_erase_d8,
10736 }, {
10737 .eraseblocks = { {8 * 1024 * 1024, 1} },
10738 .block_erase = spi_block_erase_c7,
10739 }
10740 },
10741 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10742 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10743 .write = spi_chip_write_256,
10744 .read = spi_chip_read, /* also fast read 0x0B */
10745 .voltage = {2700, 3600},
10746 },
10747
10748 {
10749 .vendor = "Intel",
10750 .name = "25F640S33T8",
10751 .bustype = BUS_SPI,
10752 .manufacture_id = INTEL_ID,
10753 .model_id = INTEL_25F640S33T8,
10754 .total_size = 8192,
10755 .page_size = 256,
10756 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10757 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10758 .tested = TEST_UNTESTED,
10759 .probe = probe_spi_rdid,
10760 .probe_timing = TIMING_ZERO,
10761 .block_erasers =
10762 {
10763 {
10764 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10765 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10766 * have no effect on the memory contents, but sets a flag in the SR.
10767 .eraseblocks = {
10768 {64 * 1024, 127}, // inaccessible
10769 {8 * 1024, 8}
10770 },
10771 .block_erase = spi_block_erase_40,
10772 }, { */
10773 .eraseblocks = { {64 * 1024, 128} },
10774 .block_erase = spi_block_erase_d8,
10775 }, {
10776 .eraseblocks = { {8 * 1024 * 1024, 1} },
10777 .block_erase = spi_block_erase_c7,
10778 }
10779 },
10780 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10781 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10782 .write = spi_chip_write_256,
10783 .read = spi_chip_read, /* also fast read 0x0B */
10784 .voltage = {2700, 3600},
10785 },
10786
10787 {
10788 .vendor = "Intel",
10789 .name = "28F001BN/BX-B",
10790 .bustype = BUS_PARALLEL,
10791 .manufacture_id = INTEL_ID,
10792 .model_id = INTEL_28F001B,
10793 .total_size = 128,
10794 .page_size = 128 * 1024, /* 8k + 2x4k + 112k */
10795 .tested = TEST_UNTESTED,
10796 .probe = probe_jedec,
10797 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10798 .block_erasers =
10799 {
10800 {
10801 .eraseblocks = {
10802 {8 * 1024, 1},
10803 {4 * 1024, 2},
10804 {112 * 1024, 1},
10805 },
10806 .block_erase = erase_block_82802ab,
10807 },
10808 },
10809 .write = write_82802ab,
10810 .read = read_memmapped,
10811 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010812 .prepare_access = prepare_memory_access,
10813 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010814 },
10815
10816 {
10817 .vendor = "Intel",
10818 .name = "28F001BN/BX-T",
10819 .bustype = BUS_PARALLEL,
10820 .manufacture_id = INTEL_ID,
10821 .model_id = INTEL_28F001T,
10822 .total_size = 128,
10823 .page_size = 128 * 1024, /* 112k + 2x4k + 8k */
10824 .tested = TEST_OK_PREW,
10825 .probe = probe_jedec,
10826 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10827 .block_erasers =
10828 {
10829 {
10830 .eraseblocks = {
10831 {112 * 1024, 1},
10832 {4 * 1024, 2},
10833 {8 * 1024, 1},
10834 },
10835 .block_erase = erase_block_82802ab,
10836 },
10837 },
10838 .write = write_82802ab,
10839 .read = read_memmapped,
10840 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010841 .prepare_access = prepare_memory_access,
10842 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010843 },
10844
10845 {
10846 .vendor = "Intel",
10847 .name = "28F002BC/BL/BV/BX-T",
10848 .bustype = BUS_PARALLEL,
10849 .manufacture_id = INTEL_ID,
10850 .model_id = INTEL_28F002T,
10851 .total_size = 256,
10852 .page_size = 256 * 1024,
10853 .tested = TEST_OK_PRE,
10854 .probe = probe_82802ab,
10855 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10856 .block_erasers =
10857 {
10858 {
10859 .eraseblocks = {
10860 {128 * 1024, 1},
10861 {96 * 1024, 1},
10862 {8 * 1024, 2},
10863 {16 * 1024, 1},
10864 },
10865 .block_erase = erase_block_82802ab,
10866 },
10867 },
10868 .write = write_82802ab,
10869 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010870 .prepare_access = prepare_memory_access,
10871 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010872 },
10873
10874 {
10875 .vendor = "Intel",
10876 .name = "28F004B5/BE/BV/BX-B",
10877 .bustype = BUS_PARALLEL,
10878 .manufacture_id = INTEL_ID,
10879 .model_id = INTEL_28F004B,
10880 .total_size = 512,
10881 .page_size = 128 * 1024, /* maximal block size */
10882 .tested = TEST_UNTESTED,
10883 .probe = probe_82802ab,
10884 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10885 .block_erasers =
10886 {
10887 {
10888 .eraseblocks = {
10889 {16 * 1024, 1},
10890 {8 * 1024, 2},
10891 {96 * 1024, 1},
10892 {128 * 1024, 3},
10893 },
10894 .block_erase = erase_block_82802ab,
10895 },
10896 },
10897 .write = write_82802ab,
10898 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010899 .prepare_access = prepare_memory_access,
10900 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010901 },
10902
10903 {
10904 .vendor = "Intel",
10905 .name = "28F004B5/BE/BV/BX-T",
10906 .bustype = BUS_PARALLEL,
10907 .manufacture_id = INTEL_ID,
10908 .model_id = INTEL_28F004T,
10909 .total_size = 512,
10910 .page_size = 128 * 1024, /* maximal block size */
10911 .tested = TEST_UNTESTED,
10912 .probe = probe_82802ab,
10913 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10914 .block_erasers =
10915 {
10916 {
10917 .eraseblocks = {
10918 {128 * 1024, 3},
10919 {96 * 1024, 1},
10920 {8 * 1024, 2},
10921 {16 * 1024, 1},
10922 },
10923 .block_erase = erase_block_82802ab,
10924 },
10925 },
10926 .write = write_82802ab,
10927 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010928 .prepare_access = prepare_memory_access,
10929 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010930 },
10931
10932 {
10933 .vendor = "Intel",
10934 .name = "28F008S3/S5/SC",
10935 .bustype = BUS_PARALLEL,
10936 .manufacture_id = INTEL_ID,
10937 .model_id = INTEL_28F004S3,
10938 .total_size = 512,
10939 .page_size = 256,
10940 .tested = TEST_UNTESTED,
10941 .probe = probe_82802ab,
10942 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10943 .block_erasers =
10944 {
10945 {
10946 .eraseblocks = { {64 * 1024, 8} },
10947 .block_erase = erase_block_82802ab,
10948 },
10949 },
10950 .unlock = unlock_28f004s5,
10951 .write = write_82802ab,
10952 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010953 .prepare_access = prepare_memory_access,
10954 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010955 },
10956
10957 {
10958 .vendor = "Intel",
10959 .name = "28F400BV/BX/CE/CV-B",
10960 .bustype = BUS_PARALLEL,
10961 .manufacture_id = INTEL_ID,
10962 .model_id = INTEL_28F400B,
10963 .total_size = 512,
10964 .page_size = 128 * 1024, /* maximal block size */
10965 .feature_bits = FEATURE_ADDR_SHIFTED,
10966 .tested = TEST_UNTESTED,
10967 .probe = probe_82802ab,
10968 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10969 .block_erasers =
10970 {
10971 {
10972 .eraseblocks = {
10973 {16 * 1024, 1},
10974 {8 * 1024, 2},
10975 {96 * 1024, 1},
10976 {128 * 1024, 3},
10977 },
10978 .block_erase = erase_block_82802ab,
10979 },
10980 },
10981 .write = write_82802ab,
10982 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010983 .prepare_access = prepare_memory_access,
10984 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010985 },
10986
10987 {
10988 .vendor = "Intel",
10989 .name = "28F400BV/BX/CE/CV-T",
10990 .bustype = BUS_PARALLEL,
10991 .manufacture_id = INTEL_ID,
10992 .model_id = INTEL_28F400T,
10993 .total_size = 512,
10994 .page_size = 128 * 1024, /* maximal block size */
10995 .feature_bits = FEATURE_ADDR_SHIFTED,
10996 .tested = TEST_UNTESTED,
10997 .probe = probe_82802ab,
10998 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10999 .block_erasers =
11000 {
11001 {
11002 .eraseblocks = {
11003 {128 * 1024, 3},
11004 {96 * 1024, 1},
11005 {8 * 1024, 2},
11006 {16 * 1024, 1},
11007 },
11008 .block_erase = erase_block_82802ab,
11009 },
11010 },
11011 .write = write_82802ab,
11012 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010011013 .prepare_access = prepare_memory_access,
11014 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011015 },
11016
11017 {
11018 .vendor = "Intel",
11019 .name = "82802AB",
11020 .bustype = BUS_FWH,
11021 .manufacture_id = INTEL_ID,
11022 .model_id = INTEL_82802AB,
11023 .total_size = 512,
11024 .page_size = 64 * 1024,
Alan Green88552572019-07-24 13:56:06 +100011025 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011026 .probe = probe_82802ab,
11027 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
11028 .block_erasers =
11029 {
11030 {
11031 .eraseblocks = { {64 * 1024, 8} },
11032 .block_erase = erase_block_82802ab,
11033 },
11034 },
11035 .unlock = unlock_regspace2_uniform_64k,
11036 .write = write_82802ab,
11037 .read = read_memmapped,
11038 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010011039 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010011040 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011041 },
11042
11043 {
11044 .vendor = "Intel",
11045 .name = "82802AC",
11046 .bustype = BUS_FWH,
11047 .manufacture_id = INTEL_ID,
11048 .model_id = INTEL_82802AC,
11049 .total_size = 1024,
11050 .page_size = 64 * 1024,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011051 .tested = TEST_OK_PR,
11052 .probe = probe_82802ab,
11053 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
11054 .block_erasers =
11055 {
11056 {
11057 .eraseblocks = { {64 * 1024, 16} },
11058 .block_erase = erase_block_82802ab,
11059 },
11060 },
11061 .unlock = unlock_regspace2_uniform_64k,
11062 .write = write_82802ab,
11063 .read = read_memmapped,
11064 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010011065 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010011066 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011067 },
11068
11069 {
11070 .vendor = "Macronix",
11071 .name = "MX23L12854",
11072 .bustype = BUS_SPI,
11073 .manufacture_id = MACRONIX_ID,
11074 .model_id = MACRONIX_MX23L12854,
11075 .total_size = 16384,
11076 .page_size = 256,
11077 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
11078 .probe = probe_spi_rdid,
11079 .probe_timing = TIMING_ZERO,
11080 .write = NULL, /* MX23L12854 is a mask ROM, so it is read-only */
11081 .read = spi_chip_read, /* Fast read (0x0B) supported */
11082 .voltage = {3000, 3600},
11083 },
11084
11085 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011086 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +000011087 .name = "MX23L1654",
11088 .bustype = BUS_SPI,
11089 .manufacture_id = MACRONIX_ID,
11090 .model_id = MACRONIX_MX23L1654,
11091 .total_size = 2048,
11092 .page_size = 256,
11093 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
11094 .probe = probe_spi_rdid,
11095 .probe_timing = TIMING_ZERO,
11096 .write = NULL, /* MX23L1654 is a mask ROM, so it is read-only */
11097 .read = spi_chip_read, /* Fast read (0x0B) supported */
11098 .voltage = {3000, 3600},
11099 },
11100
11101 {
11102 .vendor = "Macronix",
Michael Coppola4e7f36e2014-05-03 23:01:18 +000011103 .name = "MX23L3254",
11104 .bustype = BUS_SPI,
11105 .manufacture_id = MACRONIX_ID,
11106 .model_id = MACRONIX_MX23L3254,
11107 .total_size = 4096,
11108 .page_size = 256,
Stefan Tauner6455dff2014-05-26 00:36:24 +000011109 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola4e7f36e2014-05-03 23:01:18 +000011110 .probe = probe_spi_rdid,
11111 .probe_timing = TIMING_ZERO,
11112 .write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */
11113 .read = spi_chip_read, /* Fast read (0x0B) supported */
11114 .voltage = {3000, 3600},
11115 },
11116
11117 {
11118 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +000011119 .name = "MX23L6454",
11120 .bustype = BUS_SPI,
11121 .manufacture_id = MACRONIX_ID,
11122 .model_id = MACRONIX_MX23L6454,
11123 .total_size = 8192,
11124 .page_size = 256,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011125 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola583ea322014-08-20 18:56:35 +000011126 .probe = probe_spi_rdid,
11127 .probe_timing = TIMING_ZERO,
11128 .write = NULL, /* MX23L6454 is a mask ROM, so it is read-only */
11129 .read = spi_chip_read, /* Fast read (0x0B) supported */
11130 .voltage = {3000, 3600},
11131 },
11132
11133 {
11134 .vendor = "Macronix",
Stefan Taunerf656e802013-02-02 15:35:44 +000011135 .name = "MX25L1005(C)/MX25L1006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011136 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011137 .manufacture_id = MACRONIX_ID,
11138 .model_id = MACRONIX_MX25L1005,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011139 .total_size = 128,
11140 .page_size = 256,
Stefan Taunerf656e802013-02-02 15:35:44 +000011141 /* MX25L1006E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +010011142 /* FEATURE_FAST_READ_DOUT: MX25L1006E */
11143 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Stefan Taunerd7d423b2012-10-20 09:13:16 +000011144 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011145 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011146 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +000011147 .block_erasers =
11148 {
11149 {
11150 .eraseblocks = { {4 * 1024, 32} },
11151 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011152 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +000011153 .eraseblocks = { {64 * 1024, 2} },
11154 .block_erase = spi_block_erase_d8,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011155 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +000011156 .eraseblocks = { {128 * 1024, 1} },
11157 .block_erase = spi_block_erase_60,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011158 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +000011159 .eraseblocks = { {128 * 1024, 1} },
11160 .block_erase = spi_block_erase_c7,
11161 },
11162 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011163 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000011164 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011165 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011166 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011167 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011168 .prepare_access = spi_prepare_io,
11169 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000011170 },
11171
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011172 {
11173 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011174 .name = "MX25L12805D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011175 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011176 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011177 .model_id = MACRONIX_MX25L12805D,
11178 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011179 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011180 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011181 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011182 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011183 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011184 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011185 .block_erasers =
11186 {
11187 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011188 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011189 .block_erase = spi_block_erase_20,
11190 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011191 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011192 .block_erase = spi_block_erase_d8,
11193 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011194 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011195 .block_erase = spi_block_erase_60,
11196 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011197 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011198 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011199 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011200 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100011201 .printlock = spi_prettyprint_status_register_bp3_srwd,
11202 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011203 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011204 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011205 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000011206 },
11207
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011208 {
11209 .vendor = "Macronix",
Tao Xia571f6ad2021-07-21 16:41:53 +080011210 .name = "MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011211 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011212 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011213 .model_id = MACRONIX_MX25L12805D,
11214 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011215 .page_size = 256,
Tao Xia571f6ad2021-07-21 16:41:53 +080011216 /* OTP: MX25L12833F has 1KB total, others have 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011217 /* *F versions: FEATURE_QPI_35 + DC bits (6, 4, 8, 10) in configuration register */
11218 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
11219 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stefan Tauner8179be52011-06-04 13:13:34 +000011220 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011221 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011222 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011223 .block_erasers =
11224 {
11225 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011226 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011227 .block_erase = spi_block_erase_20,
11228 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011229 .eraseblocks = { {32 * 1024, 512} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011230 .block_erase = spi_block_erase_52,
11231 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011232 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011233 .block_erase = spi_block_erase_d8,
11234 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011235 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011236 .block_erase = spi_block_erase_60,
11237 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011238 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011239 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011240 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011241 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100011242 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +010011243 .reg_bits =
11244 {
11245 .qe = {STATUS1, 6, RW},
11246 },
11247 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011248 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011249 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011250 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011251 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011252 .prepare_access = spi_prepare_io,
11253 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000011254 },
11255
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011256 {
11257 .vendor = "Macronix",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011258 .name = "MX25L1605",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011259 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011260 .manufacture_id = MACRONIX_ID,
11261 .model_id = MACRONIX_MX25L1605,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011262 .total_size = 2048,
11263 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011264 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Sven Schnelle4bd8a402011-03-07 10:59:06 +000011265 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011266 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011267 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011268 .block_erasers =
11269 {
11270 {
Stefan Tauner226037d2013-03-16 01:22:12 +000011271 .eraseblocks = { {64 * 1024, 32} },
11272 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011273 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +000011274 .eraseblocks = { {64 * 1024, 32} },
11275 .block_erase = spi_block_erase_d8,
11276 }, {
11277 .eraseblocks = { {2 * 1024 * 1024, 1} },
11278 .block_erase = spi_block_erase_60,
11279 }, {
11280 .eraseblocks = { {2 * 1024 * 1024, 1} },
11281 .block_erase = spi_block_erase_c7,
11282 },
11283 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011284 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Stefan Tauner226037d2013-03-16 01:22:12 +000011285 .unlock = spi_disable_blockprotect,
11286 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011287 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011288 .voltage = {2700, 3600},
11289 },
11290
11291 {
11292 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011293 .name = "MX25L1605A/MX25L1606E/MX25L1608E",
Stefan Tauner226037d2013-03-16 01:22:12 +000011294 .bustype = BUS_SPI,
11295 .manufacture_id = MACRONIX_ID,
11296 .model_id = MACRONIX_MX25L1605,
11297 .total_size = 2048,
11298 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011299 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L1606E and MX25L1608E only) */
Nico Huber46552c82024-03-27 01:18:12 +010011300 /* FEATURE_FAST_READ_DOUT: MX25L1606E & MX25L1608E */
11301 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +000011302 .tested = TEST_OK_PREW,
11303 .probe = probe_spi_rdid,
11304 .probe_timing = TIMING_ZERO,
11305 .block_erasers =
11306 {
11307 {
11308 .eraseblocks = { {4 * 1024, 512} },
11309 .block_erase = spi_block_erase_20,
11310 }, {
11311 .eraseblocks = { {64 * 1024, 32} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011312 .block_erase = spi_block_erase_52,
11313 }, {
11314 .eraseblocks = { {64 * 1024, 32} },
11315 .block_erase = spi_block_erase_d8,
11316 }, {
11317 .eraseblocks = { {2 * 1024 * 1024, 1} },
11318 .block_erase = spi_block_erase_60,
11319 }, {
11320 .eraseblocks = { {2 * 1024 * 1024, 1} },
11321 .block_erase = spi_block_erase_c7,
11322 },
11323 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011324 .printlock = spi_prettyprint_status_register_bp3_srwd, /* MX25L1605A bp2 only */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011325 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011326 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011327 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011328 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011329 .prepare_access = spi_prepare_io,
11330 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000011331 },
11332
11333 {
11334 .vendor = "Macronix",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011335 .name = "MX25L1605D/MX25L1608D/MX25L1673E",
Stefan Tauner226037d2013-03-16 01:22:12 +000011336 .bustype = BUS_SPI,
11337 .manufacture_id = MACRONIX_ID,
11338 .model_id = MACRONIX_MX25L1605,
11339 .total_size = 2048,
11340 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011341 /* FEATURE_QIO: MX25L1673E */
11342 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +000011343 .tested = TEST_OK_PREW,
11344 .probe = probe_spi_rdid,
11345 .probe_timing = TIMING_ZERO,
11346 .block_erasers =
11347 {
11348 {
11349 .eraseblocks = { {4 * 1024, 512} },
11350 .block_erase = spi_block_erase_20,
11351 }, {
11352 .eraseblocks = { {64 * 1024, 32} },
11353 .block_erase = spi_block_erase_d8,
11354 }, {
11355 .eraseblocks = { {2 * 1024 * 1024, 1} },
11356 .block_erase = spi_block_erase_60,
11357 }, {
11358 .eraseblocks = { {2 * 1024 * 1024, 1} },
11359 .block_erase = spi_block_erase_c7,
11360 },
11361 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011362 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: Continuously Program (CP) mode, for 73E is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011363 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000011364 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011365 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011366 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011367 .prepare_access = spi_prepare_io,
11368 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000011369 },
11370
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011371 {
11372 .vendor = "Macronix",
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011373 .name = "MX25L1635D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011374 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011375 .manufacture_id = MACRONIX_ID,
11376 .model_id = MACRONIX_MX25L1635D,
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011377 .total_size = 2048,
11378 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +000011379 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011380 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
11381 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Angel Ponsc2054872021-01-15 18:57:32 +010011382 .tested = TEST_OK_PREW,
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011383 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011384 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000011385 .block_erasers =
11386 {
11387 {
11388 .eraseblocks = { {4 * 1024, 512} },
11389 .block_erase = spi_block_erase_20,
11390 }, {
11391 .eraseblocks = { {64 * 1024, 32} },
11392 .block_erase = spi_block_erase_d8,
11393 }, {
11394 .eraseblocks = { {2 * 1024 * 1024, 1} },
11395 .block_erase = spi_block_erase_60,
11396 }, {
11397 .eraseblocks = { {2 * 1024 * 1024, 1} },
11398 .block_erase = spi_block_erase_c7,
11399 }
11400 },
Nico Huber46552c82024-03-27 01:18:12 +010011401 .reg_bits =
11402 {
11403 .qe = {STATUS1, 6, RW},
11404 },
11405 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000011406 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011407 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011408 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011409 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011410 .prepare_access = spi_prepare_io,
11411 .finish_access = spi_finish_io,
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011412 },
Stephan Guillouxfd315502009-04-20 22:54:13 +000011413
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011414 {
11415 .vendor = "Macronix",
Stephan Guilloux3611b802010-09-13 19:59:28 +000011416 .name = "MX25L1635E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011417 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011418 .manufacture_id = MACRONIX_ID,
11419 .model_id = MACRONIX_MX25L1635E,
Stephan Guilloux3611b802010-09-13 19:59:28 +000011420 .total_size = 2048,
11421 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +000011422 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011423 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
11424 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stephan Guilloux3611b802010-09-13 19:59:28 +000011425 .tested = TEST_UNTESTED,
11426 .probe = probe_spi_rdid,
11427 .probe_timing = TIMING_ZERO,
11428 .block_erasers =
11429 {
11430 {
11431 .eraseblocks = { {4 * 1024, 512} },
11432 .block_erase = spi_block_erase_20,
11433 }, {
11434 .eraseblocks = { {64 * 1024, 32} },
11435 .block_erase = spi_block_erase_d8,
11436 }, {
11437 .eraseblocks = { {2 * 1024 * 1024, 1} },
11438 .block_erase = spi_block_erase_60,
11439 }, {
11440 .eraseblocks = { {2 * 1024 * 1024, 1} },
11441 .block_erase = spi_block_erase_c7,
11442 }
11443 },
Nico Huber46552c82024-03-27 01:18:12 +010011444 .reg_bits =
11445 {
11446 .qe = {STATUS1, 6, RW},
11447 },
11448 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000011449 .unlock = spi_disable_blockprotect_bp3_srwd,
Stephan Guilloux3611b802010-09-13 19:59:28 +000011450 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011451 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +000011452 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011453 .prepare_access = spi_prepare_io,
11454 .finish_access = spi_finish_io,
Stephan Guilloux3611b802010-09-13 19:59:28 +000011455 },
11456
11457 {
11458 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011459 .name = "MX25L2005(C)/MX25L2006E",
11460 .bustype = BUS_SPI,
11461 .manufacture_id = MACRONIX_ID,
11462 .model_id = MACRONIX_MX25L2005,
11463 .total_size = 256,
11464 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011465 /* FEATURE_FAST_READ_DOUT: MX25L2006E */
11466 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011467 .tested = TEST_OK_PREW,
11468 .probe = probe_spi_rdid,
11469 .probe_timing = TIMING_ZERO,
11470 .block_erasers =
11471 {
11472 {
11473 .eraseblocks = { {4 * 1024, 64} },
11474 .block_erase = spi_block_erase_20,
11475 }, {
11476 .eraseblocks = { {64 * 1024, 4} },
11477 .block_erase = spi_block_erase_52,
11478 }, {
11479 .eraseblocks = { {64 * 1024, 4} },
11480 .block_erase = spi_block_erase_d8,
11481 }, {
11482 .eraseblocks = { {256 * 1024, 1} },
11483 .block_erase = spi_block_erase_60,
11484 }, {
11485 .eraseblocks = { {256 * 1024, 1} },
11486 .block_erase = spi_block_erase_c7,
11487 },
11488 },
11489 .printlock = spi_prettyprint_status_register_bp1_srwd,
11490 .unlock = spi_disable_blockprotect,
11491 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011492 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011493 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011494 .prepare_access = spi_prepare_io,
11495 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011496 },
11497
11498 {
11499 .vendor = "Macronix",
Alan Green03707302019-08-26 12:50:43 +100011500 .name = "MX25L25635F/MX25L25645G",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011501 .bustype = BUS_SPI,
11502 .manufacture_id = MACRONIX_ID,
11503 .model_id = MACRONIX_MX25L25635F,
11504 .total_size = 32768,
11505 .page_size = 256,
11506 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011507 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
11508 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
11509 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nico Huberc972aed2024-08-30 02:06:41 +020011510 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011511 .probe = probe_spi_rdid,
11512 .probe_timing = TIMING_ZERO,
11513 .block_erasers =
11514 {
11515 {
11516 .eraseblocks = { {4 * 1024, 8192} },
11517 .block_erase = spi_block_erase_21,
11518 }, {
11519 .eraseblocks = { {4 * 1024, 8192} },
11520 .block_erase = spi_block_erase_20,
11521 }, {
11522 .eraseblocks = { {32 * 1024, 1024} },
11523 .block_erase = spi_block_erase_5c,
11524 }, {
11525 .eraseblocks = { {32 * 1024, 1024} },
11526 .block_erase = spi_block_erase_52,
11527 }, {
11528 .eraseblocks = { {64 * 1024, 512} },
11529 .block_erase = spi_block_erase_dc,
11530 }, {
11531 .eraseblocks = { {64 * 1024, 512} },
11532 .block_erase = spi_block_erase_d8,
11533 }, {
11534 .eraseblocks = { {32 * 1024 * 1024, 1} },
11535 .block_erase = spi_block_erase_60,
11536 }, {
11537 .eraseblocks = { {32 * 1024 * 1024, 1} },
11538 .block_erase = spi_block_erase_c7,
11539 }
11540 },
11541 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +010011542 .reg_bits = {
11543 .qe = {STATUS1, 6, RW},
11544 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
Nico Huberc972aed2024-08-30 02:06:41 +020011545 .srp = {STATUS1, 7, RW},
11546 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
11547 .tb = {CONFIG, 3, OTP},
Nico Huber46552c82024-03-27 01:18:12 +010011548 },
Nico Huberc972aed2024-08-30 02:06:41 +020011549 .wp_write_cfg = spi_wp_write_cfg,
11550 .wp_read_cfg = spi_wp_read_cfg,
11551 .wp_get_ranges = spi_wp_get_available_ranges,
11552 .decode_range = decode_range_spi25,
Nico Huber46552c82024-03-27 01:18:12 +010011553 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011554 .unlock = spi_disable_blockprotect_bp3_srwd,
11555 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011556 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011557 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011558 .prepare_access = spi_prepare_io,
11559 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011560 },
11561
11562 {
11563 .vendor = "Macronix",
Stefan Tauner226037d2013-03-16 01:22:12 +000011564 .name = "MX25L3205(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011565 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011566 .manufacture_id = MACRONIX_ID,
11567 .model_id = MACRONIX_MX25L3205,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011568 .total_size = 4096,
11569 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011570 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
David Hendricks22e05322010-12-13 23:54:59 +000011571 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011572 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011573 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000011574 .block_erasers =
11575 {
11576 {
Stefan Tauner226037d2013-03-16 01:22:12 +000011577 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +000011578 .block_erase = spi_block_erase_20,
11579 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +000011580 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +000011581 .block_erase = spi_block_erase_d8,
11582 }, {
11583 .eraseblocks = { {4 * 1024 * 1024, 1} },
11584 .block_erase = spi_block_erase_60,
11585 }, {
11586 .eraseblocks = { {4 * 1024 * 1024, 1} },
11587 .block_erase = spi_block_erase_c7,
11588 },
11589 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011590 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000011591 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011592 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011593 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011594 .voltage = {2700, 3600},
11595 },
11596
11597 {
11598 .vendor = "Macronix",
11599 .name = "MX25L3205D/MX25L3208D",
11600 .bustype = BUS_SPI,
11601 .manufacture_id = MACRONIX_ID,
11602 .model_id = MACRONIX_MX25L3205,
11603 .total_size = 4096,
11604 .page_size = 256,
11605 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011606 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +000011607 .tested = TEST_OK_PREW,
11608 .probe = probe_spi_rdid,
11609 .probe_timing = TIMING_ZERO,
11610 .block_erasers =
11611 {
11612 {
11613 .eraseblocks = { {4 * 1024, 1024} },
11614 .block_erase = spi_block_erase_20,
11615 }, {
11616 .eraseblocks = { {64 * 1024, 64} },
11617 .block_erase = spi_block_erase_d8,
11618 }, {
11619 .eraseblocks = { {4 * 1024 * 1024, 1} },
11620 .block_erase = spi_block_erase_60,
11621 }, {
11622 .eraseblocks = { {4 * 1024 * 1024, 1} },
11623 .block_erase = spi_block_erase_c7,
11624 },
11625 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011626 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011627 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000011628 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011629 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011630 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011631 .prepare_access = spi_prepare_io,
11632 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000011633 },
11634
11635 {
11636 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011637 .name = "MX25L3206E/MX25L3208E",
Stefan Tauner226037d2013-03-16 01:22:12 +000011638 .bustype = BUS_SPI,
11639 .manufacture_id = MACRONIX_ID,
11640 .model_id = MACRONIX_MX25L3205,
11641 .total_size = 4096,
11642 .page_size = 256,
11643 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011644 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner226037d2013-03-16 01:22:12 +000011645 .tested = TEST_OK_PREW,
11646 .probe = probe_spi_rdid,
11647 .probe_timing = TIMING_ZERO,
11648 .block_erasers =
11649 {
11650 {
11651 .eraseblocks = { {4 * 1024, 1024} },
11652 .block_erase = spi_block_erase_20,
11653 }, {
11654 .eraseblocks = { {64 * 1024, 64} },
11655 .block_erase = spi_block_erase_d8,
11656 }, {
11657 .eraseblocks = { {64 * 1024, 64} },
11658 .block_erase = spi_block_erase_52,
11659 }, {
11660 .eraseblocks = { {4 * 1024 * 1024, 1} },
11661 .block_erase = spi_block_erase_60,
11662 }, {
11663 .eraseblocks = { {4 * 1024 * 1024, 1} },
11664 .block_erase = spi_block_erase_c7,
11665 },
11666 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011667 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000011668 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000011669 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011670 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011671 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011672 .prepare_access = spi_prepare_io,
11673 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000011674 },
11675
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011676 {
11677 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011678 .name = "MX25L3235D",
11679 .bustype = BUS_SPI,
11680 .manufacture_id = MACRONIX_ID,
11681 .model_id = MACRONIX_MX25L3235D,
11682 .total_size = 4096,
11683 .page_size = 256,
11684 /* OTP: 256B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011685 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
11686 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011687 .tested = TEST_UNTESTED,
11688 .probe = probe_spi_rdid,
11689 .probe_timing = TIMING_ZERO,
11690 .block_erasers =
11691 {
11692 {
11693 .eraseblocks = { {4 * 1024, 1024} },
11694 .block_erase = spi_block_erase_20,
11695 }, {
11696 .eraseblocks = { {64 * 1024, 64} },
11697 .block_erase = spi_block_erase_d8,
11698 }, {
11699 .eraseblocks = { {4 * 1024 * 1024, 1} },
11700 .block_erase = spi_block_erase_60,
11701 }, {
11702 .eraseblocks = { {4 * 1024 * 1024, 1} },
11703 .block_erase = spi_block_erase_c7,
11704 }
11705 },
Nico Huber46552c82024-03-27 01:18:12 +010011706 .reg_bits =
11707 {
11708 .qe = {STATUS1, 6, RW},
11709 },
11710 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011711 .unlock = spi_disable_blockprotect_bp3_srwd,
11712 .write = spi_chip_write_256,
11713 .read = spi_chip_read,
11714 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011715 .prepare_access = spi_prepare_io,
11716 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011717 },
11718
11719 {
11720 .vendor = "Macronix",
Nico Huberb6683e02021-04-21 13:04:29 +020011721 .name = "MX25L3233F/MX25L3273E",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011722 .bustype = BUS_SPI,
11723 .manufacture_id = MACRONIX_ID,
11724 .model_id = MACRONIX_MX25L3205,
11725 .total_size = 4096,
11726 .page_size = 256,
Nico Huber6e69e2b2021-04-21 13:03:13 +020011727 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011728 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011729 .tested = TEST_OK_PREW,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011730 .probe = probe_spi_rdid,
11731 .probe_timing = TIMING_ZERO,
11732 .block_erasers =
11733 {
11734 {
11735 .eraseblocks = { {4 * 1024, 1024} },
11736 .block_erase = spi_block_erase_20,
11737 }, {
11738 .eraseblocks = { {32 * 1024, 128} },
11739 .block_erase = spi_block_erase_52,
11740 }, {
11741 .eraseblocks = { {64 * 1024, 64} },
11742 .block_erase = spi_block_erase_d8,
11743 }, {
11744 .eraseblocks = { {4 * 1024 * 1024, 1} },
11745 .block_erase = spi_block_erase_60,
11746 }, {
11747 .eraseblocks = { {4 * 1024 * 1024, 1} },
11748 .block_erase = spi_block_erase_c7,
11749 },
11750 },
Nico Huber46552c82024-03-27 01:18:12 +010011751 .reg_bits =
11752 {
11753 .qe = {STATUS1, 6, RW},
11754 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011755 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000011756 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011757 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011758 .read = spi_chip_read,
Nico Huberb6683e02021-04-21 13:04:29 +020011759 .voltage = {2700, 3600}, /* 33F 2.65V..3.6V */
Nico Huber930d4212024-05-04 18:59:15 +020011760 .prepare_access = spi_prepare_io,
11761 .finish_access = spi_finish_io,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011762 },
11763
11764 {
11765 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011766 .name = "MX25L4005(A/C)/MX25L4006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011767 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011768 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011769 .model_id = MACRONIX_MX25L4005,
11770 .total_size = 512,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +000011771 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011772 /* FEATURE_FAST_READ_DOUT: MX25L4006E */
11773 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011774 .tested = TEST_OK_PREW,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +000011775 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011776 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000011777 .block_erasers =
11778 {
11779 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011780 .eraseblocks = { {4 * 1024, 128} },
Sean Nelson54596372010-01-09 05:30:14 +000011781 .block_erase = spi_block_erase_20,
11782 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011783 .eraseblocks = { {64 * 1024, 8} },
11784 .block_erase = spi_block_erase_52,
11785 }, {
11786 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson54596372010-01-09 05:30:14 +000011787 .block_erase = spi_block_erase_d8,
11788 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011789 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000011790 .block_erase = spi_block_erase_60,
11791 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011792 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000011793 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011794 },
Sean Nelson54596372010-01-09 05:30:14 +000011795 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100011796 .printlock = spi_prettyprint_status_register_bp2_srwd,
11797 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011798 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011799 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011800 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011801 .prepare_access = spi_prepare_io,
11802 .finish_access = spi_finish_io,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +000011803 },
11804
11805 {
11806 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011807 .name = "MX25L512(E)/MX25V512(C)",
11808 .bustype = BUS_SPI,
11809 .manufacture_id = MACRONIX_ID,
11810 .model_id = MACRONIX_MX25L512,
11811 .total_size = 64,
11812 .page_size = 256,
11813 /* MX25L512E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +010011814 /* FEATURE_FAST_READ_DOUT: MX25L512E */
11815 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011816 .tested = TEST_OK_PREW,
11817 .probe = probe_spi_rdid,
11818 .probe_timing = TIMING_ZERO,
11819 .block_erasers =
11820 {
11821 {
11822 .eraseblocks = { {4 * 1024, 16} },
11823 .block_erase = spi_block_erase_20,
11824 }, {
11825 .eraseblocks = { {64 * 1024, 1} },
11826 .block_erase = spi_block_erase_52,
11827 }, {
11828 .eraseblocks = { {64 * 1024, 1} },
11829 .block_erase = spi_block_erase_d8,
11830 }, {
11831 .eraseblocks = { {64 * 1024, 1} },
11832 .block_erase = spi_block_erase_60,
11833 }, {
11834 .eraseblocks = { {64 * 1024, 1} },
11835 .block_erase = spi_block_erase_c7,
11836 },
11837 },
11838 .printlock = spi_prettyprint_status_register_bp1_srwd,
11839 .unlock = spi_disable_blockprotect,
11840 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011841 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011842 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V512(C) */
11843 },
11844
11845 {
11846 .vendor = "Macronix",
Steve Markgraf7e6f3a72020-07-13 18:22:56 +020011847 .name = "MX25L5121E",
11848 .bustype = BUS_SPI,
11849 .manufacture_id = MACRONIX_ID,
11850 .model_id = MACRONIX_MX25L5121E,
11851 .total_size = 64,
11852 .page_size = 32,
Nico Huber46552c82024-03-27 01:18:12 +010011853 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +020011854 .tested = TEST_OK_PREW,
11855 .probe = probe_spi_rdid,
11856 .probe_timing = TIMING_ZERO,
11857 .block_erasers =
11858 {
11859 {
11860 .eraseblocks = { {4 * 1024, 16} },
11861 .block_erase = spi_block_erase_20,
11862 }, {
11863 .eraseblocks = { {64 * 1024, 1} },
11864 .block_erase = spi_block_erase_52,
11865 }, {
11866 .eraseblocks = { {64 * 1024, 1} },
11867 .block_erase = spi_block_erase_d8,
11868 }, {
11869 .eraseblocks = { {64 * 1024, 1} },
11870 .block_erase = spi_block_erase_60,
11871 }, {
11872 .eraseblocks = { {64 * 1024, 1} },
11873 .block_erase = spi_block_erase_c7,
11874 },
11875 },
11876 .printlock = spi_prettyprint_status_register_bp1_srwd,
11877 .unlock = spi_disable_blockprotect,
11878 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011879 .read = spi_chip_read,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +020011880 .voltage = {2700, 3600},
11881 },
11882
11883 {
11884 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011885 .name = "MX25L6405",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011886 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011887 .manufacture_id = MACRONIX_ID,
11888 .model_id = MACRONIX_MX25L6405,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011889 .total_size = 8192,
11890 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011891 /* Has an additional 512B EEPROM sector */
11892 .feature_bits = FEATURE_WRSR_WREN,
Paul Menzelac427b22012-02-16 21:07:07 +000011893 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011894 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011895 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000011896 .block_erasers =
11897 {
11898 {
11899 .eraseblocks = { {64 * 1024, 128} },
11900 .block_erase = spi_block_erase_20,
11901 }, {
11902 .eraseblocks = { {64 * 1024, 128} },
11903 .block_erase = spi_block_erase_d8,
11904 }, {
11905 .eraseblocks = { {8 * 1024 * 1024, 1} },
11906 .block_erase = spi_block_erase_60,
11907 }, {
11908 .eraseblocks = { {8 * 1024 * 1024, 1} },
11909 .block_erase = spi_block_erase_c7,
11910 }
11911 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011912 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: error flag */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011913 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011914 .write = spi_chip_write_256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011915 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011916 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000011917 },
11918
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011919 {
11920 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011921 .name = "MX25L6405D",
Stefan Tauner226037d2013-03-16 01:22:12 +000011922 .bustype = BUS_SPI,
11923 .manufacture_id = MACRONIX_ID,
11924 .model_id = MACRONIX_MX25L6405,
11925 .total_size = 8192,
11926 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011927 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011928 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +000011929 .tested = TEST_OK_PREW,
11930 .probe = probe_spi_rdid,
11931 .probe_timing = TIMING_ZERO,
11932 .block_erasers =
11933 {
11934 {
11935 .eraseblocks = { {4 * 1024, 2048} },
11936 .block_erase = spi_block_erase_20,
11937 }, {
11938 .eraseblocks = { {64 * 1024, 128} },
11939 .block_erase = spi_block_erase_d8,
11940 }, {
11941 .eraseblocks = { {8 * 1024 * 1024, 1} },
11942 .block_erase = spi_block_erase_60,
11943 }, {
11944 .eraseblocks = { {8 * 1024 * 1024, 1} },
11945 .block_erase = spi_block_erase_c7,
11946 }
11947 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011948 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011949 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000011950 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011951 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011952 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011953 .prepare_access = spi_prepare_io,
11954 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000011955 },
11956
11957 {
11958 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011959 .name = "MX25L6406E/MX25L6408E",
11960 .bustype = BUS_SPI,
11961 .manufacture_id = MACRONIX_ID,
11962 .model_id = MACRONIX_MX25L6405,
11963 .total_size = 8192,
11964 .page_size = 256,
11965 /* MX25L6406E supports SFDP */
11966 /* OTP: 06E 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011967 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011968 .tested = TEST_OK_PREW,
11969 .probe = probe_spi_rdid,
11970 .probe_timing = TIMING_ZERO,
11971 .block_erasers =
11972 {
11973 {
11974 .eraseblocks = { {4 * 1024, 2048} },
11975 .block_erase = spi_block_erase_20,
11976 }, {
11977 .eraseblocks = { {64 * 1024, 128} },
11978 .block_erase = spi_block_erase_52,
11979 }, {
11980 .eraseblocks = { {64 * 1024, 128} },
11981 .block_erase = spi_block_erase_d8,
11982 }, {
11983 .eraseblocks = { {8 * 1024 * 1024, 1} },
11984 .block_erase = spi_block_erase_60,
11985 }, {
11986 .eraseblocks = { {8 * 1024 * 1024, 1} },
11987 .block_erase = spi_block_erase_c7,
11988 }
11989 },
11990 .printlock = spi_prettyprint_status_register_bp3_srwd,
11991 .unlock = spi_disable_blockprotect_bp3_srwd,
11992 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011993 .read = spi_chip_read,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011994 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011995 .prepare_access = spi_prepare_io,
11996 .finish_access = spi_finish_io,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011997 },
11998
11999 {
12000 .vendor = "Macronix",
Nico Huberb0072782017-12-06 21:02:57 +010012001 .name = "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F",
Stefan Tauner226037d2013-03-16 01:22:12 +000012002 .bustype = BUS_SPI,
12003 .manufacture_id = MACRONIX_ID,
12004 .model_id = MACRONIX_MX25L6405,
12005 .total_size = 8192,
12006 .page_size = 256,
12007 /* supports SFDP */
12008 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010012009 /* FEATURE_QIO: MX25L6473E, MX25L6473F */
12010 /* FEATURE_FAST_READ_DOUT, _QOUT: MX25L6436E */
12011 /* FEATURE_FAST_READ_DIO, _QIO: MX25L6445E, MX25L6465E */
12012 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +000012013 .tested = TEST_OK_PREW,
12014 .probe = probe_spi_rdid,
12015 .probe_timing = TIMING_ZERO,
12016 .block_erasers =
12017 {
12018 {
12019 .eraseblocks = { {4 * 1024, 2048} },
12020 .block_erase = spi_block_erase_20,
12021 }, {
12022 .eraseblocks = { {32 * 1024, 256} },
12023 .block_erase = spi_block_erase_52,
12024 }, {
12025 .eraseblocks = { {64 * 1024, 128} },
12026 .block_erase = spi_block_erase_d8,
12027 }, {
12028 .eraseblocks = { {8 * 1024 * 1024, 1} },
12029 .block_erase = spi_block_erase_60,
12030 }, {
12031 .eraseblocks = { {8 * 1024 * 1024, 1} },
12032 .block_erase = spi_block_erase_c7,
12033 }
12034 },
Nico Huber46552c82024-03-27 01:18:12 +010012035 .reg_bits =
12036 {
12037 .qe = {STATUS1, 6, RW},
12038 },
12039 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000012040 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000012041 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010012042 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000012043 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012044 .prepare_access = spi_prepare_io,
12045 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000012046 },
12047
12048 {
12049 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012050 .name = "MX25L6495F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012051 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012052 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012053 .model_id = MACRONIX_MX25L6495F,
12054 .total_size = 8192,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +000012055 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012056 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Stefan Tauner226037d2013-03-16 01:22:12 +000012057 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner0554ca52013-07-25 22:54:25 +000012058 .tested = TEST_OK_PREW,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +000012059 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000012060 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000012061 .block_erasers =
12062 {
12063 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012064 .eraseblocks = { {4 * 1024, 2048} },
Sean Nelson54596372010-01-09 05:30:14 +000012065 .block_erase = spi_block_erase_20,
12066 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012067 .eraseblocks = { {32 * 1024, 256} },
12068 .block_erase = spi_block_erase_52,
12069 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053012070 .eraseblocks = { {64 * 1024, 128} },
12071 .block_erase = spi_block_erase_d8,
12072 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012073 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000012074 .block_erase = spi_block_erase_60,
12075 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012076 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000012077 .block_erase = spi_block_erase_c7,
12078 }
12079 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100012080 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000012081 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012082 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
Stefan Tauner5c316f92015-02-08 21:57:52 +000012083 .voltage = {2700, 3600},
12084 },
12085
12086 {
12087 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012088 .name = "MX25L8005/MX25L8006E/MX25L8008E/MX25V8005",
Stefan Tauner5c316f92015-02-08 21:57:52 +000012089 .bustype = BUS_SPI,
12090 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012091 .model_id = MACRONIX_MX25L8005,
12092 .total_size = 1024,
12093 .page_size = 256,
12094 /* MX25L8006E, MX25L8008E support SFDP */
12095 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L8006E, MX25L8008E only) */
Nico Huber46552c82024-03-27 01:18:12 +010012096 /* FEATURE_FAST_READ_DOUT: MX25L8006E, MX25L8008E */
12097 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012098 .tested = TEST_OK_PREW,
12099 .probe = probe_spi_rdid,
12100 .probe_timing = TIMING_ZERO,
12101 .block_erasers =
12102 {
12103 {
12104 .eraseblocks = { {4 * 1024, 256} },
12105 .block_erase = spi_block_erase_20,
12106 }, {
12107 .eraseblocks = { {64 * 1024, 16} },
12108 .block_erase = spi_block_erase_52,
12109 }, {
12110 .eraseblocks = { {64 * 1024, 16} },
12111 .block_erase = spi_block_erase_d8,
12112 }, {
12113 .eraseblocks = { {1024 * 1024, 1} },
12114 .block_erase = spi_block_erase_60,
12115 }, {
12116 .eraseblocks = { {1024 * 1024, 1} },
12117 .block_erase = spi_block_erase_c7,
12118 },
12119 },
12120 .printlock = spi_prettyprint_status_register_bp2_srwd,
12121 .unlock = spi_disable_blockprotect,
12122 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010012123 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012124 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V8005 */
12125 },
12126
12127 {
12128 .vendor = "Macronix",
sibradzicf62623c2020-03-14 17:21:34 +090012129 .name = "MX25R3235F",
12130 .bustype = BUS_SPI,
12131 .manufacture_id = MACRONIX_ID,
12132 .model_id = MACRONIX_MX25R3235F,
12133 .total_size = 4096,
12134 .page_size = 256,
12135 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +010012136 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
sibradzicf62623c2020-03-14 17:21:34 +090012137 .tested = TEST_OK_PREW,
12138 .probe = probe_spi_rdid,
12139 .probe_timing = TIMING_ZERO,
12140 .block_erasers =
12141 {
12142 {
12143 .eraseblocks = { {4 * 1024, 1024} },
12144 .block_erase = spi_block_erase_20,
12145 }, {
sibradzicf62623c2020-03-14 17:21:34 +090012146 .eraseblocks = { {32 * 1024, 128} },
12147 .block_erase = spi_block_erase_52,
12148 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053012149 .eraseblocks = { {64 * 1024, 64} },
12150 .block_erase = spi_block_erase_d8,
12151 }, {
sibradzicf62623c2020-03-14 17:21:34 +090012152 .eraseblocks = { {4 * 1024 * 1024, 1} },
12153 .block_erase = spi_block_erase_60,
12154 }, {
12155 .eraseblocks = { {4 * 1024 * 1024, 1} },
12156 .block_erase = spi_block_erase_c7,
12157 }
12158 },
Nico Huber5f509992024-03-27 01:18:12 +010012159 .reg_bits =
12160 {
12161 .qe = {STATUS1, 6, RW},
12162 },
12163 .printlock = spi_prettyprint_status_register_bp3_srwd,
sibradzicf62623c2020-03-14 17:21:34 +090012164 .unlock = spi_disable_blockprotect_bp3_srwd,
12165 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +010012166 .read = spi_chip_read,
sibradzicf62623c2020-03-14 17:21:34 +090012167 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012168 .prepare_access = spi_prepare_io,
12169 .finish_access = spi_finish_io,
sibradzicf62623c2020-03-14 17:21:34 +090012170 },
12171
12172 {
12173 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012174 .name = "MX25R6435F",
12175 .bustype = BUS_SPI,
12176 .manufacture_id = MACRONIX_ID,
12177 .model_id = MACRONIX_MX25R6435F,
12178 .total_size = 8192,
12179 .page_size = 256,
12180 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +010012181 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012182 .tested = TEST_OK_PREW,
12183 .probe = probe_spi_rdid,
12184 .probe_timing = TIMING_ZERO,
12185 .block_erasers =
12186 {
12187 {
12188 .eraseblocks = { {4 * 1024, 2048} },
12189 .block_erase = spi_block_erase_20,
12190 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012191 .eraseblocks = { {32 * 1024, 256} },
12192 .block_erase = spi_block_erase_52,
12193 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053012194 .eraseblocks = { {64 * 1024, 128} },
12195 .block_erase = spi_block_erase_d8,
12196 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012197 .eraseblocks = { {8 * 1024 * 1024, 1} },
12198 .block_erase = spi_block_erase_60,
12199 }, {
12200 .eraseblocks = { {8 * 1024 * 1024, 1} },
12201 .block_erase = spi_block_erase_c7,
12202 }
12203 },
Nico Huber5f509992024-03-27 01:18:12 +010012204 .reg_bits =
12205 {
12206 .qe = {STATUS1, 6, RW},
12207 },
12208 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012209 .unlock = spi_disable_blockprotect_bp3_srwd,
12210 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +010012211 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012212 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012213 .prepare_access = spi_prepare_io,
12214 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012215 },
12216
12217 {
12218 .vendor = "Macronix",
12219 .name = "MX25U12835F",
12220 .bustype = BUS_SPI,
12221 .manufacture_id = MACRONIX_ID,
12222 .model_id = MACRONIX_MX25U12835E,
Stefan Tauner5c316f92015-02-08 21:57:52 +000012223 .total_size = 16384,
12224 .page_size = 256,
12225 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012226 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_35,
12227 .dummy_cycles =
12228 {
12229 /* 133MHz version has configuration register
12230 bit to toggle 8 dummy cycles for QIO, defaults: */
12231 .qpi_fast_read = 4,
12232 .qpi_fast_read_qio = 6,
12233 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000012234 .tested = TEST_OK_PREW,
12235 .probe = probe_spi_rdid,
12236 .probe_timing = TIMING_ZERO,
12237 .block_erasers =
12238 {
12239 {
12240 .eraseblocks = { {4 * 1024, 4096} },
12241 .block_erase = spi_block_erase_20,
12242 }, {
12243 .eraseblocks = { {32 * 1024, 512} },
12244 .block_erase = spi_block_erase_52,
12245 }, {
12246 .eraseblocks = { {64 * 1024, 256} },
12247 .block_erase = spi_block_erase_d8,
12248 }, {
12249 .eraseblocks = { {16 * 1024 * 1024, 1} },
12250 .block_erase = spi_block_erase_60,
12251 }, {
12252 .eraseblocks = { {16 * 1024 * 1024, 1} },
12253 .block_erase = spi_block_erase_c7,
12254 }
12255 },
Angel Ponsf112e242018-09-30 20:14:17 +020012256 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012257 .reg_bits =
12258 {
12259 .qe = {STATUS1, 6, RW},
12260 },
12261 .printlock = spi_prettyprint_status_register_bp3_srwd,
Angel Ponsf112e242018-09-30 20:14:17 +020012262 .unlock = spi_disable_blockprotect_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012263 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010012264 .read = spi_chip_read,
Angel Ponsf112e242018-09-30 20:14:17 +020012265 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012266 .prepare_access = spi_prepare_io,
12267 .finish_access = spi_finish_io,
Angel Ponsf112e242018-09-30 20:14:17 +020012268 },
12269
12270 {
12271 .vendor = "Macronix",
Vincent Palatinf800f552013-03-15 02:03:16 +000012272 .name = "MX25U1635E",
12273 .bustype = BUS_SPI,
12274 .manufacture_id = MACRONIX_ID,
12275 .model_id = MACRONIX_MX25U1635E,
12276 .total_size = 2048,
12277 .page_size = 256,
12278 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012279 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
12280 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
12281 .dummy_cycles =
12282 {
12283 .qpi_fast_read = 4,
12284 .qpi_fast_read_qio = 6,
12285 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000012286 .tested = TEST_OK_PR,
Vincent Palatinf800f552013-03-15 02:03:16 +000012287 .probe = probe_spi_rdid,
12288 .probe_timing = TIMING_ZERO,
12289 .block_erasers =
12290 {
12291 {
12292 .eraseblocks = { {4 * 1024, 512} },
12293 .block_erase = spi_block_erase_20,
12294 }, {
12295 .eraseblocks = { {32 * 1024, 64} },
12296 .block_erase = spi_block_erase_52,
12297 }, {
12298 .eraseblocks = { {64 * 1024, 32} },
12299 .block_erase = spi_block_erase_d8,
12300 }, {
12301 .eraseblocks = { {2 * 1024 * 1024, 1} },
12302 .block_erase = spi_block_erase_60,
12303 }, {
12304 .eraseblocks = { {2 * 1024 * 1024, 1} },
12305 .block_erase = spi_block_erase_c7,
12306 }
12307 },
12308 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012309 .reg_bits =
12310 {
12311 .qe = {STATUS1, 6, RW},
12312 },
12313 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000012314 .unlock = spi_disable_blockprotect_bp3_srwd,
Vincent Palatinf800f552013-03-15 02:03:16 +000012315 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012316 .read = spi_chip_read,
Vincent Palatinf800f552013-03-15 02:03:16 +000012317 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012318 .prepare_access = spi_prepare_io,
12319 .finish_access = spi_finish_io,
Vincent Palatinf800f552013-03-15 02:03:16 +000012320 },
12321
12322 {
12323 .vendor = "Macronix",
David Tomaschikf75d8c52019-06-20 09:49:01 -070012324 .name = "MX25U25635F",
12325 .bustype = BUS_SPI,
12326 .manufacture_id = MACRONIX_ID,
12327 .model_id = MACRONIX_MX25U25635F,
12328 .total_size = 32768,
12329 .page_size = 256,
12330 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012331 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
12332 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
12333 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nikolai Artemiev148254b2021-03-23 17:21:10 +110012334 .tested = TEST_OK_PREW,
David Tomaschikf75d8c52019-06-20 09:49:01 -070012335 .probe = probe_spi_rdid,
12336 .probe_timing = TIMING_ZERO,
12337 .block_erasers =
12338 {
12339 {
12340 .eraseblocks = { {4 * 1024, 8192} },
12341 .block_erase = spi_block_erase_21,
12342 }, {
12343 .eraseblocks = { {4 * 1024, 8192} },
12344 .block_erase = spi_block_erase_20,
12345 }, {
12346 .eraseblocks = { {32 * 1024, 1024} },
12347 .block_erase = spi_block_erase_5c,
12348 }, {
12349 .eraseblocks = { {32 * 1024, 1024} },
12350 .block_erase = spi_block_erase_52,
12351 }, {
12352 .eraseblocks = { {64 * 1024, 512} },
12353 .block_erase = spi_block_erase_dc,
12354 }, {
12355 .eraseblocks = { {64 * 1024, 512} },
12356 .block_erase = spi_block_erase_d8,
12357 }, {
12358 .eraseblocks = { {32 * 1024 * 1024, 1} },
12359 .block_erase = spi_block_erase_60,
12360 }, {
12361 .eraseblocks = { {32 * 1024 * 1024, 1} },
12362 .block_erase = spi_block_erase_c7,
12363 }
12364 },
12365 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010012366 .reg_bits =
12367 {
Nico Huber4fa39c52024-03-27 01:18:12 +010012368 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010012369 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
12370 },
Nico Huber4fa39c52024-03-27 01:18:12 +010012371 .printlock = spi_prettyprint_status_register_bp3_srwd,
David Tomaschikf75d8c52019-06-20 09:49:01 -070012372 .unlock = spi_disable_blockprotect_bp3_srwd,
12373 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010012374 .read = spi_chip_read,
David Tomaschikf75d8c52019-06-20 09:49:01 -070012375 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012376 .prepare_access = spi_prepare_io,
12377 .finish_access = spi_finish_io,
David Tomaschikf75d8c52019-06-20 09:49:01 -070012378 },
12379
12380 {
12381 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012382 .name = "MX25U3235E/F",
12383 .bustype = BUS_SPI,
12384 .manufacture_id = MACRONIX_ID,
12385 .model_id = MACRONIX_MX25U3235E,
12386 .total_size = 4096,
12387 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012388 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100012389 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012390 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
12391 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
12392 .dummy_cycles =
12393 {
12394 .qpi_fast_read = 4,
12395 .qpi_fast_read_qio = 6,
12396 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100012397 .tested = TEST_OK_PREW,
12398 .probe = probe_spi_rdid,
12399 .probe_timing = TIMING_ZERO,
12400 .block_erasers =
12401 {
12402 {
12403 .eraseblocks = { {4 * 1024, 1024} },
12404 .block_erase = spi_block_erase_20,
12405 }, {
12406 .eraseblocks = { {32 * 1024, 128} },
12407 .block_erase = spi_block_erase_52,
12408 }, {
12409 .eraseblocks = { {64 * 1024, 64} },
12410 .block_erase = spi_block_erase_d8,
12411 }, {
12412 .eraseblocks = { {4 * 1024 * 1024, 1} },
12413 .block_erase = spi_block_erase_60,
12414 }, {
12415 .eraseblocks = { {4 * 1024 * 1024, 1} },
12416 .block_erase = spi_block_erase_c7,
12417 }
12418 },
12419 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012420 .reg_bits =
12421 {
12422 .qe = {STATUS1, 6, RW},
12423 },
12424 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012425 .unlock = spi_disable_blockprotect_bp3_srwd,
12426 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012427 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012428 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012429 .prepare_access = spi_prepare_io,
12430 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012431 },
12432
12433 {
12434 .vendor = "Macronix",
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012435 .name = "MX25U51245G",
12436 .bustype = BUS_SPI,
12437 .manufacture_id = MACRONIX_ID,
12438 .model_id = MACRONIX_MX25U51245G,
12439 .total_size = 65536,
12440 .page_size = 256,
12441 /* OTP: 512B factory programmed and 512B customer programmed; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012442 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
12443 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
12444 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012445 .tested = TEST_OK_PREW,
12446 .probe = probe_spi_rdid,
12447 .probe_timing = TIMING_ZERO,
12448 .block_erasers =
12449 {
12450 {
12451 .eraseblocks = { {4 * 1024, 16384} },
12452 .block_erase = spi_block_erase_21,
12453 }, {
12454 .eraseblocks = { {4 * 1024, 16384} },
12455 .block_erase = spi_block_erase_20,
12456 }, {
12457 .eraseblocks = { {32 * 1024, 2048} },
12458 .block_erase = spi_block_erase_5c,
12459 }, {
12460 .eraseblocks = { {32 * 1024, 2048} },
12461 .block_erase = spi_block_erase_52,
12462 }, {
12463 .eraseblocks = { {64 * 1024, 1024} },
12464 .block_erase = spi_block_erase_dc,
12465 }, {
12466 .eraseblocks = { {64 * 1024, 1024} },
12467 .block_erase = spi_block_erase_d8,
12468 }, {
12469 .eraseblocks = { {64 * 1024 * 1024, 1} },
12470 .block_erase = spi_block_erase_60,
12471 }, {
12472 .eraseblocks = { {64 * 1024 * 1024, 1} },
12473 .block_erase = spi_block_erase_c7,
12474 }
12475 },
12476 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010012477 .reg_bits =
12478 {
Nico Huber4fa39c52024-03-27 01:18:12 +010012479 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010012480 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
12481 },
Nico Huber4fa39c52024-03-27 01:18:12 +010012482 .printlock = spi_prettyprint_status_register_bp3_srwd,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012483 .unlock = spi_disable_blockprotect_bp3_srwd,
12484 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010012485 .read = spi_chip_read,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012486 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012487 .prepare_access = spi_prepare_io,
12488 .finish_access = spi_finish_io,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012489 },
12490
12491 {
12492 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012493 .name = "MX25U6435E/F",
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012494 .bustype = BUS_SPI,
12495 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012496 .model_id = MACRONIX_MX25U6435E,
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012497 .total_size = 8192,
12498 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012499 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100012500 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012501 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
12502 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
12503 .dummy_cycles =
12504 {
12505 .qpi_fast_read = 4,
12506 .qpi_fast_read_qio = 6,
12507 },
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012508 .tested = TEST_OK_PREW,
12509 .probe = probe_spi_rdid,
12510 .probe_timing = TIMING_ZERO,
12511 .block_erasers =
12512 {
12513 {
12514 .eraseblocks = { {4 * 1024, 2048} },
12515 .block_erase = spi_block_erase_20,
12516 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012517 .eraseblocks = { {32 * 1024, 256} },
12518 .block_erase = spi_block_erase_52,
12519 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012520 .eraseblocks = { {64 * 1024, 128} },
12521 .block_erase = spi_block_erase_d8,
12522 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012523 .eraseblocks = { {8 * 1024 * 1024, 1} },
12524 .block_erase = spi_block_erase_60,
12525 }, {
12526 .eraseblocks = { {8 * 1024 * 1024, 1} },
12527 .block_erase = spi_block_erase_c7,
12528 }
12529 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100012530 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012531 .reg_bits =
12532 {
12533 .qe = {STATUS1, 6, RW},
12534 },
12535 .printlock = spi_prettyprint_status_register_bp3_srwd,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010012536 .unlock = spi_disable_blockprotect_bp3_srwd,
12537 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012538 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012539 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012540 .prepare_access = spi_prepare_io,
12541 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012542 },
12543
12544 {
12545 .vendor = "Macronix",
12546 .name = "MX25U8032E",
12547 .bustype = BUS_SPI,
12548 .manufacture_id = MACRONIX_ID,
12549 .model_id = MACRONIX_MX25U8032E,
12550 .total_size = 1024,
12551 .page_size = 256,
12552 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber4fa39c52024-03-27 01:18:12 +010012553 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
12554 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012555 .tested = TEST_OK_PREW,
12556 .probe = probe_spi_rdid,
12557 .probe_timing = TIMING_ZERO,
12558 .block_erasers =
12559 {
12560 {
12561 .eraseblocks = { {4 * 1024, 256} },
12562 .block_erase = spi_block_erase_20,
12563 }, {
12564 .eraseblocks = { {32 * 1024, 32} },
12565 .block_erase = spi_block_erase_52,
12566 }, {
12567 .eraseblocks = { {64 * 1024, 16} },
12568 .block_erase = spi_block_erase_d8,
12569 }, {
12570 .eraseblocks = { {1024 * 1024, 1} },
12571 .block_erase = spi_block_erase_60,
12572 }, {
12573 .eraseblocks = { {1024 * 1024, 1} },
12574 .block_erase = spi_block_erase_c7,
12575 }
12576 },
12577 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012578 .reg_bits =
12579 {
12580 .qe = {STATUS1, 6, RW},
12581 },
12582 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012583 .unlock = spi_disable_blockprotect_bp3_srwd,
12584 .write = spi_chip_write_256,
Nico Huber4fa39c52024-03-27 01:18:12 +010012585 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012586 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012587 .prepare_access = spi_prepare_io,
12588 .finish_access = spi_finish_io,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010012589 },
12590
12591 {
12592 .vendor = "Macronix",
Mark Panajotovic502a9132009-08-24 01:42:24 +000012593 .name = "MX29F001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012594 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012595 .manufacture_id = MACRONIX_ID,
12596 .model_id = MACRONIX_MX29F001B,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012597 .total_size = 128,
12598 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000012599 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12600 .tested = TEST_UNTESTED,
12601 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000012602 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000012603 .block_erasers =
12604 {
12605 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000012606 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000012607 {8 * 1024, 1},
12608 {4 * 1024, 2},
12609 {8 * 1024, 2},
12610 {32 * 1024, 1},
12611 {64 * 1024, 1},
12612 },
Sean Nelson35727f72010-01-28 23:55:12 +000012613 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000012614 }, {
12615 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000012616 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000012617 }
12618 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000012619 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012620 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012621 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012622 .prepare_access = prepare_memory_access,
12623 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012624 },
12625
12626 {
12627 .vendor = "Macronix",
12628 .name = "MX29F001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012629 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012630 .manufacture_id = MACRONIX_ID,
12631 .model_id = MACRONIX_MX29F001T,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012632 .total_size = 128,
12633 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000012634 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stefan Tauner74c6ec62011-05-18 01:31:46 +000012635 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000012636 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000012637 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000012638 .block_erasers =
12639 {
12640 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000012641 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000012642 {64 * 1024, 1},
12643 {32 * 1024, 1},
12644 {8 * 1024, 2},
12645 {4 * 1024, 2},
12646 {8 * 1024, 1},
12647 },
Sean Nelson35727f72010-01-28 23:55:12 +000012648 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000012649 }, {
12650 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000012651 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000012652 }
12653 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000012654 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012655 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012656 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012657 .prepare_access = prepare_memory_access,
12658 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012659 },
12660
12661 {
12662 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000012663 .name = "MX29F002(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012664 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012665 .manufacture_id = MACRONIX_ID,
12666 .model_id = MACRONIX_MX29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012667 .total_size = 256,
12668 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000012669 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012670 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000012671 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000012672 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012673 .block_erasers =
12674 {
12675 {
12676 .eraseblocks = {
12677 {16 * 1024, 1},
12678 {8 * 1024, 2},
12679 {32 * 1024, 1},
12680 {64 * 1024, 3},
12681 },
Sean Nelson35727f72010-01-28 23:55:12 +000012682 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012683 }, {
12684 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000012685 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012686 },
12687 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000012688 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000012689 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012690 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012691 .prepare_access = prepare_memory_access,
12692 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000012693 },
12694
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012695 {
12696 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000012697 .name = "MX29F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012698 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012699 .manufacture_id = MACRONIX_ID,
12700 .model_id = MACRONIX_MX29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012701 .total_size = 256,
12702 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000012703 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000012704 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000012705 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000012706 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012707 .block_erasers =
12708 {
12709 {
12710 .eraseblocks = {
12711 {64 * 1024, 3},
12712 {32 * 1024, 1},
12713 {8 * 1024, 2},
12714 {16 * 1024, 1},
12715 },
Sean Nelson35727f72010-01-28 23:55:12 +000012716 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012717 }, {
12718 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000012719 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012720 },
12721 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000012722 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000012723 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012724 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012725 .prepare_access = prepare_memory_access,
12726 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000012727 },
12728
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012729 {
12730 .vendor = "Macronix",
Daniele Forsi6a18a932014-07-13 14:53:45 +000012731 .name = "MX29F022(N)B",
12732 .bustype = BUS_PARALLEL,
12733 .manufacture_id = MACRONIX_ID,
12734 .model_id = MACRONIX_MX29F022B,
12735 .total_size = 256,
12736 .page_size = 0, /* unused */
12737 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12738 .tested = TEST_UNTESTED,
12739 .probe = probe_jedec,
12740 .probe_timing = TIMING_ZERO,
12741 .block_erasers =
12742 {
12743 {
12744 .eraseblocks = {
12745 {16 * 1024, 1},
12746 {8 * 1024, 2},
12747 {32 * 1024, 1},
12748 {64 * 1024, 3},
12749 },
12750 .block_erase = erase_sector_jedec,
12751 }, {
12752 .eraseblocks = { {256 * 1024, 1} },
12753 .block_erase = erase_chip_block_jedec,
12754 }
12755 },
12756 .write = write_jedec_1,
12757 .read = read_memmapped,
12758 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012759 .prepare_access = prepare_memory_access,
12760 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000012761 },
12762
12763 {
12764 .vendor = "Macronix",
12765 .name = "MX29F022(N)T",
12766 .bustype = BUS_PARALLEL,
12767 .manufacture_id = MACRONIX_ID,
12768 .model_id = MACRONIX_MX29F022T,
12769 .total_size = 256,
12770 .page_size = 0, /* unused */
12771 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12772 .tested = TEST_OK_PREW,
12773 .probe = probe_jedec,
12774 .probe_timing = TIMING_ZERO,
12775 .block_erasers =
12776 {
12777 {
12778 .eraseblocks = {
12779 {64 * 1024, 3},
12780 {32 * 1024, 1},
12781 {8 * 1024, 2},
12782 {16 * 1024, 1},
12783 },
12784 .block_erase = erase_sector_jedec,
12785 }, {
12786 .eraseblocks = { {256 * 1024, 1} },
12787 .block_erase = erase_chip_block_jedec,
12788 }
12789 },
12790 .write = write_jedec_1,
12791 .read = read_memmapped,
12792 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012793 .prepare_access = prepare_memory_access,
12794 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000012795 },
12796
12797 {
12798 .vendor = "Macronix",
Joshua Roysf1324e02010-09-16 00:51:51 +000012799 .name = "MX29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012800 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +000012801 .manufacture_id = MACRONIX_ID,
12802 .model_id = MACRONIX_MX29F040,
12803 .total_size = 512,
12804 .page_size = 64 * 1024,
12805 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12806 .tested = TEST_UNTESTED,
12807 .probe = probe_jedec,
12808 .probe_timing = TIMING_ZERO,
12809 .block_erasers =
12810 {
12811 {
12812 .eraseblocks = { {64 * 1024, 8} },
12813 .block_erase = erase_sector_jedec,
12814 }, {
12815 .eraseblocks = { {512 * 1024, 1} },
12816 .block_erase = erase_chip_block_jedec,
12817 },
12818 },
12819 .write = write_jedec_1,
12820 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000012821 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012822 .prepare_access = prepare_memory_access,
12823 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +000012824 },
12825
12826 {
12827 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012828 .name = "MX29GL128F",
12829 .bustype = BUS_PARALLEL,
12830 .manufacture_id = MACRONIX_ID,
12831 .model_id = MACRONIX_MX29GL128F,
12832 .total_size = 16384,
12833 .page_size = 128 * 1024, /* actual page size is 16 */
12834 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12835 .tested = TEST_UNTESTED,
12836 .probe = probe_jedec_29gl,
12837 .probe_timing = TIMING_ZERO,
12838 .block_erasers =
12839 {
12840 {
12841 .eraseblocks = { {128 * 1024, 128} },
12842 .block_erase = erase_sector_jedec,
12843 }, {
12844 .eraseblocks = { {16 * 1024 * 1024, 1} },
12845 .block_erase = erase_chip_block_jedec,
12846 },
12847 },
12848 .write = write_jedec_1,
12849 .read = read_memmapped,
12850 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012851 .prepare_access = prepare_memory_access,
12852 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012853 },
12854
12855 {
12856 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012857 .name = "MX29GL320EB",
12858 .bustype = BUS_PARALLEL,
12859 .manufacture_id = MACRONIX_ID,
12860 .model_id = MACRONIX_MX29GL320EB,
12861 .total_size = 4096,
12862 .page_size = 128 * 1024, /* actual page size is 16 */
12863 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12864 .tested = TEST_UNTESTED,
12865 .probe = probe_jedec_29gl,
12866 .probe_timing = TIMING_ZERO,
12867 .block_erasers =
12868 {
12869 {
12870 .eraseblocks = {
12871 {8 * 1024, 8},
12872 {64 * 1024, 63},
12873 },
12874 .block_erase = erase_sector_jedec,
12875 }, {
12876 .eraseblocks = { {4 * 1024 * 1024, 1} },
12877 .block_erase = erase_chip_block_jedec,
12878 },
12879 },
12880 .write = write_jedec_1,
12881 .read = read_memmapped,
12882 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012883 .prepare_access = prepare_memory_access,
12884 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012885 },
12886
12887 {
12888 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012889 .name = "MX29GL320EH/L",
12890 .bustype = BUS_PARALLEL,
12891 .manufacture_id = MACRONIX_ID,
12892 .model_id = MACRONIX_MX29GL320EHL,
12893 .total_size = 4096,
12894 .page_size = 128 * 1024, /* actual page size is 16 */
12895 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12896 .tested = TEST_UNTESTED,
12897 .probe = probe_jedec_29gl,
12898 .probe_timing = TIMING_ZERO,
12899 .block_erasers =
12900 {
12901 {
12902 .eraseblocks = { {64 * 1024, 64} },
12903 .block_erase = erase_sector_jedec,
12904 }, {
12905 .eraseblocks = { {4 * 1024 * 1024, 1} },
12906 .block_erase = erase_chip_block_jedec,
12907 },
12908 },
12909 .write = write_jedec_1,
12910 .read = read_memmapped,
12911 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012912 .prepare_access = prepare_memory_access,
12913 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012914 },
12915
12916 {
12917 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012918 .name = "MX29GL320ET",
12919 .bustype = BUS_PARALLEL,
12920 .manufacture_id = MACRONIX_ID,
12921 .model_id = MACRONIX_MX29GL320ET,
12922 .total_size = 4096,
12923 .page_size = 128 * 1024, /* actual page size is 16 */
12924 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12925 .tested = TEST_UNTESTED,
12926 .probe = probe_jedec_29gl,
12927 .probe_timing = TIMING_ZERO,
12928 .block_erasers =
12929 {
12930 {
12931 .eraseblocks = {
12932 {64 * 1024, 63},
12933 {8 * 1024, 8},
12934 },
12935 .block_erase = erase_sector_jedec,
12936 }, {
12937 .eraseblocks = { {4 * 1024 * 1024, 1} },
12938 .block_erase = erase_chip_block_jedec,
12939 },
12940 },
12941 .write = write_jedec_1,
12942 .read = read_memmapped,
12943 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012944 .prepare_access = prepare_memory_access,
12945 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012946 },
12947
12948 {
12949 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012950 .name = "MX29GL640EB",
12951 .bustype = BUS_PARALLEL,
12952 .manufacture_id = MACRONIX_ID,
12953 .model_id = MACRONIX_MX29GL640EB,
12954 .total_size = 8192,
12955 .page_size = 128 * 1024, /* actual page size is 16 */
12956 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12957 .tested = TEST_UNTESTED,
12958 .probe = probe_jedec_29gl,
12959 .probe_timing = TIMING_ZERO,
12960 .block_erasers =
12961 {
12962 {
12963 .eraseblocks = {
12964 {8 * 1024, 8},
12965 {64 * 1024, 127},
12966 },
12967 .block_erase = erase_sector_jedec,
12968 }, {
12969 .eraseblocks = { {8 * 1024 * 1024, 1} },
12970 .block_erase = erase_chip_block_jedec,
12971 },
12972 },
12973 .write = write_jedec_1,
12974 .read = read_memmapped,
12975 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012976 .prepare_access = prepare_memory_access,
12977 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012978 },
12979
12980 {
12981 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012982 .name = "MX29GL640EH/L",
12983 .bustype = BUS_PARALLEL,
12984 .manufacture_id = MACRONIX_ID,
12985 .model_id = MACRONIX_MX29GL640EHL,
12986 .total_size = 8192,
12987 .page_size = 128 * 1024, /* actual page size is 16 */
12988 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12989 .tested = TEST_UNTESTED,
12990 .probe = probe_jedec_29gl,
12991 .probe_timing = TIMING_ZERO,
12992 .block_erasers =
12993 {
12994 {
12995 .eraseblocks = { {64 * 1024, 128} },
12996 .block_erase = erase_sector_jedec,
12997 }, {
12998 .eraseblocks = { {8 * 1024 * 1024, 1} },
12999 .block_erase = erase_chip_block_jedec,
13000 },
13001 },
13002 .write = write_jedec_1,
13003 .read = read_memmapped,
13004 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013005 .prepare_access = prepare_memory_access,
13006 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013007 },
13008
13009 {
13010 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000013011 .name = "MX29GL640ET",
13012 .bustype = BUS_PARALLEL,
13013 .manufacture_id = MACRONIX_ID,
13014 .model_id = MACRONIX_MX29GL640ET,
13015 .total_size = 8192,
13016 .page_size = 128 * 1024, /* actual page size is 16 */
13017 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
13018 .tested = TEST_UNTESTED,
13019 .probe = probe_jedec_29gl,
13020 .probe_timing = TIMING_ZERO,
13021 .block_erasers =
13022 {
13023 {
13024 .eraseblocks = {
13025 {64 * 1024, 127},
13026 {8 * 1024, 8},
13027 },
13028 .block_erase = erase_sector_jedec,
13029 }, {
13030 .eraseblocks = { {8 * 1024 * 1024, 1} },
13031 .block_erase = erase_chip_block_jedec,
13032 },
13033 },
13034 .write = write_jedec_1,
13035 .read = read_memmapped,
13036 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013037 .prepare_access = prepare_memory_access,
13038 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000013039 },
13040
13041 {
13042 .vendor = "Macronix",
Carl-Daniel Hailfinger350a0c32009-07-24 13:59:27 +000013043 .name = "MX29LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013044 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013045 .manufacture_id = MACRONIX_ID,
13046 .model_id = MACRONIX_MX29LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013047 .total_size = 512,
13048 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000013049 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
13050 .tested = TEST_UNTESTED,
13051 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000013052 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000013053 .block_erasers =
13054 {
13055 {
Stefan Tauner6697f712014-08-06 15:09:15 +000013056 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000013057 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000013058 }, {
13059 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000013060 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000013061 },
13062 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000013063 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000013064 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013065 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013066 .prepare_access = prepare_memory_access,
13067 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger7de86392008-12-10 10:32:05 +000013068 },
13069
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013070 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013071 .vendor = "Macronix",
Hemanth Guruva Reddya136d422019-07-11 11:08:27 +020013072 .name = "MX66L51235F/MX25L51245G",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013073 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013074 .manufacture_id = MACRONIX_ID,
13075 .model_id = MACRONIX_MX66L51235F,
13076 .total_size = 65536,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013077 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013078 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
13079 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013080 .tested = TEST_OK_PREW,
13081 .probe = probe_spi_rdid,
13082 .probe_timing = TIMING_ZERO,
13083 .block_erasers =
13084 {
13085 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013086 .eraseblocks = { {4 * 1024, 16384} },
13087 .block_erase = spi_block_erase_21,
13088 }, {
13089 .eraseblocks = { {4 * 1024, 16384} },
13090 .block_erase = spi_block_erase_20,
13091 }, {
13092 .eraseblocks = { {32 * 1024, 2048} },
13093 .block_erase = spi_block_erase_5c,
13094 }, {
13095 .eraseblocks = { {32 * 1024, 2048} },
13096 .block_erase = spi_block_erase_52,
13097 }, {
13098 .eraseblocks = { {64 * 1024, 1024} },
13099 .block_erase = spi_block_erase_dc,
13100 }, {
13101 .eraseblocks = { {64 * 1024, 1024} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013102 .block_erase = spi_block_erase_d8,
13103 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013104 .eraseblocks = { {64 * 1024 * 1024, 1} },
13105 .block_erase = spi_block_erase_60,
13106 }, {
13107 .eraseblocks = { {64 * 1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013108 .block_erase = spi_block_erase_c7,
13109 }
13110 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100013111 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
13112 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013113 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013114 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013115 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013116 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020013117 .prepare_access = spi_prepare_io,
13118 .finish_access = spi_finish_io,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013119 },
13120
Patrick Rudolph3ba83152021-06-08 10:52:19 +020013121 {
13122 .vendor = "Macronix",
13123 .name = "MX66L1G45G",
13124 .bustype = BUS_SPI,
13125 .manufacture_id = MACRONIX_ID,
13126 .model_id = MACRONIX_MX66L1G45G,
13127 .total_size = 131072,
13128 .page_size = 256,
13129 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
13130 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
13131 .tested = TEST_OK_PREW,
13132 .probe = probe_spi_rdid,
13133 .probe_timing = TIMING_ZERO,
13134 .block_erasers =
13135 {
13136 {
13137 .eraseblocks = { {4 * 1024, 32768} },
13138 .block_erase = spi_block_erase_21,
13139 }, {
13140 .eraseblocks = { {4 * 1024, 32768} },
13141 .block_erase = spi_block_erase_20,
13142 }, {
13143 .eraseblocks = { {32 * 1024, 4096} },
13144 .block_erase = spi_block_erase_5c,
13145 }, {
13146 .eraseblocks = { {32 * 1024, 4096} },
13147 .block_erase = spi_block_erase_52,
13148 }, {
13149 .eraseblocks = { {64 * 1024, 2048} },
13150 .block_erase = spi_block_erase_dc,
13151 }, {
13152 .eraseblocks = { {64 * 1024, 2048} },
13153 .block_erase = spi_block_erase_d8,
13154 }, {
13155 .eraseblocks = { {128 * 1024 * 1024, 1} },
13156 .block_erase = spi_block_erase_60,
13157 }, {
13158 .eraseblocks = { {128 * 1024 * 1024, 1} },
13159 .block_erase = spi_block_erase_c7,
13160 }
13161 },
13162 /* TODO: security register and SBLK/SBULK, configuration register */
13163 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13164 .unlock = spi_disable_blockprotect_bp3_srwd,
13165 .write = spi_chip_write_256,
13166 .read = spi_chip_read, /* Fast read (0x0B) supported */
13167 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020013168 .prepare_access = spi_prepare_io,
13169 .finish_access = spi_finish_io,
Patrick Rudolph3ba83152021-06-08 10:52:19 +020013170 },
13171
Nico Huberc90d6c42025-01-02 23:37:59 +010013172 {
13173 .vendor = "Microchip",
13174 .name = "25LC080",
13175 .bustype = BUS_SPI,
13176 .total_size = 1,
13177 .page_size = 16,
13178 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13179 .tested = TEST_UNTESTED,
13180 .spi_cmd_set = SPI25_EEPROM,
13181 .probe = probe_noop,
13182 .probe_timing = TIMING_ZERO,
13183 .block_erasers =
13184 {
13185 {
13186 .eraseblocks = { {1 * 1024, 1} },
13187 .block_erase = spi_block_erase_emulation,
13188 }
13189 },
13190
13191 .printlock = spi_prettyprint_status_register_bp1_srwd,
13192 .unlock = spi_disable_blockprotect_bp1_srwd,
13193 .gran = write_gran_1bit,
13194 .write = spi_chip_write_256,
13195 .read = spi_chip_read,
13196 .voltage = {2500, 5500},
13197 },
13198
13199 {
13200 .vendor = "Microchip",
13201 .name = "25LC016",
13202 .bustype = BUS_SPI,
13203 .total_size = 2,
13204 .page_size = 16,
13205 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13206 .tested = TEST_UNTESTED,
13207 .spi_cmd_set = SPI25_EEPROM,
13208 .probe = probe_noop,
13209 .probe_timing = TIMING_ZERO,
13210 .block_erasers =
13211 {
13212 {
13213 .eraseblocks = { {2 * 1024, 1} },
13214 .block_erase = spi_block_erase_emulation,
13215 }
13216 },
13217
13218 .printlock = spi_prettyprint_status_register_bp1_srwd,
13219 .unlock = spi_disable_blockprotect_bp1_srwd,
13220 .gran = write_gran_1bit,
13221 .write = spi_chip_write_256,
13222 .read = spi_chip_read,
13223 .voltage = {2500, 5500},
13224 },
13225
13226 {
13227 .vendor = "Microchip",
13228 .name = "25LC032",
13229 .bustype = BUS_SPI,
13230 .total_size = 4,
13231 .page_size = 32,
13232 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13233 .tested = TEST_UNTESTED,
13234 .spi_cmd_set = SPI25_EEPROM,
13235 .probe = probe_noop,
13236 .probe_timing = TIMING_ZERO,
13237 .block_erasers =
13238 {
13239 {
13240 .eraseblocks = { {4 * 1024, 1} },
13241 .block_erase = spi_block_erase_emulation,
13242 }
13243 },
13244
13245 .printlock = spi_prettyprint_status_register_bp1_srwd,
13246 .unlock = spi_disable_blockprotect_bp1_srwd,
13247 .gran = write_gran_1bit,
13248 .write = spi_chip_write_256,
13249 .read = spi_chip_read,
13250 .voltage = {2500, 5500},
13251 },
13252
13253 {
13254 .vendor = "Microchip",
13255 .name = "25LC064",
13256 .bustype = BUS_SPI,
13257 .total_size = 8,
13258 .page_size = 32,
13259 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13260 .tested = TEST_UNTESTED,
13261 .spi_cmd_set = SPI25_EEPROM,
13262 .probe = probe_noop,
13263 .probe_timing = TIMING_ZERO,
13264 .block_erasers =
13265 {
13266 {
13267 .eraseblocks = { {8 * 1024, 1} },
13268 .block_erase = spi_block_erase_emulation,
13269 }
13270 },
13271
13272 .printlock = spi_prettyprint_status_register_bp1_srwd,
13273 .unlock = spi_disable_blockprotect_bp1_srwd,
13274 .gran = write_gran_1bit,
13275 .write = spi_chip_write_256,
13276 .read = spi_chip_read,
13277 .voltage = {2500, 5500},
13278 },
13279
13280 {
13281 .vendor = "Microchip",
13282 .name = "25LC128",
13283 .bustype = BUS_SPI,
13284 .total_size = 16,
13285 .page_size = 64,
13286 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13287 .tested = TEST_UNTESTED,
13288 .spi_cmd_set = SPI25_EEPROM,
13289 .probe = probe_noop,
13290 .probe_timing = TIMING_ZERO,
13291 .block_erasers =
13292 {
13293 {
13294 .eraseblocks = { {16 * 1024, 1} },
13295 .block_erase = spi_block_erase_emulation,
13296 }
13297 },
13298
13299 .printlock = spi_prettyprint_status_register_bp1_srwd,
13300 .unlock = spi_disable_blockprotect_bp1_srwd,
13301 .gran = write_gran_1bit,
13302 .write = spi_chip_write_256,
13303 .read = spi_chip_read,
13304 .voltage = {2500, 5500},
13305 },
13306
13307 {
13308 .vendor = "Microchip",
13309 .name = "25LC256",
13310 .bustype = BUS_SPI,
13311 .total_size = 32,
13312 .page_size = 64,
13313 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13314 .tested = TEST_UNTESTED,
13315 .spi_cmd_set = SPI25_EEPROM,
13316 .probe = probe_noop,
13317 .probe_timing = TIMING_ZERO,
13318 .block_erasers =
13319 {
13320 {
13321 .eraseblocks = { {32 * 1024, 1} },
13322 .block_erase = spi_block_erase_emulation,
13323 }
13324 },
13325
13326 .printlock = spi_prettyprint_status_register_bp1_srwd,
13327 .unlock = spi_disable_blockprotect_bp1_srwd,
13328 .gran = write_gran_1bit,
13329 .write = spi_chip_write_256,
13330 .read = spi_chip_read,
13331 .voltage = {2500, 5500},
13332 },
13333
13334 {
13335 .vendor = "Microchip",
13336 .name = "25LC512",
13337 .bustype = BUS_SPI,
13338 .total_size = 64,
13339 .page_size = 128,
13340 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13341 .tested = TEST_UNTESTED,
13342 .spi_cmd_set = SPI25_EEPROM,
13343 .probe = probe_noop,
13344 .probe_timing = TIMING_ZERO,
13345 .block_erasers =
13346 {
13347 {
13348 .eraseblocks = { {64 * 1024, 1} },
13349 .block_erase = spi_block_erase_emulation,
13350 }
13351 },
13352
13353 .printlock = spi_prettyprint_status_register_bp1_srwd,
13354 .unlock = spi_disable_blockprotect_bp1_srwd,
13355 .gran = write_gran_1bit,
13356 .write = spi_chip_write_256,
13357 .read = spi_chip_read,
13358 .voltage = {2500, 5500},
13359 },
13360
13361 {
13362 .vendor = "Microchip",
13363 .name = "25LC1024",
13364 .bustype = BUS_SPI,
13365 .total_size = 128,
13366 .page_size = 256,
13367 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13368 .tested = TEST_UNTESTED,
13369 .spi_cmd_set = SPI25_EEPROM,
13370 .probe = probe_noop,
13371 .probe_timing = TIMING_ZERO,
13372 .block_erasers =
13373 {
13374 {
13375 .eraseblocks = { {128 * 1024, 1} },
13376 .block_erase = spi_block_erase_emulation,
13377 }
13378 },
13379
13380 .printlock = spi_prettyprint_status_register_bp1_srwd,
13381 .unlock = spi_disable_blockprotect_bp1_srwd,
13382 .gran = write_gran_1bit,
13383 .write = spi_chip_write_256,
13384 .read = spi_chip_read,
13385 .voltage = {2500, 5500},
13386 },
13387
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013388 /* The ST M25P05 is a bit of a problem. It has the same ID as the
13389 * ST M25P05-A in RES mode, but supports only 128 byte writes instead
13390 * of 256 byte writes. We rely heavily on the fact that probe_spi_res1
13391 * only is successful if RDID does not work.
13392 */
13393 {
13394 .vendor = "Micron/Numonyx/ST",
13395 .name = "M25P05",
13396 .bustype = BUS_SPI,
13397 .manufacture_id = 0, /* Not used. */
13398 .model_id = ST_M25P05_RES,
13399 .total_size = 64,
13400 .page_size = 256,
13401 .feature_bits = FEATURE_WRSR_WREN,
13402 .tested = TEST_UNTESTED,
13403 .probe = probe_spi_res1,
13404 .probe_timing = TIMING_ZERO,
13405 .block_erasers =
13406 {
13407 {
13408 .eraseblocks = { {32 * 1024, 2} },
13409 .block_erase = spi_block_erase_d8,
13410 }, {
13411 .eraseblocks = { {64 * 1024, 1} },
13412 .block_erase = spi_block_erase_c7,
13413 }
13414 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013415 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013416 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013417 .write = spi_chip_write_1, /* 128 */
13418 .read = spi_chip_read,
13419 .voltage = {2700, 3600},
13420 },
13421
13422 {
13423 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013424 .name = "M25P05-A",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013425 .bustype = BUS_SPI,
13426 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013427 .model_id = ST_M25P05A,
13428 .total_size = 64,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013429 .page_size = 256,
13430 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000013431 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013432 .probe = probe_spi_rdid,
13433 .probe_timing = TIMING_ZERO,
13434 .block_erasers =
13435 {
13436 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013437 .eraseblocks = { {32 * 1024, 2} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013438 .block_erase = spi_block_erase_d8,
13439 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013440 .eraseblocks = { {64 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013441 .block_erase = spi_block_erase_c7,
13442 }
13443 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013444 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013445 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013446 .write = spi_chip_write_256,
13447 .read = spi_chip_read,
13448 .voltage = {2700, 3600},
13449 },
13450
13451 /* The ST M25P10 has the same problem as the M25P05. */
13452 {
13453 .vendor = "Micron/Numonyx/ST",
13454 .name = "M25P10",
13455 .bustype = BUS_SPI,
13456 .manufacture_id = 0, /* Not used. */
13457 .model_id = ST_M25P10_RES,
13458 .total_size = 128,
13459 .page_size = 256,
13460 .feature_bits = FEATURE_WRSR_WREN,
13461 .tested = TEST_UNTESTED,
13462 .probe = probe_spi_res1,
13463 .probe_timing = TIMING_ZERO,
13464 .block_erasers =
13465 {
13466 {
13467 .eraseblocks = { {32 * 1024, 4} },
13468 .block_erase = spi_block_erase_d8,
13469 }, {
13470 .eraseblocks = { {128 * 1024, 1} },
13471 .block_erase = spi_block_erase_c7,
13472 }
13473 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013474 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013475 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013476 .write = spi_chip_write_1, /* 128 */
13477 .read = spi_chip_read,
13478 .voltage = {2700, 3600},
13479 },
13480
13481 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013482 .vendor = "Micron/Numonyx/ST",
13483 .name = "M25P10-A",
13484 .bustype = BUS_SPI,
13485 .manufacture_id = ST_ID,
13486 .model_id = ST_M25P10A,
13487 .total_size = 128,
13488 .page_size = 256,
13489 .feature_bits = FEATURE_WRSR_WREN,
13490 .tested = TEST_OK_PREW,
13491 .probe = probe_spi_rdid,
13492 .probe_timing = TIMING_ZERO,
13493 .block_erasers =
13494 {
13495 {
13496 .eraseblocks = { {32 * 1024, 4} },
13497 .block_erase = spi_block_erase_d8,
13498 }, {
13499 .eraseblocks = { {128 * 1024, 1} },
13500 .block_erase = spi_block_erase_c7,
13501 }
13502 },
13503 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
13504 .unlock = spi_disable_blockprotect_bp3_srwd,
13505 .write = spi_chip_write_256,
13506 .read = spi_chip_read,
13507 .voltage = {2700, 3600},
13508 },
13509
13510 {
13511 .vendor = "Micron/Numonyx/ST",
13512 .name = "M25P128",
13513 .bustype = BUS_SPI,
13514 .manufacture_id = ST_ID,
13515 .model_id = ST_M25P128,
13516 .total_size = 16384,
13517 .page_size = 256,
13518 .feature_bits = FEATURE_WRSR_WREN,
13519 .tested = TEST_OK_PREW,
13520 .probe = probe_spi_rdid,
13521 .probe_timing = TIMING_ZERO,
13522 .block_erasers =
13523 {
13524 {
13525 .eraseblocks = { {256 * 1024, 64} },
13526 .block_erase = spi_block_erase_d8,
13527 }, {
13528 .eraseblocks = { {16 * 1024 * 1024, 1} },
13529 .block_erase = spi_block_erase_c7,
13530 }
13531 },
13532 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
13533 .unlock = spi_disable_blockprotect_bp3_srwd,
13534 .write = spi_chip_write_256,
13535 .read = spi_chip_read,
13536 .voltage = {2700, 3600},
13537 },
13538
13539 {
13540 .vendor = "Micron/Numonyx/ST",
13541 .name = "M25P16",
13542 .bustype = BUS_SPI,
13543 .manufacture_id = ST_ID,
13544 .model_id = ST_M25P16,
13545 .total_size = 2048,
13546 .page_size = 256,
13547 .feature_bits = FEATURE_WRSR_WREN,
13548 .tested = TEST_OK_PREW,
13549 .probe = probe_spi_rdid,
13550 .probe_timing = TIMING_ZERO,
13551 .block_erasers =
13552 {
13553 {
13554 .eraseblocks = { {64 * 1024, 32} },
13555 .block_erase = spi_block_erase_d8,
13556 }, {
13557 .eraseblocks = { {2 * 1024 * 1024, 1} },
13558 .block_erase = spi_block_erase_c7,
13559 }
13560 },
13561 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
13562 .unlock = spi_disable_blockprotect_bp3_srwd,
13563 .write = spi_chip_write_256,
13564 .read = spi_chip_read,
13565 .voltage = {2700, 3600},
13566 },
13567
13568 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013569 .vendor = "Micron/Numonyx/ST", /* Numonyx */
13570 .name = "M25P20",
13571 .bustype = BUS_SPI,
13572 .manufacture_id = ST_ID,
13573 .model_id = ST_M25P20,
13574 .total_size = 256,
13575 .page_size = 256,
13576 .feature_bits = FEATURE_WRSR_WREN,
13577 .tested = TEST_UNTESTED,
13578 .probe = probe_spi_rdid,
13579 .probe_timing = TIMING_ZERO,
13580 .block_erasers =
13581 {
13582 {
13583 .eraseblocks = { {64 * 1024, 4} },
13584 .block_erase = spi_block_erase_d8,
13585 }, {
13586 .eraseblocks = { {256 * 1024, 1} },
13587 .block_erase = spi_block_erase_c7,
13588 }
13589 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013590 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013591 .unlock = spi_disable_blockprotect,
13592 .write = spi_chip_write_256,
13593 .read = spi_chip_read, /* Fast read (0x0B) supported */
13594 .voltage = {2700, 3600},
13595 },
13596
13597 {
13598 .vendor = "Micron/Numonyx/ST",
13599 .name = "M25P20-old",
13600 .bustype = BUS_SPI,
13601 .manufacture_id = 0, /* Not used. */
13602 .model_id = ST_M25P20_RES,
13603 .total_size = 256,
13604 .page_size = 256,
13605 .feature_bits = FEATURE_WRSR_WREN,
13606 .tested = TEST_OK_PREW,
13607 .probe = probe_spi_res1,
13608 .probe_timing = TIMING_ZERO,
13609 .block_erasers =
13610 {
13611 {
13612 .eraseblocks = { {64 * 1024, 4} },
13613 .block_erase = spi_block_erase_d8,
13614 }, {
13615 .eraseblocks = { {256 * 1024, 1} },
13616 .block_erase = spi_block_erase_c7,
13617 }
13618 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013619 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013620 .unlock = spi_disable_blockprotect,
13621 .write = spi_chip_write_256,
13622 .read = spi_chip_read, /* Fast read (0x0B) supported */
13623 .voltage = {2700, 3600},
13624 },
13625
13626 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013627 .vendor = "Micron/Numonyx/ST",
13628 .name = "M25P32",
13629 .bustype = BUS_SPI,
13630 .manufacture_id = ST_ID,
13631 .model_id = ST_M25P32,
13632 .total_size = 4096,
13633 .page_size = 256,
13634 .feature_bits = FEATURE_WRSR_WREN,
13635 .tested = TEST_OK_PREW,
13636 .probe = probe_spi_rdid,
13637 .probe_timing = TIMING_ZERO,
13638 .block_erasers =
13639 {
13640 {
13641 .eraseblocks = { {64 * 1024, 64} },
13642 .block_erase = spi_block_erase_d8,
13643 }, {
13644 .eraseblocks = { {4 * 1024 * 1024, 1} },
13645 .block_erase = spi_block_erase_c7,
13646 }
13647 },
13648 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
13649 .unlock = spi_disable_blockprotect_bp3_srwd,
13650 .write = spi_chip_write_256,
13651 .read = spi_chip_read,
13652 .voltage = {2700, 3600},
13653 },
13654
13655 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013656 .vendor = "Micron/Numonyx/ST", /* Numonyx */
13657 .name = "M25P40",
13658 .bustype = BUS_SPI,
13659 .manufacture_id = ST_ID,
13660 .model_id = ST_M25P40,
13661 .total_size = 512,
13662 .page_size = 256,
13663 .feature_bits = FEATURE_WRSR_WREN,
13664 .tested = TEST_OK_PREW,
13665 .probe = probe_spi_rdid,
13666 .probe_timing = TIMING_ZERO,
13667 .block_erasers =
13668 {
13669 {
13670 .eraseblocks = { {64 * 1024, 8} },
13671 .block_erase = spi_block_erase_d8,
13672 }, {
13673 .eraseblocks = { {512 * 1024, 1} },
13674 .block_erase = spi_block_erase_c7,
13675 }
13676 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013677 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013678 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013679 .write = spi_chip_write_256,
13680 .read = spi_chip_read,
13681 .voltage = {2700, 3600},
13682 },
13683
13684 {
13685 .vendor = "Micron/Numonyx/ST",
13686 .name = "M25P40-old",
13687 .bustype = BUS_SPI,
13688 .manufacture_id = 0, /* Not used. */
13689 .model_id = ST_M25P40_RES,
13690 .total_size = 512,
13691 .page_size = 256,
13692 .feature_bits = FEATURE_WRSR_WREN,
13693 .tested = TEST_UNTESTED,
13694 .probe = probe_spi_res1,
13695 .probe_timing = TIMING_ZERO,
13696 .block_erasers =
13697 {
13698 {
13699 .eraseblocks = { {64 * 1024, 8} },
13700 .block_erase = spi_block_erase_d8,
13701 }, {
13702 .eraseblocks = { {512 * 1024, 1} },
13703 .block_erase = spi_block_erase_c7,
13704 }
13705 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013706 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013707 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013708 .write = spi_chip_write_256,
13709 .read = spi_chip_read,
13710 },
13711
13712 {
13713 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013714 .name = "M25P64",
13715 .bustype = BUS_SPI,
13716 .manufacture_id = ST_ID,
13717 .model_id = ST_M25P64,
13718 .total_size = 8192,
13719 .page_size = 256,
13720 .feature_bits = FEATURE_WRSR_WREN,
13721 .tested = TEST_OK_PREW,
13722 .probe = probe_spi_rdid,
13723 .probe_timing = TIMING_ZERO,
13724 .block_erasers =
13725 {
13726 {
13727 .eraseblocks = { {64 * 1024, 128} },
13728 .block_erase = spi_block_erase_d8,
13729 }, {
13730 .eraseblocks = { {8 * 1024 * 1024, 1} },
13731 .block_erase = spi_block_erase_c7,
13732 }
13733 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013734 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013735 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013736 .write = spi_chip_write_256,
13737 .read = spi_chip_read,
13738 .voltage = {2700, 3600},
13739 },
13740
13741 {
13742 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013743 .name = "M25P80",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013744 .bustype = BUS_SPI,
13745 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013746 .model_id = ST_M25P80,
13747 .total_size = 1024,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013748 .page_size = 256,
13749 .feature_bits = FEATURE_WRSR_WREN,
13750 .tested = TEST_OK_PREW,
13751 .probe = probe_spi_rdid,
13752 .probe_timing = TIMING_ZERO,
13753 .block_erasers =
13754 {
13755 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013756 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013757 .block_erase = spi_block_erase_d8,
13758 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013759 .eraseblocks = { {1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013760 .block_erase = spi_block_erase_c7,
13761 }
13762 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013763 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013764 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013765 .write = spi_chip_write_256,
13766 .read = spi_chip_read,
13767 .voltage = {2700, 3600},
13768 },
13769
13770 {
13771 .vendor = "Micron/Numonyx/ST",
13772 .name = "M25PE10",
13773 .bustype = BUS_SPI,
13774 .manufacture_id = ST_ID,
13775 .model_id = ST_M25PE10,
13776 .total_size = 128,
13777 .page_size = 256,
13778 .feature_bits = FEATURE_WRSR_WREN,
13779 .tested = TEST_UNTESTED,
13780 .probe = probe_spi_rdid,
13781 .probe_timing = TIMING_ZERO,
13782 .block_erasers =
13783 {
13784 {
13785 .eraseblocks = { {4 * 1024, 32} },
13786 .block_erase = spi_block_erase_20,
13787 }, {
13788 .eraseblocks = { {64 * 1024, 2} },
13789 .block_erase = spi_block_erase_d8,
13790 }, {
13791 .eraseblocks = { {128 * 1024, 1} },
13792 .block_erase = spi_block_erase_c7,
13793 }
13794 },
13795 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13796 .unlock = spi_disable_blockprotect,
13797 .write = spi_chip_write_256,
13798 .read = spi_chip_read,
13799 .voltage = {2700, 3600},
13800 },
13801
13802 {
13803 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013804 .name = "M25PE16",
13805 .bustype = BUS_SPI,
13806 .manufacture_id = ST_ID,
13807 .model_id = ST_M25PE16,
13808 .total_size = 2048,
13809 .page_size = 256,
13810 .feature_bits = FEATURE_WRSR_WREN,
13811 .tested = TEST_UNTESTED,
13812 .probe = probe_spi_rdid,
13813 .probe_timing = TIMING_ZERO,
13814 .block_erasers =
13815 {
13816 {
13817 .eraseblocks = { {4 * 1024, 512} },
13818 .block_erase = spi_block_erase_20,
13819 }, {
13820 .eraseblocks = { {64 * 1024, 32} },
13821 .block_erase = spi_block_erase_d8,
13822 }, {
13823 .eraseblocks = { {2 * 1024 * 1024, 1} },
13824 .block_erase = spi_block_erase_c7,
13825 }
13826 },
13827 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13828 .unlock = spi_disable_blockprotect,
13829 .write = spi_chip_write_256,
13830 .read = spi_chip_read,
13831 .voltage = {2700, 3600},
13832 },
13833
13834 {
13835 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013836 .name = "M25PE20",
13837 .bustype = BUS_SPI,
13838 .manufacture_id = ST_ID,
13839 .model_id = ST_M25PE20,
13840 .total_size = 256,
13841 .page_size = 256,
13842 .feature_bits = FEATURE_WRSR_WREN,
13843 .tested = TEST_UNTESTED,
13844 .probe = probe_spi_rdid,
13845 .probe_timing = TIMING_ZERO,
13846 .block_erasers =
13847 {
13848 {
13849 .eraseblocks = { {4 * 1024, 64} },
13850 .block_erase = spi_block_erase_20,
13851 }, {
13852 .eraseblocks = { {64 * 1024, 4} },
13853 .block_erase = spi_block_erase_d8,
13854 }, {
13855 .eraseblocks = { {256 * 1024, 1} },
13856 .block_erase = spi_block_erase_c7,
13857 }
13858 },
13859 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13860 .unlock = spi_disable_blockprotect,
13861 .write = spi_chip_write_256,
13862 .read = spi_chip_read,
13863 .voltage = {2700, 3600},
13864 },
13865
13866 {
13867 .vendor = "Micron/Numonyx/ST",
13868 .name = "M25PE40",
13869 .bustype = BUS_SPI,
13870 .manufacture_id = ST_ID,
13871 .model_id = ST_M25PE40,
13872 .total_size = 512,
13873 .page_size = 256,
13874 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000013875 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013876 .probe = probe_spi_rdid,
13877 .probe_timing = TIMING_ZERO,
13878 .block_erasers =
13879 {
13880 {
13881 .eraseblocks = { {4 * 1024, 128} },
13882 .block_erase = spi_block_erase_20,
13883 }, {
13884 .eraseblocks = { {64 * 1024, 8} },
13885 .block_erase = spi_block_erase_d8,
13886 }, {
13887 .eraseblocks = { {512 * 1024, 1} },
13888 .block_erase = spi_block_erase_c7,
13889 }
13890 },
13891 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13892 .unlock = spi_disable_blockprotect,
13893 .write = spi_chip_write_256,
13894 .read = spi_chip_read,
13895 .voltage = {2700, 3600},
13896 },
13897
13898 {
13899 .vendor = "Micron/Numonyx/ST",
13900 .name = "M25PE80",
13901 .bustype = BUS_SPI,
13902 .manufacture_id = ST_ID,
13903 .model_id = ST_M25PE80,
13904 .total_size = 1024,
13905 .page_size = 256,
13906 .feature_bits = FEATURE_WRSR_WREN,
13907 .tested = TEST_OK_PREW,
13908 .probe = probe_spi_rdid,
13909 .probe_timing = TIMING_ZERO,
13910 .block_erasers =
13911 {
13912 {
13913 .eraseblocks = { {4 * 1024, 256} },
13914 .block_erase = spi_block_erase_20,
13915 }, {
13916 .eraseblocks = { {64 * 1024, 16} },
13917 .block_erase = spi_block_erase_d8,
13918 }, {
13919 .eraseblocks = { {1024 * 1024, 1} },
13920 .block_erase = spi_block_erase_c7,
13921 }
13922 },
13923 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13924 .unlock = spi_disable_blockprotect,
13925 .write = spi_chip_write_256,
13926 .read = spi_chip_read,
13927 .voltage = {2700, 3600},
13928 },
13929
13930 {
13931 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013932 .name = "M25PX16",
13933 .bustype = BUS_SPI,
13934 .manufacture_id = ST_ID,
13935 .model_id = ST_M25PX16,
13936 .total_size = 2048,
13937 .page_size = 256,
13938 /* OTP: 64B total; read 0x4B; write 0x42 */
13939 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13940 .tested = TEST_OK_PREW,
13941 .probe = probe_spi_rdid,
13942 .probe_timing = TIMING_ZERO,
13943 .block_erasers =
13944 {
13945 {
13946 .eraseblocks = { { 4 * 1024, 512 } },
13947 .block_erase = spi_block_erase_20,
13948 }, {
13949 .eraseblocks = { {64 * 1024, 32} },
13950 .block_erase = spi_block_erase_d8,
13951 }, {
13952 .eraseblocks = { {2 * 1024 * 1024, 1} },
13953 .block_erase = spi_block_erase_c7,
13954 }
13955 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013956 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013957 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
13958 .write = spi_chip_write_256,
13959 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000013960 .voltage = {2300, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013961 },
13962
13963 {
13964 .vendor = "Micron/Numonyx/ST",
13965 .name = "M25PX32",
13966 .bustype = BUS_SPI,
13967 .manufacture_id = ST_ID,
13968 .model_id = ST_M25PX32,
13969 .total_size = 4096,
13970 .page_size = 256,
13971 /* OTP: 64B total; read 0x4B; write 0x42 */
13972 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13973 .tested = TEST_OK_PRE,
13974 .probe = probe_spi_rdid,
13975 .probe_timing = TIMING_ZERO,
13976 .block_erasers =
13977 {
13978 {
13979 .eraseblocks = { { 4 * 1024, 1024 } },
13980 .block_erase = spi_block_erase_20,
13981 }, {
13982 .eraseblocks = { {64 * 1024, 64} },
13983 .block_erase = spi_block_erase_d8,
13984 }, {
13985 .eraseblocks = { {4 * 1024 * 1024, 1} },
13986 .block_erase = spi_block_erase_c7,
13987 }
13988 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013989 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013990 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
13991 .write = spi_chip_write_256,
13992 .read = spi_chip_read,
13993 .voltage = {2700, 3600},
13994 },
13995
13996 {
13997 .vendor = "Micron/Numonyx/ST",
13998 .name = "M25PX64",
13999 .bustype = BUS_SPI,
14000 .manufacture_id = ST_ID,
14001 .model_id = ST_M25PX64,
14002 .total_size = 8192,
14003 .page_size = 256,
14004 /* OTP: 64B total; read 0x4B; write 0x42 */
14005 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014006 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014007 .probe = probe_spi_rdid,
14008 .probe_timing = TIMING_ZERO,
14009 .block_erasers =
14010 {
14011 {
14012 .eraseblocks = { { 4 * 1024, 2048 } },
14013 .block_erase = spi_block_erase_20,
14014 }, {
14015 .eraseblocks = { {64 * 1024, 128} },
14016 .block_erase = spi_block_erase_d8,
14017 }, {
14018 .eraseblocks = { {8 * 1024 * 1024, 1} },
14019 .block_erase = spi_block_erase_c7,
14020 }
14021 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000014022 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014023 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
14024 .write = spi_chip_write_256,
14025 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014026 .voltage = {2700, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014027 },
14028
14029 {
14030 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014031 .name = "M25PX80",
14032 .bustype = BUS_SPI,
14033 .manufacture_id = ST_ID,
14034 .model_id = ST_M25PX80,
14035 .total_size = 1024,
14036 .page_size = 256,
14037 /* OTP: 64B total; read 0x4B, write 0x42 */
14038 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14039 .tested = TEST_OK_PREW,
14040 .probe = probe_spi_rdid,
14041 .probe_timing = TIMING_ZERO,
14042 .block_erasers =
14043 {
14044 {
14045 .eraseblocks = { { 4 * 1024, 256 } },
14046 .block_erase = spi_block_erase_20,
14047 }, {
14048 .eraseblocks = { {64 * 1024, 16} },
14049 .block_erase = spi_block_erase_d8,
14050 }, {
14051 .eraseblocks = { {1024 * 1024, 1} },
14052 .block_erase = spi_block_erase_c7,
14053 }
14054 },
14055 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
14056 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
14057 .write = spi_chip_write_256,
14058 .read = spi_chip_read,
14059 .voltage = {2700, 3600},
14060 },
14061
14062 {
14063 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014064 .name = "M45PE10",
14065 .bustype = BUS_SPI,
14066 .manufacture_id = ST_ID,
14067 .model_id = ST_M45PE10,
14068 .total_size = 128,
14069 .page_size = 256,
14070 .tested = TEST_UNTESTED,
14071 .probe = probe_spi_rdid,
14072 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014073 .block_erasers =
14074 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014075 {
14076 .eraseblocks = { {256, 512} },
14077 .block_erase = spi_block_erase_db,
14078 }, {
14079 .eraseblocks = { {64 * 1024, 2} },
14080 .block_erase = spi_block_erase_d8,
14081 }
14082 },
14083 .printlock = spi_prettyprint_status_register_default_welwip,
14084 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
14085 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
14086 .read = spi_chip_read, /* Fast read (0x0B) supported */
14087 .voltage = {2700, 3600},
14088 },
14089
14090 {
14091 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014092 .name = "M45PE16",
14093 .bustype = BUS_SPI,
14094 .manufacture_id = ST_ID,
14095 .model_id = ST_M45PE16,
14096 .total_size = 2048,
14097 .page_size = 256,
14098 .tested = TEST_UNTESTED,
14099 .probe = probe_spi_rdid,
14100 .probe_timing = TIMING_ZERO,
14101 .block_erasers =
14102 {
14103 {
14104 .eraseblocks = { {256, 8192} },
14105 .block_erase = spi_block_erase_db,
14106 }, {
14107 .eraseblocks = { {64 * 1024, 32} },
14108 .block_erase = spi_block_erase_d8,
14109 }
14110 },
14111 .printlock = spi_prettyprint_status_register_default_welwip,
14112 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
14113 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
14114 .read = spi_chip_read, /* Fast read (0x0B) supported */
14115 .voltage = {2700, 3600},
14116 },
14117
14118 {
14119 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014120 .name = "M45PE20",
14121 .bustype = BUS_SPI,
14122 .manufacture_id = ST_ID,
14123 .model_id = ST_M45PE20,
14124 .total_size = 256,
14125 .page_size = 256,
14126 .tested = TEST_UNTESTED,
14127 .probe = probe_spi_rdid,
14128 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014129 .block_erasers =
14130 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014131 {
14132 .eraseblocks = { {256, 1024} },
14133 .block_erase = spi_block_erase_db,
14134 }, {
14135 .eraseblocks = { {64 * 1024, 4} },
14136 .block_erase = spi_block_erase_d8,
14137 }
14138 },
14139 .printlock = spi_prettyprint_status_register_default_welwip,
14140 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
14141 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
14142 .read = spi_chip_read, /* Fast read (0x0B) supported */
14143 .voltage = {2700, 3600},
14144 },
14145
14146 {
14147 .vendor = "Micron/Numonyx/ST",
14148 .name = "M45PE40",
14149 .bustype = BUS_SPI,
14150 .manufacture_id = ST_ID,
14151 .model_id = ST_M45PE40,
14152 .total_size = 512,
14153 .page_size = 256,
14154 .tested = TEST_UNTESTED,
14155 .probe = probe_spi_rdid,
14156 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014157 .block_erasers =
14158 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014159 {
14160 .eraseblocks = { {256, 2048} },
14161 .block_erase = spi_block_erase_db,
14162 }, {
14163 .eraseblocks = { {64 * 1024, 8} },
14164 .block_erase = spi_block_erase_d8,
14165 }
14166 },
14167 .printlock = spi_prettyprint_status_register_default_welwip,
14168 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
Stefan Tauner23e10b82016-01-23 16:16:49 +000014169 .write = spi_chip_write_256, /* Page write supported (similar to PP but allows 0->1 changes) */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014170 .read = spi_chip_read, /* Fast read (0x0B) supported */
14171 .voltage = {2700, 3600},
14172 },
14173
14174 {
14175 .vendor = "Micron/Numonyx/ST",
14176 .name = "M45PE80",
14177 .bustype = BUS_SPI,
14178 .manufacture_id = ST_ID,
14179 .model_id = ST_M45PE80,
14180 .total_size = 1024,
14181 .page_size = 256,
14182 .tested = TEST_UNTESTED,
14183 .probe = probe_spi_rdid,
14184 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014185 .block_erasers =
14186 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014187 {
14188 .eraseblocks = { {256, 4096} },
14189 .block_erase = spi_block_erase_db,
14190 }, {
14191 .eraseblocks = { {64 * 1024, 16} },
14192 .block_erase = spi_block_erase_d8,
14193 }
14194 },
14195 .printlock = spi_prettyprint_status_register_default_welwip,
14196 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
14197 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
14198 .read = spi_chip_read, /* Fast read (0x0B) supported */
14199 .voltage = {2700, 3600},
14200 },
14201
14202 {
14203 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014204 .name = "N25Q00A..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
14205 .bustype = BUS_SPI,
14206 .manufacture_id = ST_ID,
14207 .model_id = ST_N25Q00A__1G,
14208 .total_size = 131072,
14209 .page_size = 256,
14210 /* supports SFDP */
14211 /* OTP: 64B total; read 0x4B, write 0x42 */
14212 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14213 .tested = TEST_UNTESTED,
14214 .probe = probe_spi_rdid,
14215 .probe_timing = TIMING_ZERO,
14216 .block_erasers =
14217 {
14218 {
14219 .eraseblocks = { {4 * 1024, 32768} },
14220 .block_erase = spi_block_erase_21,
14221 }, {
14222 .eraseblocks = { {4 * 1024, 32768} },
14223 .block_erase = spi_block_erase_20,
14224 }, {
14225 .eraseblocks = { {64 * 1024, 2048} },
14226 .block_erase = spi_block_erase_dc,
14227 }, {
14228 .eraseblocks = { {64 * 1024, 2048} },
14229 .block_erase = spi_block_erase_d8,
14230 }, {
14231 .eraseblocks = { {32768 * 1024, 4} },
14232 .block_erase = spi_block_erase_c4,
14233 }
14234 },
14235 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14236 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14237 .write = spi_chip_write_256, /* Multi I/O supported */
14238 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14239 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014240 .prepare_access = spi_prepare_io,
14241 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014242 },
14243
14244 {
14245 .vendor = "Micron/Numonyx/ST",
14246 .name = "N25Q00A..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
14247 .bustype = BUS_SPI,
14248 .manufacture_id = ST_ID,
14249 .model_id = ST_N25Q00A__3G,
14250 .total_size = 131072,
14251 .page_size = 256,
14252 /* supports SFDP */
14253 /* OTP: 64B total; read 0x4B, write 0x42 */
14254 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14255 .tested = TEST_UNTESTED,
14256 .probe = probe_spi_rdid,
14257 .probe_timing = TIMING_ZERO,
14258 .block_erasers =
14259 {
14260 {
14261 .eraseblocks = { {4 * 1024, 32768} },
14262 .block_erase = spi_block_erase_21,
14263 }, {
14264 .eraseblocks = { {4 * 1024, 32768} },
14265 .block_erase = spi_block_erase_20,
14266 }, {
14267 .eraseblocks = { {64 * 1024, 2048} },
14268 .block_erase = spi_block_erase_dc,
14269 }, {
14270 .eraseblocks = { {64 * 1024, 2048} },
14271 .block_erase = spi_block_erase_d8,
14272 }, {
14273 .eraseblocks = { {32768 * 1024, 4} },
14274 .block_erase = spi_block_erase_c4,
14275 }
14276 },
14277 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14278 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14279 .write = spi_chip_write_256, /* Multi I/O supported */
14280 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14281 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014282 .prepare_access = spi_prepare_io,
14283 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014284 },
14285
14286 {
14287 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014288 .name = "N25Q016",
14289 .bustype = BUS_SPI,
14290 .manufacture_id = ST_ID,
14291 .model_id = ST_N25Q016__1E,
14292 .total_size = 2048,
14293 .page_size = 256,
14294 /* supports SFDP */
14295 /* OTP: 64B total; read 0x4B, write 0x42 */
14296 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14297 .tested = TEST_UNTESTED,
14298 .probe = probe_spi_rdid,
14299 .probe_timing = TIMING_ZERO,
14300 .block_erasers =
14301 {
14302 {
14303 .eraseblocks = { {4 * 1024, 512} },
14304 .block_erase = spi_block_erase_20,
14305 }, {
14306 .eraseblocks = { {32 * 1024, 64} },
14307 .block_erase = spi_block_erase_52,
14308 }, {
14309 .eraseblocks = { {64 * 1024, 32} },
14310 .block_erase = spi_block_erase_d8,
14311 }, {
14312 .eraseblocks = { {2 * 1024 * 1024, 1} },
14313 .block_erase = spi_block_erase_c7,
14314 }
14315 },
14316 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14317 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14318 .write = spi_chip_write_256, /* Multi I/O supported */
14319 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14320 .voltage = {1700, 2000},
14321 },
14322
14323 {
14324 .vendor = "Micron/Numonyx/ST",
14325 .name = "N25Q032..1E",
14326 .bustype = BUS_SPI,
14327 .manufacture_id = ST_ID,
14328 .model_id = ST_N25Q032__1E,
14329 .total_size = 4096,
14330 .page_size = 256,
14331 /* supports SFDP */
14332 /* OTP: 64B total; read 0x4B, write 0x42 */
14333 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14334 .tested = TEST_UNTESTED,
14335 .probe = probe_spi_rdid,
14336 .probe_timing = TIMING_ZERO,
14337 .block_erasers =
14338 {
14339 {
14340 .eraseblocks = { {4 * 1024, 1024} },
14341 .block_erase = spi_block_erase_20,
14342 }, {
14343 .eraseblocks = { {64 * 1024, 64} },
14344 .block_erase = spi_block_erase_d8,
14345 }, {
14346 .eraseblocks = { {4 * 1024 * 1024, 1} },
14347 .block_erase = spi_block_erase_c7,
14348 }
14349 },
14350 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14351 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14352 .write = spi_chip_write_256, /* Multi I/O supported */
14353 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14354 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014355 .reg_bits =
14356 {
14357 /*
14358 * There is also a volatile lock register per 64KiB sector, which is not
14359 * mutually exclusive with BP-based protection.
14360 */
14361 .srp = {STATUS1, 7, RW},
14362 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
14363 .tb = {STATUS1, 5, RW},
14364 },
Nico Huberaabb3e02023-01-13 00:22:30 +010014365 .wp_write_cfg = spi_wp_write_cfg,
14366 .wp_read_cfg = spi_wp_read_cfg,
14367 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014368 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014369 },
14370
14371 {
14372 .vendor = "Micron/Numonyx/ST",
14373 .name = "N25Q032..3E",
14374 .bustype = BUS_SPI,
14375 .manufacture_id = ST_ID,
14376 .model_id = ST_N25Q032__3E,
14377 .total_size = 4096,
14378 .page_size = 256,
14379 /* supports SFDP */
14380 /* OTP: 64B total; read 0x4B, write 0x42 */
14381 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14382 .tested = TEST_OK_PREW,
14383 .probe = probe_spi_rdid,
14384 .probe_timing = TIMING_ZERO,
14385 .block_erasers =
14386 {
14387 {
14388 .eraseblocks = { {4 * 1024, 1024} },
14389 .block_erase = spi_block_erase_20,
14390 }, {
14391 .eraseblocks = { {64 * 1024, 64} },
14392 .block_erase = spi_block_erase_d8,
14393 }, {
14394 .eraseblocks = { {4 * 1024 * 1024, 1} },
14395 .block_erase = spi_block_erase_c7,
14396 }
14397 },
14398 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14399 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14400 .write = spi_chip_write_256, /* Multi I/O supported */
14401 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14402 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014403 .reg_bits =
14404 {
14405 /*
14406 * There is also a volatile lock register per 64KiB sector, which is not
14407 * mutually exclusive with BP-based protection.
14408 */
14409 .srp = {STATUS1, 7, RW},
14410 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
14411 .tb = {STATUS1, 5, RW},
14412 },
Nico Huberaabb3e02023-01-13 00:22:30 +010014413 .wp_write_cfg = spi_wp_write_cfg,
14414 .wp_read_cfg = spi_wp_read_cfg,
14415 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014416 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014417 },
14418
14419 {
14420 .vendor = "Micron/Numonyx/ST",
14421 .name = "N25Q064..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
14422 .bustype = BUS_SPI,
14423 .manufacture_id = ST_ID,
14424 .model_id = ST_N25Q064__1E,
14425 .total_size = 8192,
14426 .page_size = 256,
14427 /* supports SFDP */
14428 /* OTP: 64B total; read 0x4B, write 0x42 */
14429 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014430 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014431 .probe = probe_spi_rdid,
14432 .probe_timing = TIMING_ZERO,
14433 .block_erasers =
14434 {
14435 {
14436 .eraseblocks = { {4 * 1024, 2048 } },
14437 .block_erase = spi_block_erase_20,
14438 }, {
14439 .eraseblocks = { {64 * 1024, 128} },
14440 .block_erase = spi_block_erase_d8,
14441 }, {
14442 .eraseblocks = { {8 * 1024 * 1024, 1} },
14443 .block_erase = spi_block_erase_c7,
14444 }
14445 },
14446 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14447 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14448 .write = spi_chip_write_256, /* Multi I/O supported */
14449 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14450 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014451 .reg_bits =
14452 {
14453 /*
14454 * There is also a volatile lock register per 64KiB sector, which is not
14455 * mutually exclusive with BP-based protection.
14456 */
14457 .srp = {STATUS1, 7, RW},
14458 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
14459 .tb = {STATUS1, 5, RW},
14460 },
Nico Huberaabb3e02023-01-13 00:22:30 +010014461 .wp_write_cfg = spi_wp_write_cfg,
14462 .wp_read_cfg = spi_wp_read_cfg,
14463 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014464 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014465 },
14466
14467 {
14468 .vendor = "Micron/Numonyx/ST",
14469 .name = "N25Q064..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
14470 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100014471 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014472 .model_id = ST_N25Q064__3E,
14473 .total_size = 8192,
14474 .page_size = 256,
14475 /* supports SFDP */
14476 /* OTP: 64B total; read 0x4B, write 0x42 */
14477 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14478 .tested = TEST_OK_PREW,
14479 .probe = probe_spi_rdid,
14480 .probe_timing = TIMING_ZERO,
14481 .block_erasers =
14482 {
14483 {
14484 .eraseblocks = { {4 * 1024, 2048 } },
14485 .block_erase = spi_block_erase_20,
14486 }, {
14487 .eraseblocks = { {64 * 1024, 128} },
14488 .block_erase = spi_block_erase_d8,
14489 }, {
14490 .eraseblocks = { {8 * 1024 * 1024, 1} },
14491 .block_erase = spi_block_erase_c7,
14492 }
14493 },
14494 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14495 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14496 .write = spi_chip_write_256, /* Multi I/O supported */
14497 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14498 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014499 .reg_bits =
14500 {
14501 /*
14502 * There is also a volatile lock register per 64KiB sector, which is not
14503 * mutually exclusive with BP-based protection.
14504 */
14505 .srp = {STATUS1, 7, RW},
14506 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
14507 .tb = {STATUS1, 5, RW},
14508 },
Nico Huberaabb3e02023-01-13 00:22:30 +010014509 .wp_write_cfg = spi_wp_write_cfg,
14510 .wp_read_cfg = spi_wp_read_cfg,
14511 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014512 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014513 },
14514
14515 {
14516 .vendor = "Micron/Numonyx/ST",
14517 .name = "N25Q128..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
14518 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100014519 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014520 .model_id = ST_N25Q128__1E,
14521 .total_size = 16384,
14522 .page_size = 256,
14523 /* supports SFDP */
14524 /* OTP: 64B total; read 0x4B, write 0x42 */
14525 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +000014526 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014527 .probe = probe_spi_rdid,
14528 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014529 .block_erasers =
14530 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014531 {
14532 .eraseblocks = { {4 * 1024, 4096 } },
14533 .block_erase = spi_block_erase_20,
14534 }, {
14535 .eraseblocks = { {64 * 1024, 256} },
14536 .block_erase = spi_block_erase_d8,
14537 }, {
14538 .eraseblocks = { {16384 * 1024, 1} },
14539 .block_erase = spi_block_erase_c7,
14540 }
14541 },
14542 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14543 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14544 .write = spi_chip_write_256, /* Multi I/O supported */
14545 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14546 .voltage = {1700, 2000},
14547 },
14548
14549 {
14550 .vendor = "Micron/Numonyx/ST",
14551 .name = "N25Q128..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
14552 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100014553 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014554 .model_id = ST_N25Q128__3E,
14555 .total_size = 16384,
14556 .page_size = 256,
14557 /* supports SFDP */
14558 /* OTP: 64B total; read 0x4B, write 0x42 */
14559 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14560 .tested = TEST_OK_PREW,
14561 .probe = probe_spi_rdid,
14562 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014563 .block_erasers =
14564 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014565 {
14566 .eraseblocks = { {4 * 1024, 4096 } },
14567 .block_erase = spi_block_erase_20,
14568 }, {
14569 .eraseblocks = { {64 * 1024, 256} },
14570 .block_erase = spi_block_erase_d8,
14571 }, {
14572 .eraseblocks = { {16384 * 1024, 1} },
14573 .block_erase = spi_block_erase_c7,
14574 }
14575 },
14576 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14577 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14578 .write = spi_chip_write_256, /* Multi I/O supported */
14579 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14580 .voltage = {2700, 3600},
14581 },
14582
14583 {
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014584 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014585 .name = "N25Q256..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
14586 .bustype = BUS_SPI,
14587 .manufacture_id = ST_ID,
14588 .model_id = ST_N25Q256__1E,
14589 .total_size = 32768,
14590 .page_size = 256,
14591 /* supports SFDP */
14592 /* OTP: 64B total; read 0x4B, write 0x42 */
14593 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14594 .tested = TEST_UNTESTED,
14595 .probe = probe_spi_rdid,
14596 .probe_timing = TIMING_ZERO,
14597 .block_erasers =
14598 {
14599 {
14600 .eraseblocks = { {4 * 1024, 8192} },
14601 .block_erase = spi_block_erase_21,
14602 }, {
14603 .eraseblocks = { {4 * 1024, 8192} },
14604 .block_erase = spi_block_erase_20,
14605 }, {
14606 .eraseblocks = { {64 * 1024, 512} },
14607 .block_erase = spi_block_erase_dc,
14608 }, {
14609 .eraseblocks = { {64 * 1024, 512} },
14610 .block_erase = spi_block_erase_d8,
14611 }, {
14612 .eraseblocks = { {32768 * 1024, 1} },
14613 .block_erase = spi_block_erase_c7,
14614 }
14615 },
14616 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14617 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14618 .write = spi_chip_write_256, /* Multi I/O supported */
14619 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14620 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014621 .prepare_access = spi_prepare_io,
14622 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014623 },
14624
14625 {
14626 .vendor = "Micron/Numonyx/ST",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014627 .name = "N25Q256..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
14628 .bustype = BUS_SPI,
14629 .manufacture_id = ST_ID,
14630 .model_id = ST_N25Q256__3E,
14631 .total_size = 32768,
14632 .page_size = 256,
14633 /* supports SFDP */
14634 /* OTP: 64B total; read 0x4B, write 0x42 */
14635 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14636 .tested = TEST_UNTESTED,
14637 .probe = probe_spi_rdid,
14638 .probe_timing = TIMING_ZERO,
14639 .block_erasers =
14640 {
14641 {
14642 .eraseblocks = { {4 * 1024, 8192} },
14643 .block_erase = spi_block_erase_21,
14644 }, {
14645 .eraseblocks = { {4 * 1024, 8192} },
14646 .block_erase = spi_block_erase_20,
14647 }, {
14648 .eraseblocks = { {64 * 1024, 512} },
14649 .block_erase = spi_block_erase_dc,
14650 }, {
14651 .eraseblocks = { {64 * 1024, 512} },
14652 .block_erase = spi_block_erase_d8,
14653 }, {
14654 .eraseblocks = { {32768 * 1024, 1} },
14655 .block_erase = spi_block_erase_c7,
14656 }
14657 },
14658 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14659 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14660 .write = spi_chip_write_256, /* Multi I/O supported */
14661 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14662 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014663 .prepare_access = spi_prepare_io,
14664 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014665 },
14666
14667 {
14668 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014669 .name = "N25Q512..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014670 .bustype = BUS_SPI,
14671 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014672 .model_id = ST_N25Q512__1G,
14673 .total_size = 65536,
14674 .page_size = 256,
14675 /* supports SFDP */
14676 /* OTP: 64B total; read 0x4B, write 0x42 */
14677 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14678 .tested = TEST_UNTESTED,
14679 .probe = probe_spi_rdid,
14680 .probe_timing = TIMING_ZERO,
14681 .block_erasers =
14682 {
14683 {
14684 .eraseblocks = { {4 * 1024, 16384} },
14685 .block_erase = spi_block_erase_21,
14686 }, {
14687 .eraseblocks = { {4 * 1024, 16384} },
14688 .block_erase = spi_block_erase_20,
14689 }, {
14690 .eraseblocks = { {64 * 1024, 1024} },
14691 .block_erase = spi_block_erase_dc,
14692 }, {
14693 .eraseblocks = { {64 * 1024, 1024} },
14694 .block_erase = spi_block_erase_d8,
14695 }, {
14696 .eraseblocks = { {32768 * 1024, 2} },
14697 .block_erase = spi_block_erase_c4,
14698 }
14699 },
14700 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14701 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14702 .write = spi_chip_write_256, /* Multi I/O supported */
14703 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14704 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014705 .prepare_access = spi_prepare_io,
14706 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014707 },
14708
14709 {
14710 .vendor = "Micron/Numonyx/ST",
14711 .name = "N25Q512..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
14712 .bustype = BUS_SPI,
14713 .manufacture_id = ST_ID,
14714 .model_id = ST_N25Q512__3G,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014715 .total_size = 65536,
14716 .page_size = 256,
14717 /* supports SFDP */
14718 /* OTP: 64B total; read 0x4B, write 0x42 */
14719 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14720 .tested = TEST_OK_PREW,
14721 .probe = probe_spi_rdid,
14722 .probe_timing = TIMING_ZERO,
14723 .block_erasers =
14724 {
14725 {
14726 .eraseblocks = { {4 * 1024, 16384} },
14727 .block_erase = spi_block_erase_21,
14728 }, {
14729 .eraseblocks = { {4 * 1024, 16384} },
14730 .block_erase = spi_block_erase_20,
14731 }, {
14732 .eraseblocks = { {64 * 1024, 1024} },
14733 .block_erase = spi_block_erase_dc,
14734 }, {
14735 .eraseblocks = { {64 * 1024, 1024} },
14736 .block_erase = spi_block_erase_d8,
14737 }, {
Jacob Creedone8e7b0e2019-07-22 12:21:22 -070014738 .eraseblocks = { {32768 * 1024, 2} },
14739 .block_erase = spi_block_erase_c4,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014740 }
14741 },
14742 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14743 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14744 .write = spi_chip_write_256, /* Multi I/O supported */
14745 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14746 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014747 .prepare_access = spi_prepare_io,
14748 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014749 },
14750
14751 {
Ed Swierk199ab392017-07-03 13:33:44 -070014752 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014753 .name = "MT25QL01G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
14754 .bustype = BUS_SPI,
14755 .manufacture_id = ST_ID,
14756 .model_id = ST_N25Q00A__3G,
14757 .total_size = 131072,
14758 .page_size = 256,
14759 /* supports SFDP */
14760 /* OTP: 64B total; read 0x4B, write 0x42 */
14761 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14762 .tested = TEST_OK_PREW,
14763 .probe = probe_spi_rdid,
14764 .probe_timing = TIMING_ZERO,
14765 .block_erasers =
14766 {
14767 {
14768 .eraseblocks = { {4 * 1024, 32768} },
14769 .block_erase = spi_block_erase_21,
14770 }, {
14771 .eraseblocks = { {4 * 1024, 32768} },
14772 .block_erase = spi_block_erase_20,
14773 }, {
14774 .eraseblocks = { {32 * 1024, 4096} },
14775 .block_erase = spi_block_erase_5c,
14776 }, {
14777 .eraseblocks = { {32 * 1024, 4096} },
14778 .block_erase = spi_block_erase_52,
14779 }, {
14780 .eraseblocks = { {64 * 1024, 2048} },
14781 .block_erase = spi_block_erase_dc,
14782 }, {
14783 .eraseblocks = { {64 * 1024, 2048} },
14784 .block_erase = spi_block_erase_d8,
14785 }, {
14786 .eraseblocks = { {65536 * 1024, 2} },
14787 .block_erase = spi_block_erase_c4,
14788 }
14789 },
14790 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14791 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14792 .write = spi_chip_write_256, /* Multi I/O supported */
14793 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14794 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014795 .prepare_access = spi_prepare_io,
14796 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014797 },
14798
14799 {
14800 .vendor = "Micron",
14801 .name = "MT25QU01G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
14802 .bustype = BUS_SPI,
14803 .manufacture_id = ST_ID,
14804 .model_id = ST_N25Q00A__1G,
14805 .total_size = 131072,
14806 .page_size = 256,
14807 /* supports SFDP */
14808 /* OTP: 64B total; read 0x4B, write 0x42 */
14809 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14810 .tested = TEST_UNTESTED,
14811 .probe = probe_spi_rdid,
14812 .probe_timing = TIMING_ZERO,
14813 .block_erasers =
14814 {
14815 {
14816 .eraseblocks = { {4 * 1024, 32768} },
14817 .block_erase = spi_block_erase_21,
14818 }, {
14819 .eraseblocks = { {4 * 1024, 32768} },
14820 .block_erase = spi_block_erase_20,
14821 }, {
14822 .eraseblocks = { {32 * 1024, 4096} },
14823 .block_erase = spi_block_erase_5c,
14824 }, {
14825 .eraseblocks = { {32 * 1024, 4096} },
14826 .block_erase = spi_block_erase_52,
14827 }, {
14828 .eraseblocks = { {64 * 1024, 2048} },
14829 .block_erase = spi_block_erase_dc,
14830 }, {
14831 .eraseblocks = { {64 * 1024, 2048} },
14832 .block_erase = spi_block_erase_d8,
14833 }, {
14834 .eraseblocks = { {65536 * 1024, 2} },
14835 .block_erase = spi_block_erase_c4,
14836 }
14837 },
14838 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14839 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14840 .write = spi_chip_write_256, /* Multi I/O supported */
14841 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14842 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014843 .prepare_access = spi_prepare_io,
14844 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014845 },
14846
14847 {
14848 .vendor = "Micron",
14849 .name = "MT25QL02G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
14850 .bustype = BUS_SPI,
14851 .manufacture_id = ST_ID,
14852 .model_id = ST_MT25QL02G,
14853 .total_size = 262144,
14854 .page_size = 256,
14855 /* supports SFDP */
14856 /* OTP: 64B total; read 0x4B, write 0x42 */
14857 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14858 .tested = TEST_UNTESTED,
14859 .probe = probe_spi_rdid,
14860 .probe_timing = TIMING_ZERO,
14861 .block_erasers =
14862 {
14863 {
14864 .eraseblocks = { {4 * 1024, 65536} },
14865 .block_erase = spi_block_erase_21,
14866 }, {
14867 .eraseblocks = { {4 * 1024, 65536} },
14868 .block_erase = spi_block_erase_20,
14869 }, {
14870 .eraseblocks = { {32 * 1024, 8192} },
14871 .block_erase = spi_block_erase_5c,
14872 }, {
14873 .eraseblocks = { {32 * 1024, 8192} },
14874 .block_erase = spi_block_erase_52,
14875 }, {
14876 .eraseblocks = { {64 * 1024, 4096} },
14877 .block_erase = spi_block_erase_dc,
14878 }, {
14879 .eraseblocks = { {64 * 1024, 4096} },
14880 .block_erase = spi_block_erase_d8,
14881 }, {
14882 .eraseblocks = { {65536 * 1024, 4} },
14883 .block_erase = spi_block_erase_c4,
14884 }
14885 },
14886 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14887 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14888 .write = spi_chip_write_256, /* Multi I/O supported */
14889 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14890 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014891 .prepare_access = spi_prepare_io,
14892 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014893 },
14894
14895 {
14896 .vendor = "Micron",
14897 .name = "MT25QU02G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
14898 .bustype = BUS_SPI,
14899 .manufacture_id = ST_ID,
14900 .model_id = ST_MT25QU02G,
14901 .total_size = 262144,
14902 .page_size = 256,
14903 /* supports SFDP */
14904 /* OTP: 64B total; read 0x4B, write 0x42 */
14905 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14906 .tested = TEST_UNTESTED,
14907 .probe = probe_spi_rdid,
14908 .probe_timing = TIMING_ZERO,
14909 .block_erasers =
14910 {
14911 {
14912 .eraseblocks = { {4 * 1024, 65536} },
14913 .block_erase = spi_block_erase_21,
14914 }, {
14915 .eraseblocks = { {4 * 1024, 65536} },
14916 .block_erase = spi_block_erase_20,
14917 }, {
14918 .eraseblocks = { {32 * 1024, 8192} },
14919 .block_erase = spi_block_erase_5c,
14920 }, {
14921 .eraseblocks = { {32 * 1024, 8192} },
14922 .block_erase = spi_block_erase_52,
14923 }, {
14924 .eraseblocks = { {64 * 1024, 4096} },
14925 .block_erase = spi_block_erase_dc,
14926 }, {
14927 .eraseblocks = { {64 * 1024, 4096} },
14928 .block_erase = spi_block_erase_d8,
14929 }, {
14930 .eraseblocks = { {65536 * 1024, 4} },
14931 .block_erase = spi_block_erase_c4,
14932 }
14933 },
14934 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14935 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14936 .write = spi_chip_write_256, /* Multi I/O supported */
14937 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14938 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014939 .prepare_access = spi_prepare_io,
14940 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014941 },
14942
14943 {
14944 .vendor = "Micron",
14945 .name = "MT25QU128", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
14946 .bustype = BUS_SPI,
14947 .manufacture_id = ST_ID,
14948 .model_id = ST_N25Q128__1E,
14949 .total_size = 16384,
14950 .page_size = 256,
14951 /* supports SFDP */
14952 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huber48dc0902023-03-05 17:20:55 +010014953 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014954 .tested = TEST_UNTESTED,
14955 .probe = probe_spi_rdid,
14956 .probe_timing = TIMING_ZERO,
14957 .block_erasers =
14958 {
14959 {
14960 .eraseblocks = { {4 * 1024, 4096} },
14961 .block_erase = spi_block_erase_20,
14962 }, {
14963 .eraseblocks = { {32 * 1024, 512} },
14964 .block_erase = spi_block_erase_52,
14965 }, {
14966 .eraseblocks = { {64 * 1024, 256} },
14967 .block_erase = spi_block_erase_d8,
14968 }, {
14969 .eraseblocks = { {16384 * 1024, 1} },
14970 .block_erase = spi_block_erase_c7,
14971 }, {
14972 .eraseblocks = { {16384 * 1024, 1} },
14973 .block_erase = spi_block_erase_60,
14974 }
14975 },
14976 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14977 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14978 .write = spi_chip_write_256, /* Multi I/O supported */
14979 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14980 .voltage = {1700, 2000},
14981 },
14982
14983 {
14984 .vendor = "Micron",
14985 .name = "MT25QL128", /* L = 3V, uniform 64KB/4KB blocks/sectors */
14986 .bustype = BUS_SPI,
14987 .manufacture_id = ST_ID,
14988 .model_id = ST_N25Q128__3E,
14989 .total_size = 16384,
14990 .page_size = 256,
14991 /* supports SFDP */
14992 /* OTP: 64B total; read 0x4B, write 0x42 */
Rick Altherr1e563602022-12-22 10:25:34 -080014993 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14994 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014995 .probe = probe_spi_rdid,
14996 .probe_timing = TIMING_ZERO,
14997 .block_erasers =
14998 {
14999 {
15000 .eraseblocks = { {4 * 1024, 4096} },
15001 .block_erase = spi_block_erase_20,
15002 }, {
15003 .eraseblocks = { {32 * 1024, 512} },
15004 .block_erase = spi_block_erase_52,
15005 }, {
15006 .eraseblocks = { {64 * 1024, 256} },
15007 .block_erase = spi_block_erase_d8,
15008 }, {
15009 .eraseblocks = { {16384 * 1024, 1} },
15010 .block_erase = spi_block_erase_c7,
15011 }, {
15012 .eraseblocks = { {16384 * 1024, 1} },
15013 .block_erase = spi_block_erase_60,
15014 }
15015 },
15016 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15017 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15018 .write = spi_chip_write_256, /* Multi I/O supported */
15019 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15020 .voltage = {2700, 3600},
15021 },
15022
15023 {
15024 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070015025 .name = "MT25QL256", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070015026 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100015027 .manufacture_id = ST_ID,
Ed Swierk199ab392017-07-03 13:33:44 -070015028 .model_id = ST_N25Q256__3E,
15029 .total_size = 32768,
15030 .page_size = 256,
15031 /* supports SFDP */
15032 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010015033 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Simon Buhrowb7014f92021-02-15 13:16:57 +010015034 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070015035 .probe = probe_spi_rdid,
15036 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100015037 .block_erasers =
15038 {
Ed Swierk199ab392017-07-03 13:33:44 -070015039 {
15040 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020015041 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070015042 }, {
Nico Huberaac81422017-11-10 22:54:13 +010015043 .eraseblocks = { {4 * 1024, 8192} },
15044 .block_erase = spi_block_erase_20,
15045 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070015046 .eraseblocks = { {32 * 1024, 1024} },
15047 .block_erase = spi_block_erase_5c,
15048 }, {
15049 .eraseblocks = { {32 * 1024, 1024} },
15050 .block_erase = spi_block_erase_52,
15051 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070015052 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020015053 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070015054 }, {
Nico Huberaac81422017-11-10 22:54:13 +010015055 .eraseblocks = { {64 * 1024, 512} },
15056 .block_erase = spi_block_erase_d8,
15057 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070015058 .eraseblocks = { {32768 * 1024, 1} },
15059 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070015060 }, {
15061 .eraseblocks = { {32768 * 1024, 1} },
15062 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070015063 }
15064 },
15065 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15066 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15067 .write = spi_chip_write_256, /* Multi I/O supported */
15068 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15069 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020015070 .prepare_access = spi_prepare_io,
15071 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070015072 },
15073
15074 {
15075 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015076 .name = "MT25QU256", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
15077 .bustype = BUS_SPI,
15078 .manufacture_id = ST_ID,
15079 .model_id = ST_N25Q256__1E,
15080 .total_size = 32768,
15081 .page_size = 256,
15082 /* supports SFDP */
15083 /* OTP: 64B total; read 0x4B, write 0x42 */
15084 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons59052582022-03-08 15:23:58 +010015085 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015086 .probe = probe_spi_rdid,
15087 .probe_timing = TIMING_ZERO,
15088 .block_erasers =
15089 {
15090 {
15091 .eraseblocks = { {4 * 1024, 8192} },
15092 .block_erase = spi_block_erase_21,
15093 }, {
15094 .eraseblocks = { {4 * 1024, 8192} },
15095 .block_erase = spi_block_erase_20,
15096 }, {
15097 .eraseblocks = { {32 * 1024, 1024} },
15098 .block_erase = spi_block_erase_5c,
15099 }, {
15100 .eraseblocks = { {32 * 1024, 1024} },
15101 .block_erase = spi_block_erase_52,
15102 }, {
15103 .eraseblocks = { {64 * 1024, 512} },
15104 .block_erase = spi_block_erase_dc,
15105 }, {
15106 .eraseblocks = { {64 * 1024, 512} },
15107 .block_erase = spi_block_erase_d8,
15108 }, {
15109 .eraseblocks = { {32768 * 1024, 1} },
15110 .block_erase = spi_block_erase_c7,
15111 }, {
15112 .eraseblocks = { {32768 * 1024, 1} },
15113 .block_erase = spi_block_erase_60,
15114 }
15115 },
15116 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15117 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15118 .write = spi_chip_write_256, /* Multi I/O supported */
15119 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15120 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020015121 .prepare_access = spi_prepare_io,
15122 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015123 },
15124
15125 {
15126 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070015127 .name = "MT25QL512", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070015128 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100015129 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015130 .model_id = ST_N25Q512__3G,
Ed Swierk199ab392017-07-03 13:33:44 -070015131 .total_size = 65536,
15132 .page_size = 256,
15133 /* supports SFDP */
15134 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010015135 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons3ed5a352018-09-30 16:31:09 +020015136 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070015137 .probe = probe_spi_rdid,
15138 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100015139 .block_erasers =
15140 {
Ed Swierk199ab392017-07-03 13:33:44 -070015141 {
15142 .eraseblocks = { {4 * 1024, 16384} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020015143 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070015144 }, {
Nico Huberaac81422017-11-10 22:54:13 +010015145 .eraseblocks = { {4 * 1024, 16384} },
15146 .block_erase = spi_block_erase_20,
15147 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070015148 .eraseblocks = { {32 * 1024, 2048} },
15149 .block_erase = spi_block_erase_5c,
15150 }, {
15151 .eraseblocks = { {32 * 1024, 2048} },
15152 .block_erase = spi_block_erase_52,
15153 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070015154 .eraseblocks = { {64 * 1024, 1024} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020015155 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070015156 }, {
Nico Huberaac81422017-11-10 22:54:13 +010015157 .eraseblocks = { {64 * 1024, 1024} },
15158 .block_erase = spi_block_erase_d8,
15159 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070015160 .eraseblocks = { {65536 * 1024, 1} },
15161 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070015162 }, {
15163 .eraseblocks = { {65536 * 1024, 1} },
15164 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070015165 }
15166 },
15167 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15168 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15169 .write = spi_chip_write_256, /* Multi I/O supported */
15170 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15171 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030015172 .reg_bits =
15173 {
15174 .srp = {STATUS1, 7, RW},
15175 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
15176 .tb = {STATUS1, 5, RW},
15177 },
Nico Huberaabb3e02023-01-13 00:22:30 +010015178 .wp_write_cfg = spi_wp_write_cfg,
15179 .wp_read_cfg = spi_wp_read_cfg,
15180 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030015181 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020015182 .prepare_access = spi_prepare_io,
15183 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070015184 },
15185
15186 {
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015187 .vendor = "Micron",
15188 .name = "MT25QU512", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
15189 .bustype = BUS_SPI,
15190 .manufacture_id = ST_ID,
15191 .model_id = ST_N25Q512__1G,
15192 .total_size = 65536,
15193 .page_size = 256,
15194 /* supports SFDP */
15195 /* OTP: 64B total; read 0x4B, write 0x42 */
15196 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
15197 .tested = TEST_OK_PREW,
15198 .probe = probe_spi_rdid,
15199 .probe_timing = TIMING_ZERO,
15200 .block_erasers =
15201 {
15202 {
15203 .eraseblocks = { {4 * 1024, 16384} },
15204 .block_erase = spi_block_erase_21,
15205 }, {
15206 .eraseblocks = { {4 * 1024, 16384} },
15207 .block_erase = spi_block_erase_20,
15208 }, {
15209 .eraseblocks = { {32 * 1024, 2048} },
15210 .block_erase = spi_block_erase_5c,
15211 }, {
15212 .eraseblocks = { {32 * 1024, 2048} },
15213 .block_erase = spi_block_erase_52,
15214 }, {
15215 .eraseblocks = { {64 * 1024, 1024} },
15216 .block_erase = spi_block_erase_dc,
15217 }, {
15218 .eraseblocks = { {64 * 1024, 1024} },
15219 .block_erase = spi_block_erase_d8,
15220 }, {
15221 .eraseblocks = { {65536 * 1024, 1} },
15222 .block_erase = spi_block_erase_c7,
15223 }, {
15224 .eraseblocks = { {65536 * 1024, 1} },
15225 .block_erase = spi_block_erase_60,
15226 }
15227 },
15228 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15229 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15230 .write = spi_chip_write_256, /* Multi I/O supported */
15231 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15232 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020015233 .prepare_access = spi_prepare_io,
15234 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015235 },
15236
15237 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000015238 .vendor = "MoselVitelic",
15239 .name = "V29C51000B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015240 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015241 .manufacture_id = SYNCMOS_MVC_ID,
15242 .model_id = MVC_V29C51000B,
15243 .total_size = 64,
15244 .page_size = 512,
15245 .feature_bits = FEATURE_EITHER_RESET,
15246 .tested = TEST_UNTESTED,
15247 .probe = probe_jedec,
15248 .probe_timing = TIMING_ZERO,
15249 .block_erasers =
15250 {
15251 {
15252 .eraseblocks = { {512, 128} },
15253 .block_erase = erase_sector_jedec,
15254 }, {
15255 .eraseblocks = { {64 * 1024, 1} },
15256 .block_erase = erase_chip_block_jedec,
15257 },
15258 },
15259 .write = write_jedec_1,
15260 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015261 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015262 .prepare_access = prepare_memory_access,
15263 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015264 },
15265
15266 {
15267 .vendor = "MoselVitelic",
15268 .name = "V29C51000T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015269 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015270 .manufacture_id = SYNCMOS_MVC_ID,
15271 .model_id = MVC_V29C51000T,
15272 .total_size = 64,
15273 .page_size = 512,
15274 .feature_bits = FEATURE_EITHER_RESET,
15275 .tested = TEST_UNTESTED,
15276 .probe = probe_jedec,
15277 .probe_timing = TIMING_ZERO,
15278 .block_erasers =
15279 {
15280 {
15281 .eraseblocks = { {512, 128} },
15282 .block_erase = erase_sector_jedec,
15283 }, {
15284 .eraseblocks = { {64 * 1024, 1} },
15285 .block_erase = erase_chip_block_jedec,
15286 },
15287 },
15288 .write = write_jedec_1,
15289 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015290 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015291 .prepare_access = prepare_memory_access,
15292 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015293 },
15294
15295 {
15296 .vendor = "MoselVitelic",
15297 .name = "V29C51400B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015298 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015299 .manufacture_id = SYNCMOS_MVC_ID,
15300 .model_id = MVC_V29C51400B,
15301 .total_size = 512,
15302 .page_size = 1024,
15303 .feature_bits = FEATURE_EITHER_RESET,
15304 .tested = TEST_UNTESTED,
15305 .probe = probe_jedec,
15306 .probe_timing = TIMING_ZERO,
15307 .block_erasers =
15308 {
15309 {
15310 .eraseblocks = { {1024, 512} },
15311 .block_erase = erase_sector_jedec,
15312 }, {
15313 .eraseblocks = { {512 * 1024, 1} },
15314 .block_erase = erase_chip_block_jedec,
15315 },
15316 },
15317 .write = write_jedec_1,
15318 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015319 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015320 .prepare_access = prepare_memory_access,
15321 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015322 },
15323
15324 {
15325 .vendor = "MoselVitelic",
15326 .name = "V29C51400T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015327 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015328 .manufacture_id = SYNCMOS_MVC_ID,
15329 .model_id = MVC_V29C51400T,
15330 .total_size = 512,
15331 .page_size = 1024,
15332 .feature_bits = FEATURE_EITHER_RESET,
15333 .tested = TEST_UNTESTED,
15334 .probe = probe_jedec,
15335 .probe_timing = TIMING_ZERO,
15336 .block_erasers =
15337 {
15338 {
15339 .eraseblocks = { {1024, 512} },
15340 .block_erase = erase_sector_jedec,
15341 }, {
15342 .eraseblocks = { {512 * 1024, 1} },
15343 .block_erase = erase_chip_block_jedec,
15344 },
15345 },
15346 .write = write_jedec_1,
15347 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015348 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015349 .prepare_access = prepare_memory_access,
15350 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015351 },
15352
15353 {
15354 .vendor = "MoselVitelic",
15355 .name = "V29LC51000",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015356 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015357 .manufacture_id = SYNCMOS_MVC_ID,
15358 .model_id = MVC_V29LC51000,
15359 .total_size = 64,
15360 .page_size = 512,
15361 .feature_bits = FEATURE_EITHER_RESET,
15362 .tested = TEST_UNTESTED,
15363 .probe = probe_jedec,
15364 .probe_timing = TIMING_ZERO,
15365 .block_erasers =
15366 {
15367 {
15368 .eraseblocks = { {512, 128} },
15369 .block_erase = erase_sector_jedec,
15370 }, {
15371 .eraseblocks = { {64 * 1024, 1} },
15372 .block_erase = erase_chip_block_jedec,
15373 },
15374 },
15375 .write = write_jedec_1,
15376 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015377 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015378 .prepare_access = prepare_memory_access,
15379 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015380 },
15381
15382 {
15383 .vendor = "MoselVitelic",
15384 .name = "V29LC51001",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015385 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015386 .manufacture_id = SYNCMOS_MVC_ID,
15387 .model_id = MVC_V29LC51001,
15388 .total_size = 128,
15389 .page_size = 512,
15390 .feature_bits = FEATURE_EITHER_RESET,
15391 .tested = TEST_UNTESTED,
15392 .probe = probe_jedec,
15393 .probe_timing = TIMING_ZERO,
15394 .block_erasers =
15395 {
15396 {
15397 .eraseblocks = { {512, 256} },
15398 .block_erase = erase_sector_jedec,
15399 }, {
15400 .eraseblocks = { {128 * 1024, 1} },
15401 .block_erase = erase_chip_block_jedec,
15402 },
15403 },
15404 .write = write_jedec_1,
15405 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015406 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015407 .prepare_access = prepare_memory_access,
15408 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015409 },
15410
15411 {
15412 .vendor = "MoselVitelic",
15413 .name = "V29LC51002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015414 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015415 .manufacture_id = SYNCMOS_MVC_ID,
15416 .model_id = MVC_V29LC51002,
15417 .total_size = 256,
15418 .page_size = 512,
15419 .feature_bits = FEATURE_EITHER_RESET,
15420 .tested = TEST_UNTESTED,
15421 .probe = probe_jedec,
15422 .probe_timing = TIMING_ZERO,
15423 .block_erasers =
15424 {
15425 {
15426 .eraseblocks = { {512, 512} },
15427 .block_erase = erase_sector_jedec,
15428 }, {
15429 .eraseblocks = { {256 * 1024, 1} },
15430 .block_erase = erase_chip_block_jedec,
15431 },
15432 },
15433 .write = write_jedec_1,
15434 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015435 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015436 .prepare_access = prepare_memory_access,
15437 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015438 },
15439
15440 {
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015441 .vendor = "Nantronics",
15442 .name = "N25S10",
15443 .bustype = BUS_SPI,
15444 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15445 .model_id = NANTRONICS_N25S10,
15446 .total_size = 128,
15447 .page_size = 256,
15448 .feature_bits = FEATURE_WRSR_WREN,
15449 .tested = TEST_UNTESTED,
15450 .probe = probe_spi_rdid,
15451 .probe_timing = TIMING_ZERO,
15452 .block_erasers =
15453 {
15454 {
15455 .eraseblocks = { {4 * 1024, 32} },
15456 .block_erase = spi_block_erase_20,
15457 }, {
15458 .eraseblocks = { {4 * 1024, 32} },
15459 .block_erase = spi_block_erase_d7,
15460 }, {
15461 .eraseblocks = { {32 * 1024, 4} },
15462 .block_erase = spi_block_erase_52,
15463 }, {
15464 .eraseblocks = { {64 * 1024, 2} },
15465 .block_erase = spi_block_erase_d8,
15466 }, {
15467 .eraseblocks = { {128 * 1024, 1} },
15468 .block_erase = spi_block_erase_60,
15469 }, {
15470 .eraseblocks = { {128 * 1024, 1} },
15471 .block_erase = spi_block_erase_c7,
15472 }
15473 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015474 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015475 .unlock = spi_disable_blockprotect_bp3_srwd,
15476 .write = spi_chip_write_256,
15477 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15478 .voltage = {2700, 3600},
15479 },
15480
15481 {
15482 .vendor = "Nantronics",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015483 .name = "N25S16",
15484 .bustype = BUS_SPI,
15485 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15486 .model_id = NANTRONICS_N25S16,
15487 .total_size = 2048,
15488 .page_size = 256,
15489 .feature_bits = FEATURE_WRSR_WREN,
15490 .tested = TEST_UNTESTED,
15491 .probe = probe_spi_rdid,
15492 .probe_timing = TIMING_ZERO,
15493 .block_erasers =
15494 {
15495 {
15496 .eraseblocks = { {4 * 1024, 512} },
15497 .block_erase = spi_block_erase_20,
15498 }, {
15499 .eraseblocks = { {64 * 1024, 32} },
15500 .block_erase = spi_block_erase_d8,
15501 }, {
15502 .eraseblocks = { {2048 * 1024, 1} },
15503 .block_erase = spi_block_erase_60,
15504 }, {
15505 .eraseblocks = { {2048 * 1024, 1} },
15506 .block_erase = spi_block_erase_c7,
15507 }
15508 },
15509 .printlock = spi_prettyprint_status_register_bp3_srwd,
15510 .unlock = spi_disable_blockprotect_bp3_srwd,
15511 .write = spi_chip_write_256,
15512 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15513 .voltage = {2700, 3600},
15514 },
15515
15516 {
15517 .vendor = "Nantronics",
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015518 .name = "N25S20",
15519 .bustype = BUS_SPI,
15520 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15521 .model_id = NANTRONICS_N25S20,
15522 .total_size = 256,
15523 .page_size = 256,
15524 .feature_bits = FEATURE_WRSR_WREN,
15525 .tested = TEST_UNTESTED,
15526 .probe = probe_spi_rdid,
15527 .probe_timing = TIMING_ZERO,
15528 .block_erasers =
15529 {
15530 {
15531 .eraseblocks = { {4 * 1024, 64} },
15532 .block_erase = spi_block_erase_20,
15533 }, {
15534 .eraseblocks = { {4 * 1024, 64} },
15535 .block_erase = spi_block_erase_d7,
15536 }, {
15537 .eraseblocks = { {32 * 1024, 8} },
15538 .block_erase = spi_block_erase_52,
15539 }, {
15540 .eraseblocks = { {64 * 1024, 4} },
15541 .block_erase = spi_block_erase_d8,
15542 }, {
15543 .eraseblocks = { {256 * 1024, 1} },
15544 .block_erase = spi_block_erase_60,
15545 }, {
15546 .eraseblocks = { {256 * 1024, 1} },
15547 .block_erase = spi_block_erase_c7,
15548 }
15549 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015550 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015551 .unlock = spi_disable_blockprotect_bp3_srwd,
15552 .write = spi_chip_write_256,
15553 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15554 .voltage = {2700, 3600},
15555 },
15556
15557 {
15558 .vendor = "Nantronics",
15559 .name = "N25S40",
15560 .bustype = BUS_SPI,
15561 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15562 .model_id = NANTRONICS_N25S40,
15563 .total_size = 512,
15564 .page_size = 256,
15565 .feature_bits = FEATURE_WRSR_WREN,
15566 .tested = TEST_UNTESTED,
15567 .probe = probe_spi_rdid,
15568 .probe_timing = TIMING_ZERO,
15569 .block_erasers =
15570 {
15571 {
15572 .eraseblocks = { {4 * 1024, 128} },
15573 .block_erase = spi_block_erase_20,
15574 }, {
15575 .eraseblocks = { {4 * 1024, 128} },
15576 .block_erase = spi_block_erase_d7,
15577 }, {
15578 .eraseblocks = { {32 * 1024, 16} },
15579 .block_erase = spi_block_erase_52,
15580 }, {
15581 .eraseblocks = { {64 * 1024, 8} },
15582 .block_erase = spi_block_erase_d8,
15583 }, {
15584 .eraseblocks = { {512 * 1024, 1} },
15585 .block_erase = spi_block_erase_60,
15586 }, {
15587 .eraseblocks = { {512 * 1024, 1} },
15588 .block_erase = spi_block_erase_c7,
15589 }
15590 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015591 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015592 .unlock = spi_disable_blockprotect_bp3_srwd,
15593 .write = spi_chip_write_256,
15594 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15595 .voltage = {2700, 3600},
15596 },
15597
15598 {
15599 .vendor = "Nantronics",
15600 .name = "N25S80",
15601 .bustype = BUS_SPI,
15602 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15603 .model_id = NANTRONICS_N25S80,
15604 .total_size = 1024,
15605 .page_size = 256,
15606 .feature_bits = FEATURE_WRSR_WREN,
15607 .tested = TEST_UNTESTED,
15608 .probe = probe_spi_rdid,
15609 .probe_timing = TIMING_ZERO,
15610 .block_erasers =
15611 {
15612 {
15613 .eraseblocks = { {4 * 1024, 256} },
15614 .block_erase = spi_block_erase_20,
15615 }, {
15616 .eraseblocks = { {32 * 1024, 32} },
15617 .block_erase = spi_block_erase_52,
15618 }, {
15619 .eraseblocks = { {64 * 1024, 16} },
15620 .block_erase = spi_block_erase_d8,
15621 }, {
15622 .eraseblocks = { {1024 * 1024, 1} },
15623 .block_erase = spi_block_erase_60,
15624 }, {
15625 .eraseblocks = { {1024 * 1024, 1} },
15626 .block_erase = spi_block_erase_c7,
15627 }
15628 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015629 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015630 .unlock = spi_disable_blockprotect_bp3_srwd,
15631 .write = spi_chip_write_256,
15632 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15633 .voltage = {2700, 3600},
15634 },
15635
15636 {
Stefan Taunerf4451612013-04-19 01:59:15 +000015637 .vendor = "PMC",
15638 .name = "Pm25LD010(C)",
15639 .bustype = BUS_SPI,
15640 .manufacture_id = PMC_ID,
15641 .model_id = PMC_PM25LD010,
15642 .total_size = 128,
15643 .page_size = 256,
15644 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000015645 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000015646 .probe = probe_spi_rdid,
15647 .probe_timing = TIMING_ZERO,
15648 .block_erasers =
15649 {
15650 {
15651 .eraseblocks = { {4 * 1024, 32} },
15652 .block_erase = spi_block_erase_20,
15653 }, {
15654 .eraseblocks = { {4 * 1024, 32} },
15655 .block_erase = spi_block_erase_d7,
15656 }, {
15657 .eraseblocks = { {32 * 1024, 4} },
15658 .block_erase = spi_block_erase_d8,
15659 }, {
15660 .eraseblocks = { {128 * 1024, 1} },
15661 .block_erase = spi_block_erase_60,
15662 }, {
15663 .eraseblocks = { {128 * 1024, 1} },
15664 .block_erase = spi_block_erase_c7,
15665 }
15666 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015667 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000015668 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
15669 .write = spi_chip_write_256,
15670 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15671 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD010 */
15672 },
15673
15674 {
15675 .vendor = "PMC",
15676 .name = "Pm25LD020(C)",
15677 .bustype = BUS_SPI,
15678 .manufacture_id = PMC_ID,
15679 .model_id = PMC_PM25LD020,
15680 .total_size = 256,
15681 .page_size = 256,
15682 .feature_bits = FEATURE_WRSR_WREN,
Angel Ponsf5822a82018-09-30 20:09:58 +020015683 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000015684 .probe = probe_spi_rdid,
15685 .probe_timing = TIMING_ZERO,
15686 .block_erasers =
15687 {
15688 {
15689 .eraseblocks = { {4 * 1024, 64} },
15690 .block_erase = spi_block_erase_20,
15691 }, {
15692 .eraseblocks = { {4 * 1024, 64} },
15693 .block_erase = spi_block_erase_d7,
15694 }, {
15695 .eraseblocks = { {64 * 1024, 4} },
15696 .block_erase = spi_block_erase_d8,
15697 }, {
15698 .eraseblocks = { {256 * 1024, 1} },
15699 .block_erase = spi_block_erase_60,
15700 }, {
15701 .eraseblocks = { {256 * 1024, 1} },
15702 .block_erase = spi_block_erase_c7,
15703 }
15704 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015705 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000015706 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
15707 .write = spi_chip_write_256,
15708 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15709 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD020 */
15710 },
15711
15712 {
15713 .vendor = "PMC",
15714 .name = "Pm25LD040(C)",
15715 .bustype = BUS_SPI,
15716 .manufacture_id = PMC_ID,
15717 .model_id = PMC_PM25LV040,
15718 .total_size = 512,
15719 .page_size = 256,
15720 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons05127bf2018-09-30 20:23:24 +020015721 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000015722 .probe = probe_spi_rdid,
15723 .probe_timing = TIMING_ZERO,
15724 .block_erasers =
15725 {
15726 {
15727 .eraseblocks = { {4 * 1024, 128} },
15728 .block_erase = spi_block_erase_20,
15729 }, {
15730 .eraseblocks = { {4 * 1024, 128} },
15731 .block_erase = spi_block_erase_d7,
15732 }, {
15733 .eraseblocks = { {64 * 1024, 8} },
15734 .block_erase = spi_block_erase_d8,
15735 }, {
15736 .eraseblocks = { {512 * 1024, 1} },
15737 .block_erase = spi_block_erase_60,
15738 }, {
15739 .eraseblocks = { {512 * 1024, 1} },
15740 .block_erase = spi_block_erase_c7,
15741 }
15742 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015743 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000015744 .unlock = spi_disable_blockprotect,
15745 .write = spi_chip_write_256,
15746 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15747 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD040 */
15748 },
15749
Steven Honeyman81a8fb72015-06-02 22:32:24 +000015750 {
15751 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015752 .name = "Pm25LD256C",
15753 .bustype = BUS_SPI,
15754 .manufacture_id = PMC_ID,
15755 .model_id = PMC_PM25LD256C,
15756 .total_size = 32,
15757 .page_size = 256,
15758 .feature_bits = FEATURE_WRSR_WREN,
15759 .tested = TEST_UNTESTED,
15760 .probe = probe_spi_rdid,
15761 .probe_timing = TIMING_ZERO,
15762 .block_erasers =
15763 {
15764 {
15765 .eraseblocks = { {4 * 1024, 8} },
15766 .block_erase = spi_block_erase_20,
15767 }, {
15768 .eraseblocks = { {4 * 1024, 8} },
15769 .block_erase = spi_block_erase_d7,
15770 }, {
15771 .eraseblocks = { {32 * 1024, 1} },
15772 .block_erase = spi_block_erase_d8,
15773 }, {
15774 .eraseblocks = { {32 * 1024, 1} },
15775 .block_erase = spi_block_erase_60,
15776 }, {
15777 .eraseblocks = { {32 * 1024, 1} },
15778 .block_erase = spi_block_erase_c7,
15779 }
15780 },
15781 .printlock = spi_prettyprint_status_register_bp2_srwd,
15782 .unlock = spi_disable_blockprotect,
15783 .write = spi_chip_write_256,
15784 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15785 .voltage = {2700, 3600},
15786 },
15787
15788 {
15789 .vendor = "PMC",
15790 .name = "Pm25LD512(C)",
15791 .bustype = BUS_SPI,
15792 .manufacture_id = PMC_ID,
15793 .model_id = PMC_PM25LD512,
15794 .total_size = 64,
15795 .page_size = 256,
15796 .feature_bits = FEATURE_WRSR_WREN,
15797 .tested = TEST_OK_PREW,
15798 .probe = probe_spi_rdid,
15799 .probe_timing = TIMING_ZERO,
15800 .block_erasers =
15801 {
15802 {
15803 .eraseblocks = { {4 * 1024, 16} },
15804 .block_erase = spi_block_erase_20,
15805 }, {
15806 .eraseblocks = { {4 * 1024, 16} },
15807 .block_erase = spi_block_erase_d7,
15808 }, {
15809 .eraseblocks = { {32 * 1024, 2} },
15810 .block_erase = spi_block_erase_d8,
15811 }, {
15812 .eraseblocks = { {64 * 1024, 1} },
15813 .block_erase = spi_block_erase_60,
15814 }, {
15815 .eraseblocks = { {64 * 1024, 1} },
15816 .block_erase = spi_block_erase_c7,
15817 }
15818 },
15819 .printlock = spi_prettyprint_status_register_bp2_srwd,
15820 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
15821 .write = spi_chip_write_256,
15822 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15823 .voltage = {2300, 3600},
15824 },
15825
15826 {
15827 .vendor = "PMC",
15828 .name = "Pm25LQ016",
15829 .bustype = BUS_SPI,
15830 .manufacture_id = PMC_ID,
15831 .model_id = PMC_PM25LQ016,
15832 .total_size = 2048,
15833 .page_size = 256,
15834 /* OTP: 256B total; read 0x4B, write 0xB1 */
15835 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15836 .tested = TEST_UNTESTED,
15837 .probe = probe_spi_rdid,
15838 .probe_timing = TIMING_ZERO,
15839 .block_erasers =
15840 {
15841 {
15842 .eraseblocks = { {4 * 1024, 512} },
15843 .block_erase = spi_block_erase_20,
15844 }, {
15845 .eraseblocks = { {4 * 1024, 512} },
15846 .block_erase = spi_block_erase_d7,
15847 }, {
15848 .eraseblocks = { {64 * 1024, 32} },
15849 .block_erase = spi_block_erase_d8,
15850 }, {
15851 .eraseblocks = { {2048 * 1024, 1} },
15852 .block_erase = spi_block_erase_60,
15853 }, {
15854 .eraseblocks = { {2048 * 1024, 1} },
15855 .block_erase = spi_block_erase_c7,
15856 }
15857 },
15858 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
15859 .unlock = spi_disable_blockprotect_bp3_srwd,
15860 .write = spi_chip_write_256,
15861 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15862 .voltage = {2300, 3600},
15863 },
15864
15865 {
15866 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000015867 .name = "Pm25LQ020",
15868 .bustype = BUS_SPI,
15869 .manufacture_id = PMC_ID,
15870 .model_id = PMC_PM25LQ020,
15871 .total_size = 256,
15872 .page_size = 256,
15873 /* OTP: 256B total; read 0x4B, write 0xB1 */
15874 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15875 .tested = TEST_UNTESTED,
15876 .probe = probe_spi_rdid,
15877 .probe_timing = TIMING_ZERO,
15878 .block_erasers =
15879 {
15880 {
15881 .eraseblocks = { {4 * 1024, 64} },
15882 .block_erase = spi_block_erase_20,
15883 }, {
15884 .eraseblocks = { {4 * 1024, 64} },
15885 .block_erase = spi_block_erase_d7,
15886 }, {
15887 .eraseblocks = { {64 * 1024, 4} },
15888 .block_erase = spi_block_erase_d8,
15889 }, {
15890 .eraseblocks = { {256 * 1024, 1} },
15891 .block_erase = spi_block_erase_60,
15892 }, {
15893 .eraseblocks = { {256 * 1024, 1} },
15894 .block_erase = spi_block_erase_c7,
15895 }
15896 },
15897 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
15898 .unlock = spi_disable_blockprotect_bp3_srwd,
15899 .write = spi_chip_write_256,
15900 .read = spi_chip_read,
15901 .voltage = {2300, 3600},
15902 },
15903
15904 {
15905 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015906 .name = "Pm25LQ032C",
15907 .bustype = BUS_SPI,
15908 .manufacture_id = PMC_ID,
15909 .model_id = PMC_PM25LQ032C,
15910 .total_size = 4096,
15911 .page_size = 256,
15912 /* OTP: 64B total; read 0x4B, write 0xB1 */
15913 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15914 .tested = TEST_OK_PREW,
15915 .probe = probe_spi_rdid,
15916 .probe_timing = TIMING_ZERO,
15917 .block_erasers =
15918 {
15919 {
15920 .eraseblocks = { {4 * 1024, 1024} },
15921 .block_erase = spi_block_erase_20,
15922 }, {
15923 .eraseblocks = { {4 * 1024, 1024} },
15924 .block_erase = spi_block_erase_d7,
15925 }, {
15926 .eraseblocks = { {64 * 1024, 64} },
15927 .block_erase = spi_block_erase_d8,
15928 }, {
15929 .eraseblocks = { {4096 * 1024, 1} },
15930 .block_erase = spi_block_erase_60,
15931 }, {
15932 .eraseblocks = { {4096 * 1024, 1} },
15933 .block_erase = spi_block_erase_c7,
15934 }
15935 },
15936 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
15937 .unlock = spi_disable_blockprotect_bp3_srwd,
15938 .write = spi_chip_write_256,
15939 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15940 .voltage = {2700, 3600},
15941 },
15942
15943 {
15944 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000015945 .name = "Pm25LQ040",
15946 .bustype = BUS_SPI,
15947 .manufacture_id = PMC_ID,
15948 .model_id = PMC_PM25LQ040,
15949 .total_size = 512,
15950 .page_size = 256,
15951 /* OTP: 256B total; read 0x4B, write 0xB1 */
15952 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15953 .tested = TEST_UNTESTED,
15954 .probe = probe_spi_rdid,
15955 .probe_timing = TIMING_ZERO,
15956 .block_erasers =
15957 {
15958 {
15959 .eraseblocks = { {4 * 1024, 128} },
15960 .block_erase = spi_block_erase_20,
15961 }, {
15962 .eraseblocks = { {4 * 1024, 128} },
15963 .block_erase = spi_block_erase_d7,
15964 }, {
15965 .eraseblocks = { {64 * 1024, 8} },
15966 .block_erase = spi_block_erase_d8,
15967 }, {
15968 .eraseblocks = { {512 * 1024, 1} },
15969 .block_erase = spi_block_erase_60,
15970 }, {
15971 .eraseblocks = { {512 * 1024, 1} },
15972 .block_erase = spi_block_erase_c7,
15973 }
15974 },
15975 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
15976 .unlock = spi_disable_blockprotect_bp3_srwd,
15977 .write = spi_chip_write_256,
15978 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15979 .voltage = {2300, 3600},
15980 },
15981
15982 {
15983 .vendor = "PMC",
15984 .name = "Pm25LQ080",
15985 .bustype = BUS_SPI,
15986 .manufacture_id = PMC_ID,
15987 .model_id = PMC_PM25LQ080,
15988 .total_size = 1024,
15989 .page_size = 256,
15990 /* OTP: 64B total; read 0x4B, write 0xB1 */
15991 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15992 .tested = TEST_UNTESTED,
15993 .probe = probe_spi_rdid,
15994 .probe_timing = TIMING_ZERO,
15995 .block_erasers =
15996 {
15997 {
15998 .eraseblocks = { {4 * 1024, 256} },
15999 .block_erase = spi_block_erase_20,
16000 }, {
16001 .eraseblocks = { {4 * 1024, 256} },
16002 .block_erase = spi_block_erase_d7,
16003 }, {
16004 .eraseblocks = { {64 * 1024, 16} },
16005 .block_erase = spi_block_erase_d8,
16006 }, {
16007 .eraseblocks = { {1024 * 1024, 1} },
16008 .block_erase = spi_block_erase_60,
16009 }, {
16010 .eraseblocks = { {1024 * 1024, 1} },
16011 .block_erase = spi_block_erase_c7,
16012 }
16013 },
16014 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
16015 .unlock = spi_disable_blockprotect_bp3_srwd,
16016 .write = spi_chip_write_256,
16017 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
16018 .voltage = {2300, 3600},
16019 },
16020
16021 {
16022 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016023 .name = "Pm25LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016024 .bustype = BUS_SPI,
Stefan Taunerbecda742014-05-30 19:34:00 +000016025 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016026 .model_id = PMC_PM25LV010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016027 .total_size = 128,
16028 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016029 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerbecda742014-05-30 19:34:00 +000016030 .tested = TEST_OK_PREW,
16031 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016032 .probe_timing = TIMING_ZERO,
16033 .block_erasers =
16034 {
16035 {
16036 .eraseblocks = { {4 * 1024, 32} },
16037 .block_erase = spi_block_erase_d7,
16038 }, {
16039 .eraseblocks = { {32 * 1024, 4} },
16040 .block_erase = spi_block_erase_d8,
16041 }, {
16042 .eraseblocks = { {128 * 1024, 1} },
16043 .block_erase = spi_block_erase_c7,
16044 }
16045 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016046 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016047 .unlock = spi_disable_blockprotect,
16048 .write = spi_chip_write_256,
16049 .read = spi_chip_read, /* Fast read (0x0B) supported */
16050 .voltage = {2700, 3600},
16051 },
16052
16053 {
16054 .vendor = "PMC",
16055 .name = "Pm25LV010A",
16056 .bustype = BUS_SPI,
16057 .manufacture_id = PMC_ID,
16058 .model_id = PMC_PM25LV010,
16059 .total_size = 128,
16060 .page_size = 256,
16061 .feature_bits = FEATURE_WRSR_WREN,
16062 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016063 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016064 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016065 .block_erasers =
16066 {
16067 {
16068 .eraseblocks = { {4 * 1024, 32} },
16069 .block_erase = spi_block_erase_d7,
16070 }, {
16071 .eraseblocks = { {32 * 1024, 4} },
16072 .block_erase = spi_block_erase_d8,
16073 }, {
16074 .eraseblocks = { {128 * 1024, 1} },
16075 .block_erase = spi_block_erase_c7,
16076 }
16077 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016078 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016079 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016080 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016081 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000016082 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016083 },
16084
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016085 {
16086 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100016087 .name = "Pm25LV016B",
16088 .bustype = BUS_SPI,
16089 .manufacture_id = PMC_ID,
16090 .model_id = PMC_PM25LV016B,
16091 .total_size = 2048,
16092 .page_size = 256,
16093 .feature_bits = FEATURE_WRSR_WREN,
16094 .tested = TEST_UNTESTED,
16095 .probe = probe_spi_rdid,
16096 .probe_timing = TIMING_ZERO,
16097 .block_erasers =
16098 {
16099 {
16100 .eraseblocks = { {4 * 1024, 512} },
16101 .block_erase = spi_block_erase_d7,
16102 }, {
16103 .eraseblocks = { {4 * 1024, 512} },
16104 .block_erase = spi_block_erase_20,
16105 }, {
16106 .eraseblocks = { {64 * 1024, 32} },
16107 .block_erase = spi_block_erase_d8,
16108 }, {
16109 .eraseblocks = { {2 * 1024 * 1024, 1} },
16110 .block_erase = spi_block_erase_60,
16111 }, {
16112 .eraseblocks = { {2 * 1024 * 1024, 1} },
16113 .block_erase = spi_block_erase_c7,
16114 }
16115 },
16116 .printlock = spi_prettyprint_status_register_bp2_srwd,
16117 .unlock = spi_disable_blockprotect,
16118 .write = spi_chip_write_256,
16119 .read = spi_chip_read, /* Fast read (0x0B) supported */
16120 .voltage = {2700, 3600},
16121 },
16122
16123 {
16124 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016125 .name = "Pm25LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016126 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016127 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016128 .model_id = PMC_PM25LV020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016129 .total_size = 256,
16130 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016131 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016132 .tested = TEST_UNTESTED,
16133 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016134 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016135 .block_erasers =
16136 {
16137 {
16138 .eraseblocks = { {4 * 1024, 64} },
16139 .block_erase = spi_block_erase_d7,
16140 }, {
16141 .eraseblocks = { {64 * 1024, 4} },
16142 .block_erase = spi_block_erase_d8,
16143 }, {
16144 .eraseblocks = { {256 * 1024, 1} },
16145 .block_erase = spi_block_erase_c7,
16146 }
16147 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016148 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016149 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016150 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016151 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016152 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016153 },
16154
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016155 {
16156 .vendor = "PMC",
16157 .name = "Pm25LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016158 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016159 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016160 .model_id = PMC_PM25LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016161 .total_size = 512,
16162 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016163 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner716e0982011-07-25 20:38:52 +000016164 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016165 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016166 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016167 .block_erasers =
16168 {
16169 {
16170 .eraseblocks = { {4 * 1024, 128} },
16171 .block_erase = spi_block_erase_d7,
16172 }, {
16173 .eraseblocks = { {64 * 1024, 8} },
16174 .block_erase = spi_block_erase_d8,
16175 }, {
16176 .eraseblocks = { {512 * 1024, 1} },
16177 .block_erase = spi_block_erase_c7,
16178 }
16179 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016180 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016181 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016182 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016183 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016184 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016185 },
16186
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016187 {
16188 .vendor = "PMC",
16189 .name = "Pm25LV080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016190 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016191 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016192 .model_id = PMC_PM25LV080B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016193 .total_size = 1024,
16194 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016195 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016196 .tested = TEST_UNTESTED,
16197 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016198 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016199 .block_erasers =
16200 {
16201 {
16202 .eraseblocks = { {4 * 1024, 256} },
16203 .block_erase = spi_block_erase_d7,
16204 }, {
16205 .eraseblocks = { {4 * 1024, 256} },
16206 .block_erase = spi_block_erase_20,
16207 }, {
16208 .eraseblocks = { {64 * 1024, 16} },
16209 .block_erase = spi_block_erase_d8,
16210 }, {
16211 .eraseblocks = { {1024 * 1024, 1} },
16212 .block_erase = spi_block_erase_60,
16213 }, {
16214 .eraseblocks = { {1024 * 1024, 1} },
16215 .block_erase = spi_block_erase_c7,
16216 }
16217 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016218 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016219 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016220 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016221 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016222 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016223 },
16224
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016225 {
16226 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100016227 .name = "Pm25LV512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016228 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016229 .manufacture_id = PMC_ID_NOPREFIX,
16230 .model_id = PMC_PM25LV512,
16231 .total_size = 64,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016232 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016233 .feature_bits = FEATURE_WRSR_WREN,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016234 .tested = TEST_OK_PREW,
16235 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016236 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016237 .block_erasers =
16238 {
16239 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016240 .eraseblocks = { {4 * 1024, 16} },
Sean Nelson5643c072010-01-19 03:23:07 +000016241 .block_erase = spi_block_erase_d7,
16242 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016243 .eraseblocks = { {32 * 1024, 2} },
Sean Nelson5643c072010-01-19 03:23:07 +000016244 .block_erase = spi_block_erase_d8,
16245 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016246 .eraseblocks = { {64 * 1024, 1} },
Sean Nelson5643c072010-01-19 03:23:07 +000016247 .block_erase = spi_block_erase_c7,
16248 }
16249 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100016250 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016251 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016252 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016253 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000016254 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016255 },
16256
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016257 {
16258 .vendor = "PMC",
Sean Nelson72a9a022009-12-22 22:15:33 +000016259 .name = "Pm29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016260 .bustype = BUS_PARALLEL,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016261 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016262 .model_id = PMC_PM29F002B,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016263 .total_size = 256,
Sean Nelson72a9a022009-12-22 22:15:33 +000016264 .page_size = 8 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016265 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016266 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016267 .probe = probe_jedec,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000016268 .probe_timing = TIMING_FIXME,
Sean Nelson72a9a022009-12-22 22:15:33 +000016269 .block_erasers =
16270 {
16271 {
16272 .eraseblocks = {
16273 {16 * 1024, 1},
16274 {8 * 1024, 2},
16275 {96 * 1024, 1},
16276 {128 * 1024, 1},
16277 },
Sean Nelson35727f72010-01-28 23:55:12 +000016278 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000016279 }, {
16280 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000016281 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000016282 },
16283 },
Sean Nelson35727f72010-01-28 23:55:12 +000016284 .write = write_jedec_1,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016285 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016286 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016287 .prepare_access = prepare_memory_access,
16288 .finish_access = finish_memory_access,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016289 },
16290
16291 {
16292 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100016293 .name = "Pm29F002T",
16294 .bustype = BUS_PARALLEL,
16295 .manufacture_id = PMC_ID_NOPREFIX,
16296 .model_id = PMC_PM29F002T,
16297 .total_size = 256,
16298 .page_size = 8 * 1024,
16299 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
16300 .tested = TEST_OK_PREW,
16301 .probe = probe_jedec,
16302 .probe_timing = TIMING_FIXME,
16303 .block_erasers =
16304 {
16305 {
16306 .eraseblocks = {
16307 {128 * 1024, 1},
16308 {96 * 1024, 1},
16309 {8 * 1024, 2},
16310 {16 * 1024, 1},
16311 },
16312 .block_erase = erase_sector_jedec,
16313 }, {
16314 .eraseblocks = { {256 * 1024, 1} },
16315 .block_erase = erase_chip_block_jedec,
16316 },
16317 },
16318 .write = write_jedec_1,
16319 .read = read_memmapped,
16320 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016321 .prepare_access = prepare_memory_access,
16322 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016323 },
16324
16325 {
16326 .vendor = "PMC",
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016327 .name = "Pm39LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016328 .bustype = BUS_PARALLEL,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016329 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016330 .model_id = PMC_PM39F010, /* Pm39LV010 and Pm39F010 have identical IDs but different voltage */
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016331 .total_size = 128,
16332 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000016333 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000016334 .tested = TEST_OK_PREW,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016335 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016336 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson5643c072010-01-19 03:23:07 +000016337 .block_erasers =
16338 {
16339 {
16340 .eraseblocks = { {4 * 1024, 32} },
16341 .block_erase = erase_sector_jedec,
16342 }, {
16343 .eraseblocks = { {64 * 1024, 2} },
16344 .block_erase = erase_block_jedec,
16345 }, {
16346 .eraseblocks = { {128 * 1024, 1} },
16347 .block_erase = erase_chip_block_jedec,
16348 }
16349 },
Sean Nelson35727f72010-01-28 23:55:12 +000016350 .write = write_jedec_1,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016351 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016352 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016353 .prepare_access = prepare_memory_access,
16354 .finish_access = finish_memory_access,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016355 },
16356
16357 {
16358 .vendor = "PMC",
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016359 .name = "Pm39LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016360 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016361 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016362 .model_id = PMC_PM39LV020,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016363 .total_size = 256,
16364 .page_size = 4096,
16365 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
16366 .tested = TEST_UNTESTED,
16367 .probe = probe_jedec,
16368 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100016369 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016370 {
16371 {
16372 .eraseblocks = { {4 * 1024, 64} },
16373 .block_erase = erase_sector_jedec,
16374 }, {
16375 .eraseblocks = { {64 * 1024, 4} },
16376 .block_erase = erase_block_jedec,
16377 }, {
16378 .eraseblocks = { {256 * 1024, 1} },
16379 .block_erase = erase_chip_block_jedec,
16380 }
16381 },
16382 .write = write_jedec_1,
16383 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016384 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016385 .prepare_access = prepare_memory_access,
16386 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016387 },
16388
16389 {
16390 .vendor = "PMC",
16391 .name = "Pm39LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016392 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016393 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016394 .model_id = PMC_PM39LV040,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016395 .total_size = 512,
16396 .page_size = 4096,
16397 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000016398 .tested = TEST_OK_PR,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016399 .probe = probe_jedec,
16400 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100016401 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016402 {
16403 {
16404 .eraseblocks = { {4 * 1024, 128} },
16405 .block_erase = erase_sector_jedec,
16406 }, {
16407 .eraseblocks = { {64 * 1024, 8} },
16408 .block_erase = erase_block_jedec,
16409 }, {
16410 .eraseblocks = { {512 * 1024, 1} },
16411 .block_erase = erase_chip_block_jedec,
16412 }
16413 },
16414 .write = write_jedec_1,
16415 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016416 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016417 .prepare_access = prepare_memory_access,
16418 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016419 },
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000016420
16421 {
16422 .vendor = "PMC",
16423 .name = "Pm39LV512",
16424 .bustype = BUS_PARALLEL,
16425 .manufacture_id = PMC_ID_NOPREFIX,
16426 .model_id = PMC_PM39LV512,
16427 .total_size = 64,
16428 .page_size = 4096,
16429 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
16430 .tested = TEST_OK_PREW,
16431 .probe = probe_jedec,
16432 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
16433 .block_erasers =
16434 {
16435 {
16436 .eraseblocks = { {4 * 1024, 16} },
16437 .block_erase = erase_sector_jedec,
16438 }, {
16439 .eraseblocks = { {64 * 1024, 1} },
16440 .block_erase = erase_block_jedec,
16441 }, {
16442 .eraseblocks = { {64 * 1024, 1} },
16443 .block_erase = erase_chip_block_jedec,
16444 }
16445 },
16446 .write = write_jedec_1,
16447 .read = read_memmapped,
16448 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016449 .prepare_access = prepare_memory_access,
16450 .finish_access = finish_memory_access,
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000016451 },
16452
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016453 {
16454 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016455 .name = "Pm49FL002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016456 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016457 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016458 .model_id = PMC_PM49FL002,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016459 .total_size = 256,
16460 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010016461 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016462 .tested = TEST_OK_PR,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000016463 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016464 .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */
Sean Nelson5643c072010-01-19 03:23:07 +000016465 .block_erasers =
16466 {
16467 {
16468 .eraseblocks = { {4 * 1024, 64} },
16469 .block_erase = erase_sector_jedec,
16470 }, {
16471 .eraseblocks = { {16 * 1024, 16} },
16472 .block_erase = erase_block_jedec,
16473 }, {
16474 .eraseblocks = { {256 * 1024, 1} },
16475 .block_erase = erase_chip_block_jedec,
16476 }
16477 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016478 .unlock = unlock_regspace2_uniform_32k,
Sean Nelson36172342010-02-27 18:01:15 +000016479 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016480 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016481 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010016482 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016483 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016484 },
16485
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016486 {
16487 .vendor = "PMC",
16488 .name = "Pm49FL004",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016489 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016490 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016491 .model_id = PMC_PM49FL004,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016492 .total_size = 512,
16493 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010016494 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000016495 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000016496 .probe = probe_jedec,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000016497 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016498 .block_erasers =
16499 {
16500 {
16501 .eraseblocks = { {4 * 1024, 128} },
16502 .block_erase = erase_sector_jedec,
16503 }, {
16504 .eraseblocks = { {64 * 1024, 8} },
16505 .block_erase = erase_block_jedec,
16506 }, {
16507 .eraseblocks = { {512 * 1024, 1} },
16508 .block_erase = erase_chip_block_jedec,
16509 }
16510 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016511 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson36172342010-02-27 18:01:15 +000016512 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016513 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016514 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010016515 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016516 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016517 },
16518
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016519 {
Nico Huberb09136b2024-10-25 22:52:30 +020016520 .vendor = "Puya",
16521 .name = "P25Q05H",
16522 .bustype = BUS_SPI,
16523 .manufacture_id = PUYA_ID,
16524 .model_id = PUYA_P25Q05H,
16525 .total_size = 64,
16526 .page_size = 256,
16527 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16528 FEATURE_OTP | FEATURE_QIO,
16529 .tested = TEST_UNTESTED,
16530 .probe = probe_spi_rdid,
16531 .probe_timing = TIMING_ZERO,
16532 .block_erasers =
16533 {
16534 {
16535 .eraseblocks = { {256, 256} },
16536 .block_erase = spi_block_erase_81,
16537 }, {
16538 .eraseblocks = { {4 * 1024, 16} },
16539 .block_erase = spi_block_erase_20,
16540 }, {
16541 .eraseblocks = { {32 * 1024, 2} },
16542 .block_erase = spi_block_erase_52,
16543 }, {
16544 .eraseblocks = { {64 * 1024, 1} },
16545 .block_erase = spi_block_erase_d8,
16546 }, {
16547 .eraseblocks = { {64 * 1024, 1} },
16548 .block_erase = spi_block_erase_60,
16549 }, {
16550 .eraseblocks = { {64 * 1024, 1} },
16551 .block_erase = spi_block_erase_c7,
16552 },
16553 },
16554 .reg_bits =
16555 {
16556 .qe = {STATUS2, 1, RW},
16557 .srp = {STATUS1, 7, RW},
16558 .srl = {STATUS2, 0, RW},
16559 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16560 .tb = {STATUS1, 5, RW},
16561 .sec = {STATUS1, 6, RW},
16562 .cmp = {STATUS2, 6, RW},
16563 },
16564 .wp_write_cfg = spi_wp_write_cfg,
16565 .wp_read_cfg = spi_wp_read_cfg,
16566 .wp_get_ranges = spi_wp_get_available_ranges,
16567 .decode_range = decode_range_spi25,
16568 .printlock = spi_prettyprint_status_register_bp4_srwd,
16569 .unlock = spi_disable_blockprotect_bp4_srwd,
16570 .write = spi_chip_write_256,
16571 .read = spi_chip_read,
16572 .voltage = {2300, 3600},
16573 .prepare_access = spi_prepare_io,
16574 .finish_access = spi_finish_io,
16575 },
16576
16577 {
16578 .vendor = "Puya",
Nico Huberb0cae5e2024-10-25 23:03:40 +020016579 .name = "P25Q06H",
16580 .bustype = BUS_SPI,
16581 .manufacture_id = PUYA_ID,
16582 .model_id = PUYA_P25Q06H,
16583 .total_size = 64,
16584 .page_size = 256,
16585 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
16586 FEATURE_OTP | FEATURE_QIO,
16587 .tested = TEST_UNTESTED,
16588 .probe = probe_spi_rdid,
16589 .probe_timing = TIMING_ZERO,
16590 .block_erasers =
16591 {
16592 {
16593 .eraseblocks = { {256, 256} },
16594 .block_erase = spi_block_erase_81,
16595 }, {
16596 .eraseblocks = { {4 * 1024, 16} },
16597 .block_erase = spi_block_erase_20,
16598 }, {
16599 .eraseblocks = { {32 * 1024, 2} },
16600 .block_erase = spi_block_erase_52,
16601 }, {
16602 .eraseblocks = { {64 * 1024, 1} },
16603 .block_erase = spi_block_erase_d8,
16604 }, {
16605 .eraseblocks = { {64 * 1024, 1} },
16606 .block_erase = spi_block_erase_60,
16607 }, {
16608 .eraseblocks = { {64 * 1024, 1} },
16609 .block_erase = spi_block_erase_c7,
16610 },
16611 },
16612 .reg_bits =
16613 {
16614 .qe = {STATUS2, 1, RW},
16615 .srp = {STATUS1, 7, RW},
16616 .srl = {STATUS2, 0, RW},
16617 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16618 .tb = {STATUS1, 5, RW},
16619 .sec = {STATUS1, 6, RW},
16620 .cmp = {STATUS2, 6, RW},
16621 },
16622 .wp_write_cfg = spi_wp_write_cfg,
16623 .wp_read_cfg = spi_wp_read_cfg,
16624 .wp_get_ranges = spi_wp_get_available_ranges,
16625 .decode_range = decode_range_spi25,
16626 .printlock = spi_prettyprint_status_register_bp4_srwd,
16627 .unlock = spi_disable_blockprotect_bp4_srwd,
16628 .write = spi_chip_write_256,
16629 .read = spi_chip_read,
16630 .voltage = {2300, 3600},
16631 .prepare_access = spi_prepare_io,
16632 .finish_access = spi_finish_io,
16633 },
16634
16635 {
16636 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020016637 .name = "P25Q10H",
16638 .bustype = BUS_SPI,
16639 .manufacture_id = PUYA_ID,
16640 .model_id = PUYA_P25Q10H,
16641 .total_size = 128,
16642 .page_size = 256,
16643 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16644 FEATURE_OTP | FEATURE_QIO,
16645 .tested = TEST_UNTESTED,
16646 .probe = probe_spi_rdid,
16647 .probe_timing = TIMING_ZERO,
16648 .block_erasers =
16649 {
16650 {
16651 .eraseblocks = { {256, 512} },
16652 .block_erase = spi_block_erase_81,
16653 }, {
16654 .eraseblocks = { {4 * 1024, 32} },
16655 .block_erase = spi_block_erase_20,
16656 }, {
16657 .eraseblocks = { {32 * 1024, 4} },
16658 .block_erase = spi_block_erase_52,
16659 }, {
16660 .eraseblocks = { {64 * 1024, 2} },
16661 .block_erase = spi_block_erase_d8,
16662 }, {
16663 .eraseblocks = { {128 * 1024, 1} },
16664 .block_erase = spi_block_erase_60,
16665 }, {
16666 .eraseblocks = { {128 * 1024, 1} },
16667 .block_erase = spi_block_erase_c7,
16668 },
16669 },
16670 .reg_bits =
16671 {
16672 .qe = {STATUS2, 1, RW},
16673 .srp = {STATUS1, 7, RW},
16674 .srl = {STATUS2, 0, RW},
16675 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16676 .tb = {STATUS1, 5, RW},
16677 .sec = {STATUS1, 6, RW},
16678 .cmp = {STATUS2, 6, RW},
16679 },
16680 .wp_write_cfg = spi_wp_write_cfg,
16681 .wp_read_cfg = spi_wp_read_cfg,
16682 .wp_get_ranges = spi_wp_get_available_ranges,
16683 .decode_range = decode_range_spi25,
16684 .printlock = spi_prettyprint_status_register_bp4_srwd,
16685 .unlock = spi_disable_blockprotect_bp4_srwd,
16686 .write = spi_chip_write_256,
16687 .read = spi_chip_read,
16688 .voltage = {2300, 3600},
16689 .prepare_access = spi_prepare_io,
16690 .finish_access = spi_finish_io,
16691 },
16692
16693 {
16694 .vendor = "Puya",
Nico Huberb0cae5e2024-10-25 23:03:40 +020016695 .name = "P25Q11H",
16696 .bustype = BUS_SPI,
16697 .manufacture_id = PUYA_ID,
16698 .model_id = PUYA_P25Q11H,
16699 .total_size = 128,
16700 .page_size = 256,
16701 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
16702 FEATURE_OTP | FEATURE_QIO,
16703 .tested = TEST_UNTESTED,
16704 .probe = probe_spi_rdid,
16705 .probe_timing = TIMING_ZERO,
16706 .block_erasers =
16707 {
16708 {
16709 .eraseblocks = { {256, 512} },
16710 .block_erase = spi_block_erase_81,
16711 }, {
16712 .eraseblocks = { {4 * 1024, 32} },
16713 .block_erase = spi_block_erase_20,
16714 }, {
16715 .eraseblocks = { {32 * 1024, 4} },
16716 .block_erase = spi_block_erase_52,
16717 }, {
16718 .eraseblocks = { {64 * 1024, 2} },
16719 .block_erase = spi_block_erase_d8,
16720 }, {
16721 .eraseblocks = { {128 * 1024, 1} },
16722 .block_erase = spi_block_erase_60,
16723 }, {
16724 .eraseblocks = { {128 * 1024, 1} },
16725 .block_erase = spi_block_erase_c7,
16726 },
16727 },
16728 .reg_bits =
16729 {
16730 .qe = {STATUS2, 1, RW},
16731 .srp = {STATUS1, 7, RW},
16732 .srl = {STATUS2, 0, RW},
16733 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16734 .tb = {STATUS1, 5, RW},
16735 .sec = {STATUS1, 6, RW},
16736 .cmp = {STATUS2, 6, RW},
16737 },
16738 .wp_write_cfg = spi_wp_write_cfg,
16739 .wp_read_cfg = spi_wp_read_cfg,
16740 .wp_get_ranges = spi_wp_get_available_ranges,
16741 .decode_range = decode_range_spi25,
16742 .printlock = spi_prettyprint_status_register_bp4_srwd,
16743 .unlock = spi_disable_blockprotect_bp4_srwd,
16744 .write = spi_chip_write_256,
16745 .read = spi_chip_read,
16746 .voltage = {2300, 3600},
16747 .prepare_access = spi_prepare_io,
16748 .finish_access = spi_finish_io,
16749 },
16750
16751 {
16752 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020016753 .name = "P25Q20H",
16754 .bustype = BUS_SPI,
16755 .manufacture_id = PUYA_ID,
16756 .model_id = PUYA_P25Q20H,
16757 .total_size = 256,
16758 .page_size = 256,
16759 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16760 FEATURE_OTP | FEATURE_QIO,
16761 .tested = TEST_UNTESTED,
16762 .probe = probe_spi_rdid,
16763 .probe_timing = TIMING_ZERO,
16764 .block_erasers =
16765 {
16766 {
16767 .eraseblocks = { {256, 1024} },
16768 .block_erase = spi_block_erase_81,
16769 }, {
16770 .eraseblocks = { {4 * 1024, 64} },
16771 .block_erase = spi_block_erase_20,
16772 }, {
16773 .eraseblocks = { {32 * 1024, 8} },
16774 .block_erase = spi_block_erase_52,
16775 }, {
16776 .eraseblocks = { {64 * 1024, 4} },
16777 .block_erase = spi_block_erase_d8,
16778 }, {
16779 .eraseblocks = { {256 * 1024, 1} },
16780 .block_erase = spi_block_erase_60,
16781 }, {
16782 .eraseblocks = { {256 * 1024, 1} },
16783 .block_erase = spi_block_erase_c7,
16784 },
16785 },
16786 .reg_bits =
16787 {
16788 .qe = {STATUS2, 1, RW},
16789 .srp = {STATUS1, 7, RW},
16790 .srl = {STATUS2, 0, RW},
16791 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16792 .tb = {STATUS1, 5, RW},
16793 .sec = {STATUS1, 6, RW},
16794 .cmp = {STATUS2, 6, RW},
16795 },
16796 .wp_write_cfg = spi_wp_write_cfg,
16797 .wp_read_cfg = spi_wp_read_cfg,
16798 .wp_get_ranges = spi_wp_get_available_ranges,
16799 .decode_range = decode_range_spi25,
16800 .printlock = spi_prettyprint_status_register_bp4_srwd,
16801 .unlock = spi_disable_blockprotect_bp4_srwd,
16802 .write = spi_chip_write_256,
16803 .read = spi_chip_read,
16804 .voltage = {2300, 3600},
16805 .prepare_access = spi_prepare_io,
16806 .finish_access = spi_finish_io,
16807 },
16808
16809 {
16810 .vendor = "Puya",
Nico Huberb0cae5e2024-10-25 23:03:40 +020016811 .name = "P25Q21H",
16812 .bustype = BUS_SPI,
16813 .manufacture_id = PUYA_ID,
16814 .model_id = PUYA_P25Q21H,
16815 .total_size = 256,
16816 .page_size = 256,
16817 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
16818 FEATURE_OTP | FEATURE_QIO,
16819 .tested = TEST_UNTESTED,
16820 .probe = probe_spi_rdid,
16821 .probe_timing = TIMING_ZERO,
16822 .block_erasers =
16823 {
16824 {
16825 .eraseblocks = { {256, 1024} },
16826 .block_erase = spi_block_erase_81,
16827 }, {
16828 .eraseblocks = { {4 * 1024, 64} },
16829 .block_erase = spi_block_erase_20,
16830 }, {
16831 .eraseblocks = { {32 * 1024, 8} },
16832 .block_erase = spi_block_erase_52,
16833 }, {
16834 .eraseblocks = { {64 * 1024, 4} },
16835 .block_erase = spi_block_erase_d8,
16836 }, {
16837 .eraseblocks = { {256 * 1024, 1} },
16838 .block_erase = spi_block_erase_60,
16839 }, {
16840 .eraseblocks = { {256 * 1024, 1} },
16841 .block_erase = spi_block_erase_c7,
16842 },
16843 },
16844 .reg_bits =
16845 {
16846 .qe = {STATUS2, 1, RW},
16847 .srp = {STATUS1, 7, RW},
16848 .srl = {STATUS2, 0, RW},
16849 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16850 .tb = {STATUS1, 5, RW},
16851 .sec = {STATUS1, 6, RW},
16852 .cmp = {STATUS2, 6, RW},
16853 },
16854 .wp_write_cfg = spi_wp_write_cfg,
16855 .wp_read_cfg = spi_wp_read_cfg,
16856 .wp_get_ranges = spi_wp_get_available_ranges,
16857 .decode_range = decode_range_spi25,
16858 .printlock = spi_prettyprint_status_register_bp4_srwd,
16859 .unlock = spi_disable_blockprotect_bp4_srwd,
16860 .write = spi_chip_write_256,
16861 .read = spi_chip_read,
16862 .voltage = {2300, 3600},
16863 .prepare_access = spi_prepare_io,
16864 .finish_access = spi_finish_io,
16865 },
16866
16867 {
16868 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020016869 .name = "P25Q40H",
16870 .bustype = BUS_SPI,
16871 .manufacture_id = PUYA_ID,
16872 .model_id = PUYA_P25Q40H,
16873 .total_size = 512,
16874 .page_size = 256,
16875 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16876 FEATURE_OTP | FEATURE_QIO,
16877 .tested = TEST_UNTESTED,
16878 .probe = probe_spi_rdid,
16879 .probe_timing = TIMING_ZERO,
16880 .block_erasers =
16881 {
16882 {
16883 .eraseblocks = { {256, 2048} },
16884 .block_erase = spi_block_erase_81,
16885 }, {
16886 .eraseblocks = { {4 * 1024, 128} },
16887 .block_erase = spi_block_erase_20,
16888 }, {
16889 .eraseblocks = { {32 * 1024, 16} },
16890 .block_erase = spi_block_erase_52,
16891 }, {
16892 .eraseblocks = { {64 * 1024, 8} },
16893 .block_erase = spi_block_erase_d8,
16894 }, {
16895 .eraseblocks = { {512 * 1024, 1} },
16896 .block_erase = spi_block_erase_60,
16897 }, {
16898 .eraseblocks = { {512 * 1024, 1} },
16899 .block_erase = spi_block_erase_c7,
16900 },
16901 },
16902 .reg_bits =
16903 {
16904 .qe = {STATUS2, 1, RW},
16905 .srp = {STATUS1, 7, RW},
16906 .srl = {STATUS2, 0, RW},
16907 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16908 .tb = {STATUS1, 5, RW},
16909 .sec = {STATUS1, 6, RW},
16910 .cmp = {STATUS2, 6, RW},
16911 },
16912 .wp_write_cfg = spi_wp_write_cfg,
16913 .wp_read_cfg = spi_wp_read_cfg,
16914 .wp_get_ranges = spi_wp_get_available_ranges,
16915 .decode_range = decode_range_spi25,
16916 .printlock = spi_prettyprint_status_register_bp4_srwd,
16917 .unlock = spi_disable_blockprotect_bp4_srwd,
16918 .write = spi_chip_write_256,
16919 .read = spi_chip_read,
16920 .voltage = {2300, 3600},
16921 .prepare_access = spi_prepare_io,
16922 .finish_access = spi_finish_io,
16923 },
16924
16925 {
16926 .vendor = "Puya",
Nico Huber1c5d8292024-10-25 23:21:02 +020016927 .name = "P25Q40SH",
16928 .bustype = BUS_SPI,
16929 .manufacture_id = PUYA_ID,
16930 .model_id = PUYA_P25Q40H,
16931 .total_size = 512,
16932 .page_size = 256,
16933 /* Has configuration register that acts like third status register. */
16934 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
16935 FEATURE_OTP | FEATURE_QPI_SRP,
16936 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
16937 .tested = TEST_UNTESTED,
16938 .probe = probe_spi_rdid,
16939 .probe_timing = TIMING_ZERO,
16940 .block_erasers =
16941 {
16942 {
16943 .eraseblocks = { {256, 2048} },
16944 .block_erase = spi_block_erase_81,
16945 }, {
16946 .eraseblocks = { {4 * 1024, 128} },
16947 .block_erase = spi_block_erase_20,
16948 }, {
16949 .eraseblocks = { {32 * 1024, 16} },
16950 .block_erase = spi_block_erase_52,
16951 }, {
16952 .eraseblocks = { {64 * 1024, 8} },
16953 .block_erase = spi_block_erase_d8,
16954 }, {
16955 .eraseblocks = { {512 * 1024, 1} },
16956 .block_erase = spi_block_erase_60,
16957 }, {
16958 .eraseblocks = { {512 * 1024, 1} },
16959 .block_erase = spi_block_erase_c7,
16960 },
16961 },
16962 .reg_bits =
16963 {
16964 .qe = {STATUS2, 1, RW},
16965 .srp = {STATUS1, 7, RW},
16966 .srl = {STATUS2, 0, RW},
16967 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16968 .tb = {STATUS1, 5, RW},
16969 .sec = {STATUS1, 6, RW},
16970 .cmp = {STATUS2, 6, RW},
16971 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
16972 },
16973 .wp_write_cfg = spi_wp_write_cfg,
16974 .wp_read_cfg = spi_wp_read_cfg,
16975 .wp_get_ranges = spi_wp_get_available_ranges,
16976 .decode_range = decode_range_spi25,
16977 .printlock = spi_prettyprint_status_register_bp4_srwd,
16978 .unlock = spi_disable_blockprotect_bp4_srwd,
16979 .write = spi_chip_write_256,
16980 .read = spi_chip_read,
16981 .voltage = {2300, 3600},
16982 .prepare_access = spi_prepare_io,
16983 .finish_access = spi_finish_io,
16984 },
16985
16986 {
16987 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020016988 .name = "P25Q80H",
16989 .bustype = BUS_SPI,
16990 .manufacture_id = PUYA_ID,
16991 .model_id = PUYA_P25Q80H,
16992 .total_size = 1024,
16993 .page_size = 256,
16994 /* RDCR: 0x15, WRCR: 0x31(!) */
16995 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16996 FEATURE_OTP | FEATURE_QIO,
16997 .tested = TEST_UNTESTED,
16998 .probe = probe_spi_rdid,
16999 .probe_timing = TIMING_ZERO,
17000 .block_erasers =
17001 {
17002 {
17003 .eraseblocks = { {256, 4096} },
17004 .block_erase = spi_block_erase_81,
17005 }, {
17006 .eraseblocks = { {4 * 1024, 256} },
17007 .block_erase = spi_block_erase_20,
17008 }, {
17009 .eraseblocks = { {32 * 1024, 32} },
17010 .block_erase = spi_block_erase_52,
17011 }, {
17012 .eraseblocks = { {64 * 1024, 16} },
17013 .block_erase = spi_block_erase_d8,
17014 }, {
17015 .eraseblocks = { {1024 * 1024, 1} },
17016 .block_erase = spi_block_erase_60,
17017 }, {
17018 .eraseblocks = { {1024 * 1024, 1} },
17019 .block_erase = spi_block_erase_c7,
17020 },
17021 },
17022 .reg_bits =
17023 {
17024 .qe = {STATUS2, 1, RW},
17025 .srp = {STATUS1, 7, RW},
17026 .srl = {STATUS2, 0, RW},
17027 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17028 .tb = {STATUS1, 5, RW},
17029 .sec = {STATUS1, 6, RW},
17030 .cmp = {STATUS2, 6, RW},
17031 },
17032 .wp_write_cfg = spi_wp_write_cfg,
17033 .wp_read_cfg = spi_wp_read_cfg,
17034 .wp_get_ranges = spi_wp_get_available_ranges,
17035 .decode_range = decode_range_spi25,
17036 .printlock = spi_prettyprint_status_register_bp4_srwd,
17037 .unlock = spi_disable_blockprotect_bp4_srwd,
17038 .write = spi_chip_write_256,
17039 .read = spi_chip_read,
17040 .voltage = {2300, 3600},
17041 .prepare_access = spi_prepare_io,
17042 .finish_access = spi_finish_io,
17043 },
17044
17045 {
17046 .vendor = "Puya",
Nico Huber1c5d8292024-10-25 23:21:02 +020017047 .name = "P25Q80SH",
17048 .bustype = BUS_SPI,
17049 .manufacture_id = PUYA_ID,
17050 .model_id = PUYA_P25Q80H,
17051 .total_size = 1024,
17052 .page_size = 256,
17053 /* Has configuration register that acts like third status register. */
17054 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17055 FEATURE_OTP | FEATURE_QPI_SRP,
17056 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17057 .tested = TEST_UNTESTED,
17058 .probe = probe_spi_rdid,
17059 .probe_timing = TIMING_ZERO,
17060 .block_erasers =
17061 {
17062 {
17063 .eraseblocks = { {256, 4096} },
17064 .block_erase = spi_block_erase_81,
17065 }, {
17066 .eraseblocks = { {4 * 1024, 256} },
17067 .block_erase = spi_block_erase_20,
17068 }, {
17069 .eraseblocks = { {32 * 1024, 32} },
17070 .block_erase = spi_block_erase_52,
17071 }, {
17072 .eraseblocks = { {64 * 1024, 16} },
17073 .block_erase = spi_block_erase_d8,
17074 }, {
17075 .eraseblocks = { {1024 * 1024, 1} },
17076 .block_erase = spi_block_erase_60,
17077 }, {
17078 .eraseblocks = { {1024 * 1024, 1} },
17079 .block_erase = spi_block_erase_c7,
17080 },
17081 },
17082 .reg_bits =
17083 {
17084 .qe = {STATUS2, 1, RW},
17085 .srp = {STATUS1, 7, RW},
17086 .srl = {STATUS2, 0, RW},
17087 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17088 .tb = {STATUS1, 5, RW},
17089 .sec = {STATUS1, 6, RW},
17090 .cmp = {STATUS2, 6, RW},
17091 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17092 },
17093 .wp_write_cfg = spi_wp_write_cfg,
17094 .wp_read_cfg = spi_wp_read_cfg,
17095 .wp_get_ranges = spi_wp_get_available_ranges,
17096 .decode_range = decode_range_spi25,
17097 .printlock = spi_prettyprint_status_register_bp4_srwd,
17098 .unlock = spi_disable_blockprotect_bp4_srwd,
17099 .write = spi_chip_write_256,
17100 .read = spi_chip_read,
17101 .voltage = {2300, 3600},
17102 .prepare_access = spi_prepare_io,
17103 .finish_access = spi_finish_io,
17104 },
17105
17106 {
17107 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020017108 .name = "P25Q16H",
17109 .bustype = BUS_SPI,
17110 .manufacture_id = PUYA_ID,
17111 .model_id = PUYA_P25Q16H,
17112 .total_size = 2048,
17113 .page_size = 256,
17114 /* RDCR: 0x15, WRCR: 0x31(!) */
17115 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
17116 FEATURE_OTP | FEATURE_QIO,
17117 .tested = TEST_UNTESTED,
17118 .probe = probe_spi_rdid,
17119 .probe_timing = TIMING_ZERO,
17120 .block_erasers =
17121 {
17122 {
17123 .eraseblocks = { {256, 8192} },
17124 .block_erase = spi_block_erase_81,
17125 }, {
17126 .eraseblocks = { {4 * 1024, 512} },
17127 .block_erase = spi_block_erase_20,
17128 }, {
17129 .eraseblocks = { {32 * 1024, 64} },
17130 .block_erase = spi_block_erase_52,
17131 }, {
17132 .eraseblocks = { {64 * 1024, 32} },
17133 .block_erase = spi_block_erase_d8,
17134 }, {
17135 .eraseblocks = { {2048 * 1024, 1} },
17136 .block_erase = spi_block_erase_60,
17137 }, {
17138 .eraseblocks = { {2048 * 1024, 1} },
17139 .block_erase = spi_block_erase_c7,
17140 },
17141 },
17142 .reg_bits =
17143 {
17144 .qe = {STATUS2, 1, RW},
17145 .srp = {STATUS1, 7, RW},
17146 .srl = {STATUS2, 0, RW},
17147 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17148 .tb = {STATUS1, 5, RW},
17149 .sec = {STATUS1, 6, RW},
17150 .cmp = {STATUS2, 6, RW},
17151 },
17152 .wp_write_cfg = spi_wp_write_cfg,
17153 .wp_read_cfg = spi_wp_read_cfg,
17154 .wp_get_ranges = spi_wp_get_available_ranges,
17155 .decode_range = decode_range_spi25,
17156 .printlock = spi_prettyprint_status_register_bp4_srwd,
17157 .unlock = spi_disable_blockprotect_bp4_srwd,
17158 .write = spi_chip_write_256,
17159 .read = spi_chip_read,
17160 .voltage = {2300, 3600},
17161 .prepare_access = spi_prepare_io,
17162 .finish_access = spi_finish_io,
17163 },
17164
17165 {
Nico Huber1c5d8292024-10-25 23:21:02 +020017166 .vendor = "Puya",
17167 .name = "P25Q16SH",
17168 .bustype = BUS_SPI,
17169 .manufacture_id = PUYA_ID,
17170 .model_id = PUYA_P25Q16H,
17171 .total_size = 2048,
17172 .page_size = 256,
17173 /* Has configuration register that acts like third status register. */
17174 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17175 FEATURE_OTP | FEATURE_QPI_SRP,
17176 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17177 .tested = TEST_UNTESTED,
17178 .probe = probe_spi_rdid,
17179 .probe_timing = TIMING_ZERO,
17180 .block_erasers =
17181 {
17182 {
17183 .eraseblocks = { {256, 8192} },
17184 .block_erase = spi_block_erase_81,
17185 }, {
17186 .eraseblocks = { {4 * 1024, 512} },
17187 .block_erase = spi_block_erase_20,
17188 }, {
17189 .eraseblocks = { {32 * 1024, 64} },
17190 .block_erase = spi_block_erase_52,
17191 }, {
17192 .eraseblocks = { {64 * 1024, 32} },
17193 .block_erase = spi_block_erase_d8,
17194 }, {
17195 .eraseblocks = { {2048 * 1024, 1} },
17196 .block_erase = spi_block_erase_60,
17197 }, {
17198 .eraseblocks = { {2048 * 1024, 1} },
17199 .block_erase = spi_block_erase_c7,
17200 },
17201 },
17202 .reg_bits =
17203 {
17204 .qe = {STATUS2, 1, RW},
17205 .srp = {STATUS1, 7, RW},
17206 .srl = {STATUS2, 0, RW},
17207 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17208 .tb = {STATUS1, 5, RW},
17209 .sec = {STATUS1, 6, RW},
17210 .cmp = {STATUS2, 6, RW},
17211 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17212 },
17213 .wp_write_cfg = spi_wp_write_cfg,
17214 .wp_read_cfg = spi_wp_read_cfg,
17215 .wp_get_ranges = spi_wp_get_available_ranges,
17216 .decode_range = decode_range_spi25,
17217 .printlock = spi_prettyprint_status_register_bp4_srwd,
17218 .unlock = spi_disable_blockprotect_bp4_srwd,
17219 .write = spi_chip_write_256,
17220 .read = spi_chip_read,
17221 .voltage = {2300, 3600},
17222 .prepare_access = spi_prepare_io,
17223 .finish_access = spi_finish_io,
17224 },
17225
17226 {
Nico Huberfe21b432024-10-25 23:51:05 +020017227 .vendor = "Puya",
17228 .name = "P25Q32H",
17229 .bustype = BUS_SPI,
17230 .manufacture_id = PUYA_ID,
17231 .model_id = PUYA_P25Q32H,
17232 .total_size = 4096,
17233 .page_size = 256,
17234 /* Has configuration register that acts like third status register. */
17235 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17236 FEATURE_OTP | FEATURE_QPI_SRP,
17237 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
17238 .tested = TEST_UNTESTED,
17239 .probe = probe_spi_rdid,
17240 .probe_timing = TIMING_ZERO,
17241 .block_erasers =
17242 {
17243 {
17244 .eraseblocks = { {256, 16384} },
17245 .block_erase = spi_block_erase_81,
17246 }, {
17247 .eraseblocks = { {4 * 1024, 1024} },
17248 .block_erase = spi_block_erase_20,
17249 }, {
17250 .eraseblocks = { {32 * 1024, 128} },
17251 .block_erase = spi_block_erase_52,
17252 }, {
17253 .eraseblocks = { {64 * 1024, 64} },
17254 .block_erase = spi_block_erase_d8,
17255 }, {
17256 .eraseblocks = { {4096 * 1024, 1} },
17257 .block_erase = spi_block_erase_60,
17258 }, {
17259 .eraseblocks = { {4096 * 1024, 1} },
17260 .block_erase = spi_block_erase_c7,
17261 },
17262 },
17263 .reg_bits =
17264 {
17265 .qe = {STATUS2, 1, RW},
17266 .srp = {STATUS1, 7, RW},
17267 .srl = {STATUS2, 0, RW},
17268 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17269 .tb = {STATUS1, 5, RW},
17270 .sec = {STATUS1, 6, RW},
17271 .cmp = {STATUS2, 6, RW},
17272 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17273 },
17274 .wp_write_cfg = spi_wp_write_cfg,
17275 .wp_read_cfg = spi_wp_read_cfg,
17276 .wp_get_ranges = spi_wp_get_available_ranges,
17277 .decode_range = decode_range_spi25,
17278 .printlock = spi_prettyprint_status_register_bp4_srwd,
17279 .unlock = spi_disable_blockprotect_bp4_srwd,
17280 .write = spi_chip_write_256,
17281 .read = spi_chip_read,
17282 .voltage = {2300, 3600},
17283 .prepare_access = spi_prepare_io,
17284 .finish_access = spi_finish_io,
17285 },
17286
17287 {
17288 .vendor = "Puya",
17289 .name = "P25Q32SH",
17290 .bustype = BUS_SPI,
17291 .manufacture_id = PUYA_ID,
17292 .model_id = PUYA_P25Q32H,
17293 .total_size = 4096,
17294 .page_size = 256,
17295 /* Has configuration register that acts like third status register. */
17296 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17297 FEATURE_OTP | FEATURE_QPI_SRP,
17298 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17299 .tested = TEST_UNTESTED,
17300 .probe = probe_spi_rdid,
17301 .probe_timing = TIMING_ZERO,
17302 .block_erasers =
17303 {
17304 {
17305 .eraseblocks = { {256, 16384} },
17306 .block_erase = spi_block_erase_81,
17307 }, {
17308 .eraseblocks = { {4 * 1024, 1024} },
17309 .block_erase = spi_block_erase_20,
17310 }, {
17311 .eraseblocks = { {32 * 1024, 128} },
17312 .block_erase = spi_block_erase_52,
17313 }, {
17314 .eraseblocks = { {64 * 1024, 64} },
17315 .block_erase = spi_block_erase_d8,
17316 }, {
17317 .eraseblocks = { {4096 * 1024, 1} },
17318 .block_erase = spi_block_erase_60,
17319 }, {
17320 .eraseblocks = { {4096 * 1024, 1} },
17321 .block_erase = spi_block_erase_c7,
17322 },
17323 },
17324 .reg_bits =
17325 {
17326 .qe = {STATUS2, 1, RW},
17327 .srp = {STATUS1, 7, RW},
17328 .srl = {STATUS2, 0, RW},
17329 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17330 .tb = {STATUS1, 5, RW},
17331 .sec = {STATUS1, 6, RW},
17332 .cmp = {STATUS2, 6, RW},
17333 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17334 },
17335 .wp_write_cfg = spi_wp_write_cfg,
17336 .wp_read_cfg = spi_wp_read_cfg,
17337 .wp_get_ranges = spi_wp_get_available_ranges,
17338 .decode_range = decode_range_spi25,
17339 .printlock = spi_prettyprint_status_register_bp4_srwd,
17340 .unlock = spi_disable_blockprotect_bp4_srwd,
17341 .write = spi_chip_write_256,
17342 .read = spi_chip_read,
17343 .voltage = {2300, 3600},
17344 .prepare_access = spi_prepare_io,
17345 .finish_access = spi_finish_io,
17346 },
17347
17348 {
17349 .vendor = "Puya",
17350 .name = "P25Q64H",
17351 .bustype = BUS_SPI,
17352 .manufacture_id = PUYA_ID,
17353 .model_id = PUYA_P25Q64H,
17354 .total_size = 8192,
17355 .page_size = 256,
17356 /* Has configuration register that acts like third status register. */
17357 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17358 FEATURE_OTP | FEATURE_QPI_SRP,
17359 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
17360 .tested = TEST_UNTESTED,
17361 .probe = probe_spi_rdid,
17362 .probe_timing = TIMING_ZERO,
17363 .block_erasers =
17364 {
17365 {
17366 .eraseblocks = { {256, 32768} },
17367 .block_erase = spi_block_erase_81,
17368 }, {
17369 .eraseblocks = { {4 * 1024, 2048} },
17370 .block_erase = spi_block_erase_20,
17371 }, {
17372 .eraseblocks = { {32 * 1024, 256} },
17373 .block_erase = spi_block_erase_52,
17374 }, {
17375 .eraseblocks = { {64 * 1024, 128} },
17376 .block_erase = spi_block_erase_d8,
17377 }, {
17378 .eraseblocks = { {8192 * 1024, 1} },
17379 .block_erase = spi_block_erase_60,
17380 }, {
17381 .eraseblocks = { {8192 * 1024, 1} },
17382 .block_erase = spi_block_erase_c7,
17383 },
17384 },
17385 .reg_bits =
17386 {
17387 .qe = {STATUS2, 1, RW},
17388 .srp = {STATUS1, 7, RW},
17389 .srl = {STATUS2, 0, RW},
17390 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17391 .tb = {STATUS1, 5, RW},
17392 .sec = {STATUS1, 6, RW},
17393 .cmp = {STATUS2, 6, RW},
17394 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17395 },
17396 .wp_write_cfg = spi_wp_write_cfg,
17397 .wp_read_cfg = spi_wp_read_cfg,
17398 .wp_get_ranges = spi_wp_get_available_ranges,
17399 .decode_range = decode_range_spi25,
17400 .printlock = spi_prettyprint_status_register_bp4_srwd,
17401 .unlock = spi_disable_blockprotect_bp4_srwd,
17402 .write = spi_chip_write_256,
17403 .read = spi_chip_read,
17404 .voltage = {2300, 3600},
17405 .prepare_access = spi_prepare_io,
17406 .finish_access = spi_finish_io,
17407 },
17408
17409 {
17410 .vendor = "Puya",
17411 .name = "P25Q64SH",
17412 .bustype = BUS_SPI,
17413 .manufacture_id = PUYA_ID,
17414 .model_id = PUYA_P25Q64H,
17415 .total_size = 8192,
17416 .page_size = 256,
17417 /* Has configuration register that acts like third status register. */
17418 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17419 FEATURE_OTP | FEATURE_QPI_SRP,
17420 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17421 .tested = TEST_UNTESTED,
17422 .probe = probe_spi_rdid,
17423 .probe_timing = TIMING_ZERO,
17424 .block_erasers =
17425 {
17426 {
17427 .eraseblocks = { {256, 32768} },
17428 .block_erase = spi_block_erase_81,
17429 }, {
17430 .eraseblocks = { {4 * 1024, 2048} },
17431 .block_erase = spi_block_erase_20,
17432 }, {
17433 .eraseblocks = { {32 * 1024, 256} },
17434 .block_erase = spi_block_erase_52,
17435 }, {
17436 .eraseblocks = { {64 * 1024, 128} },
17437 .block_erase = spi_block_erase_d8,
17438 }, {
17439 .eraseblocks = { {8192 * 1024, 1} },
17440 .block_erase = spi_block_erase_60,
17441 }, {
17442 .eraseblocks = { {8192 * 1024, 1} },
17443 .block_erase = spi_block_erase_c7,
17444 },
17445 },
17446 .reg_bits =
17447 {
17448 .qe = {STATUS2, 1, RW},
17449 .srp = {STATUS1, 7, RW},
17450 .srl = {STATUS2, 0, RW},
17451 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17452 .tb = {STATUS1, 5, RW},
17453 .sec = {STATUS1, 6, RW},
17454 .cmp = {STATUS2, 6, RW},
17455 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17456 },
17457 .wp_write_cfg = spi_wp_write_cfg,
17458 .wp_read_cfg = spi_wp_read_cfg,
17459 .wp_get_ranges = spi_wp_get_available_ranges,
17460 .decode_range = decode_range_spi25,
17461 .printlock = spi_prettyprint_status_register_bp4_srwd,
17462 .unlock = spi_disable_blockprotect_bp4_srwd,
17463 .write = spi_chip_write_256,
17464 .read = spi_chip_read,
17465 .voltage = {2300, 3600},
17466 .prepare_access = spi_prepare_io,
17467 .finish_access = spi_finish_io,
17468 },
17469
17470 {
17471 .vendor = "Puya",
17472 .name = "P25Q128H",
17473 .bustype = BUS_SPI,
17474 .manufacture_id = PUYA_ID,
17475 .model_id = PUYA_P25Q128H,
17476 .total_size = 16384,
17477 .page_size = 256,
17478 /* Has configuration register that acts like third status register. */
17479 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17480 FEATURE_OTP | FEATURE_QPI_SRP,
17481 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17482 .tested = TEST_UNTESTED,
17483 .probe = probe_spi_rdid,
17484 .probe_timing = TIMING_ZERO,
17485 .block_erasers =
17486 {
17487 {
17488 .eraseblocks = { {256, 65536} },
17489 .block_erase = spi_block_erase_81,
17490 }, {
17491 .eraseblocks = { {4 * 1024, 4096} },
17492 .block_erase = spi_block_erase_20,
17493 }, {
17494 .eraseblocks = { {32 * 1024, 512} },
17495 .block_erase = spi_block_erase_52,
17496 }, {
17497 .eraseblocks = { {64 * 1024, 256} },
17498 .block_erase = spi_block_erase_d8,
17499 }, {
17500 .eraseblocks = { {16384 * 1024, 1} },
17501 .block_erase = spi_block_erase_60,
17502 }, {
17503 .eraseblocks = { {16384 * 1024, 1} },
17504 .block_erase = spi_block_erase_c7,
17505 },
17506 },
17507 .reg_bits =
17508 {
17509 .qe = {STATUS2, 1, RW},
17510 .srp = {STATUS1, 7, RW},
17511 .srl = {STATUS2, 0, RW},
17512 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17513 .tb = {STATUS1, 5, RW},
17514 .sec = {STATUS1, 6, RW},
17515 .cmp = {STATUS2, 6, RW},
17516 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17517 },
17518 .wp_write_cfg = spi_wp_write_cfg,
17519 .wp_read_cfg = spi_wp_read_cfg,
17520 .wp_get_ranges = spi_wp_get_available_ranges,
17521 .decode_range = decode_range_spi25,
17522 .printlock = spi_prettyprint_status_register_bp4_srwd,
17523 .unlock = spi_disable_blockprotect_bp4_srwd,
17524 .write = spi_chip_write_256,
17525 .read = spi_chip_read,
17526 .voltage = {2300, 3600},
17527 .prepare_access = spi_prepare_io,
17528 .finish_access = spi_finish_io,
17529 },
17530
17531 {
Nico Huber06e02642024-10-26 00:46:11 +020017532 .vendor = "Puya",
17533 .name = "PY25Q40HB",
17534 .bustype = BUS_SPI,
17535 .manufacture_id = PUYA_ID,
17536 .model_id = PUYA_PY25Q40H,
17537 .total_size = 512,
17538 .page_size = 256,
17539 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
17540 FEATURE_OTP | FEATURE_QPI_SRP,
17541 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17542 .tested = TEST_UNTESTED,
17543 .probe = probe_spi_rdid,
17544 .probe_timing = TIMING_ZERO,
17545 .block_erasers =
17546 {
17547 {
17548 .eraseblocks = { {4 * 1024, 128} },
17549 .block_erase = spi_block_erase_20,
17550 }, {
17551 .eraseblocks = { {32 * 1024, 16} },
17552 .block_erase = spi_block_erase_52,
17553 }, {
17554 .eraseblocks = { {64 * 1024, 8} },
17555 .block_erase = spi_block_erase_d8,
17556 }, {
17557 .eraseblocks = { {512 * 1024, 1} },
17558 .block_erase = spi_block_erase_60,
17559 }, {
17560 .eraseblocks = { {512 * 1024, 1} },
17561 .block_erase = spi_block_erase_c7,
17562 },
17563 },
17564 .reg_bits =
17565 {
17566 .qe = {STATUS2, 1, RW},
17567 .srp = {STATUS1, 7, RW},
17568 .srl = {STATUS2, 0, RW},
17569 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17570 .tb = {STATUS1, 5, RW},
17571 .sec = {STATUS1, 6, RW},
17572 .cmp = {STATUS2, 6, RW},
17573 },
17574 .wp_write_cfg = spi_wp_write_cfg,
17575 .wp_read_cfg = spi_wp_read_cfg,
17576 .wp_get_ranges = spi_wp_get_available_ranges,
17577 .decode_range = decode_range_spi25,
17578 .printlock = spi_prettyprint_status_register_bp4_srwd,
17579 .unlock = spi_disable_blockprotect_bp4_srwd,
17580 .write = spi_chip_write_256,
17581 .read = spi_chip_read,
17582 .voltage = {2300, 3600},
17583 .prepare_access = spi_prepare_io,
17584 .finish_access = spi_finish_io,
17585 },
17586
17587 {
17588 .vendor = "Puya",
17589 .name = "PY25Q80HB",
17590 .bustype = BUS_SPI,
17591 .manufacture_id = PUYA_ID,
17592 .model_id = PUYA_PY25Q80H,
17593 .total_size = 1024,
17594 .page_size = 256,
17595 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
17596 FEATURE_OTP | FEATURE_QPI_SRP,
17597 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17598 .tested = TEST_UNTESTED,
17599 .probe = probe_spi_rdid,
17600 .probe_timing = TIMING_ZERO,
17601 .block_erasers =
17602 {
17603 {
17604 .eraseblocks = { {4 * 1024, 256} },
17605 .block_erase = spi_block_erase_20,
17606 }, {
17607 .eraseblocks = { {32 * 1024, 32} },
17608 .block_erase = spi_block_erase_52,
17609 }, {
17610 .eraseblocks = { {64 * 1024, 16} },
17611 .block_erase = spi_block_erase_d8,
17612 }, {
17613 .eraseblocks = { {1024 * 1024, 1} },
17614 .block_erase = spi_block_erase_60,
17615 }, {
17616 .eraseblocks = { {1024 * 1024, 1} },
17617 .block_erase = spi_block_erase_c7,
17618 },
17619 },
17620 .reg_bits =
17621 {
17622 .qe = {STATUS2, 1, RW},
17623 .srp = {STATUS1, 7, RW},
17624 .srl = {STATUS2, 0, RW},
17625 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17626 .tb = {STATUS1, 5, RW},
17627 .sec = {STATUS1, 6, RW},
17628 .cmp = {STATUS2, 6, RW},
17629 },
17630 .wp_write_cfg = spi_wp_write_cfg,
17631 .wp_read_cfg = spi_wp_read_cfg,
17632 .wp_get_ranges = spi_wp_get_available_ranges,
17633 .decode_range = decode_range_spi25,
17634 .printlock = spi_prettyprint_status_register_bp4_srwd,
17635 .unlock = spi_disable_blockprotect_bp4_srwd,
17636 .write = spi_chip_write_256,
17637 .read = spi_chip_read,
17638 .voltage = {2300, 3600},
17639 .prepare_access = spi_prepare_io,
17640 .finish_access = spi_finish_io,
17641 },
17642
17643 {
17644 .vendor = "Puya",
17645 .name = "PY25Q16HB",
17646 .bustype = BUS_SPI,
17647 .manufacture_id = PUYA_ID,
17648 .model_id = PUYA_PY25Q16H,
17649 .total_size = 2048,
17650 .page_size = 256,
17651 /* Has configuration register that acts like third status register. */
17652 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17653 FEATURE_OTP | FEATURE_QPI_SRP,
17654 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17655 .tested = TEST_UNTESTED,
17656 .probe = probe_spi_rdid,
17657 .probe_timing = TIMING_ZERO,
17658 .block_erasers =
17659 {
17660 {
17661 .eraseblocks = { {4 * 1024, 512} },
17662 .block_erase = spi_block_erase_20,
17663 }, {
17664 .eraseblocks = { {32 * 1024, 64} },
17665 .block_erase = spi_block_erase_52,
17666 }, {
17667 .eraseblocks = { {64 * 1024, 32} },
17668 .block_erase = spi_block_erase_d8,
17669 }, {
17670 .eraseblocks = { {2048 * 1024, 1} },
17671 .block_erase = spi_block_erase_60,
17672 }, {
17673 .eraseblocks = { {2048 * 1024, 1} },
17674 .block_erase = spi_block_erase_c7,
17675 },
17676 },
17677 .reg_bits =
17678 {
17679 .qe = {STATUS2, 1, RW},
17680 .srp = {STATUS1, 7, RW},
17681 .srl = {STATUS2, 0, RW},
17682 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17683 .tb = {STATUS1, 5, RW},
17684 .sec = {STATUS1, 6, RW},
17685 .cmp = {STATUS2, 6, RW},
17686 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17687 },
17688 .wp_write_cfg = spi_wp_write_cfg,
17689 .wp_read_cfg = spi_wp_read_cfg,
17690 .wp_get_ranges = spi_wp_get_available_ranges,
17691 .decode_range = decode_range_spi25,
17692 .printlock = spi_prettyprint_status_register_bp4_srwd,
17693 .unlock = spi_disable_blockprotect_bp4_srwd,
17694 .write = spi_chip_write_256,
17695 .read = spi_chip_read,
17696 .voltage = {2300, 3600},
17697 .prepare_access = spi_prepare_io,
17698 .finish_access = spi_finish_io,
17699 },
17700
17701 {
17702 .vendor = "Puya",
17703 .name = "PY25Q32HB",
17704 .bustype = BUS_SPI,
17705 .manufacture_id = PUYA_ID,
17706 .model_id = PUYA_PY25Q32H,
17707 .total_size = 4096,
17708 .page_size = 256,
17709 /* Has configuration register that acts like third status register. */
17710 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17711 FEATURE_OTP | FEATURE_QPI_SRP,
17712 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17713 .tested = TEST_UNTESTED,
17714 .probe = probe_spi_rdid,
17715 .probe_timing = TIMING_ZERO,
17716 .block_erasers =
17717 {
17718 {
17719 .eraseblocks = { {4 * 1024, 1024} },
17720 .block_erase = spi_block_erase_20,
17721 }, {
17722 .eraseblocks = { {32 * 1024, 128} },
17723 .block_erase = spi_block_erase_52,
17724 }, {
17725 .eraseblocks = { {64 * 1024, 64} },
17726 .block_erase = spi_block_erase_d8,
17727 }, {
17728 .eraseblocks = { {4096 * 1024, 1} },
17729 .block_erase = spi_block_erase_60,
17730 }, {
17731 .eraseblocks = { {4096 * 1024, 1} },
17732 .block_erase = spi_block_erase_c7,
17733 },
17734 },
17735 .reg_bits =
17736 {
17737 .qe = {STATUS2, 1, RW},
17738 .srp = {STATUS1, 7, RW},
17739 .srl = {STATUS2, 0, RW},
17740 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17741 .tb = {STATUS1, 5, RW},
17742 .sec = {STATUS1, 6, RW},
17743 .cmp = {STATUS2, 6, RW},
17744 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17745 },
17746 .wp_write_cfg = spi_wp_write_cfg,
17747 .wp_read_cfg = spi_wp_read_cfg,
17748 .wp_get_ranges = spi_wp_get_available_ranges,
17749 .decode_range = decode_range_spi25,
17750 .printlock = spi_prettyprint_status_register_bp4_srwd,
17751 .unlock = spi_disable_blockprotect_bp4_srwd,
17752 .write = spi_chip_write_256,
17753 .read = spi_chip_read,
17754 .voltage = {2300, 3600},
17755 .prepare_access = spi_prepare_io,
17756 .finish_access = spi_finish_io,
17757 },
17758
17759 {
17760 .vendor = "Puya",
17761 .name = "PY25Q64HA",
17762 .bustype = BUS_SPI,
17763 .manufacture_id = PUYA_ID,
17764 .model_id = PUYA_PY25Q64H,
17765 .total_size = 8192,
17766 .page_size = 256,
17767 /* Has configuration register that acts like third status register. */
17768 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17769 FEATURE_OTP | FEATURE_QPI_SRP,
17770 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17771 .tested = TEST_UNTESTED,
17772 .probe = probe_spi_rdid,
17773 .probe_timing = TIMING_ZERO,
17774 .block_erasers =
17775 {
17776 {
17777 .eraseblocks = { {4 * 1024, 2048} },
17778 .block_erase = spi_block_erase_20,
17779 }, {
17780 .eraseblocks = { {32 * 1024, 256} },
17781 .block_erase = spi_block_erase_52,
17782 }, {
17783 .eraseblocks = { {64 * 1024, 128} },
17784 .block_erase = spi_block_erase_d8,
17785 }, {
17786 .eraseblocks = { {8192 * 1024, 1} },
17787 .block_erase = spi_block_erase_60,
17788 }, {
17789 .eraseblocks = { {8192 * 1024, 1} },
17790 .block_erase = spi_block_erase_c7,
17791 },
17792 },
17793 .reg_bits =
17794 {
17795 .qe = {STATUS2, 1, RW},
17796 .srp = {STATUS1, 7, RW},
17797 .srl = {STATUS2, 0, RW},
17798 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17799 .tb = {STATUS1, 5, RW},
17800 .sec = {STATUS1, 6, RW},
17801 .cmp = {STATUS2, 6, RW},
17802 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17803 },
17804 .wp_write_cfg = spi_wp_write_cfg,
17805 .wp_read_cfg = spi_wp_read_cfg,
17806 .wp_get_ranges = spi_wp_get_available_ranges,
17807 .decode_range = decode_range_spi25,
17808 .printlock = spi_prettyprint_status_register_bp4_srwd,
17809 .unlock = spi_disable_blockprotect_bp4_srwd,
17810 .write = spi_chip_write_256,
17811 .read = spi_chip_read,
17812 .voltage = {2700, 3600},
17813 .prepare_access = spi_prepare_io,
17814 .finish_access = spi_finish_io,
17815 },
17816
17817 {
17818 .vendor = "Puya",
17819 .name = "PY25F64HA",
17820 .bustype = BUS_SPI,
17821 .manufacture_id = PUYA_ID,
17822 .model_id = PUYA_PY25F64H,
17823 .total_size = 8192,
17824 .page_size = 256,
17825 /* Has configuration register that acts like third status register. */
17826 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17827 FEATURE_OTP | FEATURE_QPI_SRP,
17828 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17829 .tested = TEST_UNTESTED,
17830 .probe = probe_spi_rdid,
17831 .probe_timing = TIMING_ZERO,
17832 .block_erasers =
17833 {
17834 {
17835 .eraseblocks = { {4 * 1024, 2048} },
17836 .block_erase = spi_block_erase_20,
17837 }, {
17838 .eraseblocks = { {32 * 1024, 256} },
17839 .block_erase = spi_block_erase_52,
17840 }, {
17841 .eraseblocks = { {64 * 1024, 128} },
17842 .block_erase = spi_block_erase_d8,
17843 }, {
17844 .eraseblocks = { {8192 * 1024, 1} },
17845 .block_erase = spi_block_erase_60,
17846 }, {
17847 .eraseblocks = { {8192 * 1024, 1} },
17848 .block_erase = spi_block_erase_c7,
17849 },
17850 },
17851 .reg_bits =
17852 {
17853 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
17854 .srp = {STATUS1, 7, RW},
17855 .srl = {STATUS2, 0, RW},
17856 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17857 .tb = {STATUS1, 5, RW},
17858 .sec = {STATUS1, 6, RW},
17859 .cmp = {STATUS2, 6, RW},
17860 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17861 },
17862 .wp_write_cfg = spi_wp_write_cfg,
17863 .wp_read_cfg = spi_wp_read_cfg,
17864 .wp_get_ranges = spi_wp_get_available_ranges,
17865 .decode_range = decode_range_spi25,
17866 .printlock = spi_prettyprint_status_register_bp4_srwd,
17867 .unlock = spi_disable_blockprotect_bp4_srwd,
17868 .write = spi_chip_write_256,
17869 .read = spi_chip_read,
17870 .voltage = {2700, 3600},
17871 .prepare_access = spi_prepare_io,
17872 .finish_access = spi_finish_io,
17873 },
17874
17875 {
17876 .vendor = "Puya",
17877 .name = "PY25Q128HA",
17878 .bustype = BUS_SPI,
17879 .manufacture_id = PUYA_ID,
17880 .model_id = PUYA_PY25Q128H,
17881 .total_size = 16384,
17882 .page_size = 256,
17883 /* Has configuration register that acts like third status register. */
17884 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17885 FEATURE_OTP | FEATURE_QPI_SRP,
17886 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17887 .tested = TEST_UNTESTED,
17888 .probe = probe_spi_rdid,
17889 .probe_timing = TIMING_ZERO,
17890 .block_erasers =
17891 {
17892 {
17893 .eraseblocks = { {4 * 1024, 4096} },
17894 .block_erase = spi_block_erase_20,
17895 }, {
17896 .eraseblocks = { {32 * 1024, 512} },
17897 .block_erase = spi_block_erase_52,
17898 }, {
17899 .eraseblocks = { {64 * 1024, 256} },
17900 .block_erase = spi_block_erase_d8,
17901 }, {
17902 .eraseblocks = { {16384 * 1024, 1} },
17903 .block_erase = spi_block_erase_60,
17904 }, {
17905 .eraseblocks = { {16384 * 1024, 1} },
17906 .block_erase = spi_block_erase_c7,
17907 },
17908 },
17909 .reg_bits =
17910 {
17911 .qe = {STATUS2, 1, RW},
17912 .srp = {STATUS1, 7, RW},
17913 .srl = {STATUS2, 0, RW},
17914 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17915 .tb = {STATUS1, 5, RW},
17916 .sec = {STATUS1, 6, RW},
17917 .cmp = {STATUS2, 6, RW},
17918 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17919 },
17920 .wp_write_cfg = spi_wp_write_cfg,
17921 .wp_read_cfg = spi_wp_read_cfg,
17922 .wp_get_ranges = spi_wp_get_available_ranges,
17923 .decode_range = decode_range_spi25,
17924 .printlock = spi_prettyprint_status_register_bp4_srwd,
17925 .unlock = spi_disable_blockprotect_bp4_srwd,
17926 .write = spi_chip_write_256,
17927 .read = spi_chip_read,
17928 .voltage = {2700, 3600},
17929 .prepare_access = spi_prepare_io,
17930 .finish_access = spi_finish_io,
17931 },
17932
17933 {
17934 .vendor = "Puya",
17935 .name = "PY25F128HA/PY25R128HA",
17936 .bustype = BUS_SPI,
17937 .manufacture_id = PUYA_ID,
17938 .model_id = PUYA_PY25F128H,
17939 .total_size = 16384,
17940 .page_size = 256,
17941 /* Has configuration register that acts like third status register. */
17942 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17943 FEATURE_OTP | FEATURE_QPI_SRP,
17944 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17945 .tested = TEST_UNTESTED,
17946 .probe = probe_spi_rdid,
17947 .probe_timing = TIMING_ZERO,
17948 .block_erasers =
17949 {
17950 {
17951 .eraseblocks = { {4 * 1024, 4096} },
17952 .block_erase = spi_block_erase_20,
17953 }, {
17954 .eraseblocks = { {32 * 1024, 512} },
17955 .block_erase = spi_block_erase_52,
17956 }, {
17957 .eraseblocks = { {64 * 1024, 256} },
17958 .block_erase = spi_block_erase_d8,
17959 }, {
17960 .eraseblocks = { {16384 * 1024, 1} },
17961 .block_erase = spi_block_erase_60,
17962 }, {
17963 .eraseblocks = { {16384 * 1024, 1} },
17964 .block_erase = spi_block_erase_c7,
17965 },
17966 },
17967 .reg_bits =
17968 {
17969 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
17970 .srp = {STATUS1, 7, RW},
17971 .srl = {STATUS2, 0, RW},
17972 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17973 .tb = {STATUS1, 5, RW},
17974 .sec = {STATUS1, 6, RW},
17975 .cmp = {STATUS2, 6, RW},
17976 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17977 },
17978 .wp_write_cfg = spi_wp_write_cfg,
17979 .wp_read_cfg = spi_wp_read_cfg,
17980 .wp_get_ranges = spi_wp_get_available_ranges,
17981 .decode_range = decode_range_spi25,
17982 .printlock = spi_prettyprint_status_register_bp4_srwd,
17983 .unlock = spi_disable_blockprotect_bp4_srwd,
17984 .write = spi_chip_write_256,
17985 .read = spi_chip_read,
17986 .voltage = {2700, 3600},
17987 .prepare_access = spi_prepare_io,
17988 .finish_access = spi_finish_io,
17989 },
17990
17991 {
Nico Huberc230c692024-10-26 01:16:23 +020017992 .vendor = "Puya",
17993 .name = "PY25Q256HB",
17994 .bustype = BUS_SPI,
17995 .manufacture_id = PUYA_ID,
17996 .model_id = PUYA_PY25Q256H,
17997 .total_size = 32768,
17998 .page_size = 256,
17999 /* Has configuration register that acts like third status register. */
18000 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18001 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18002 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18003 .tested = TEST_UNTESTED,
18004 .probe = probe_spi_rdid,
18005 .probe_timing = TIMING_ZERO,
18006 .block_erasers =
18007 {
18008 {
18009 .eraseblocks = { {4 * 1024, 8192} },
18010 .block_erase = spi_block_erase_21,
18011 }, {
18012 .eraseblocks = { {4 * 1024, 8192} },
18013 .block_erase = spi_block_erase_20,
18014 }, {
18015 .eraseblocks = { {32 * 1024, 1024} },
18016 .block_erase = spi_block_erase_5c,
18017 }, {
18018 .eraseblocks = { {32 * 1024, 1024} },
18019 .block_erase = spi_block_erase_52,
18020 }, {
18021 .eraseblocks = { {64 * 1024, 512} },
18022 .block_erase = spi_block_erase_dc,
18023 }, {
18024 .eraseblocks = { {64 * 1024, 512} },
18025 .block_erase = spi_block_erase_d8,
18026 }, {
18027 .eraseblocks = { {32768 * 1024, 1} },
18028 .block_erase = spi_block_erase_60,
18029 }, {
18030 .eraseblocks = { {32768 * 1024, 1} },
18031 .block_erase = spi_block_erase_c7,
18032 },
18033 },
18034 .reg_bits =
18035 {
18036 .qe = {STATUS2, 1, RW},
18037 .srp = {STATUS1, 7, RW},
18038 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018039 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18040 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018041 .cmp = {STATUS2, 6, RW},
18042 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18043 },
18044 .wp_write_cfg = spi_wp_write_cfg,
18045 .wp_read_cfg = spi_wp_read_cfg,
18046 .wp_get_ranges = spi_wp_get_available_ranges,
18047 .decode_range = decode_range_spi25,
18048 .printlock = spi_prettyprint_status_register_bp4_srwd,
18049 .unlock = spi_disable_blockprotect_bp4_srwd,
18050 .write = spi_chip_write_256,
18051 .read = spi_chip_read,
18052 .voltage = {2700, 3600},
18053 .prepare_access = spi_prepare_io,
18054 .finish_access = spi_finish_io,
18055 },
18056
18057 {
18058 .vendor = "Puya",
18059 .name = "PY25F256HB",
18060 .bustype = BUS_SPI,
18061 .manufacture_id = PUYA_ID,
18062 .model_id = PUYA_PY25F256H,
18063 .total_size = 32768,
18064 .page_size = 256,
18065 /* Has configuration register that acts like third status register. */
18066 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18067 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18068 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18069 .tested = TEST_UNTESTED,
18070 .probe = probe_spi_rdid,
18071 .probe_timing = TIMING_ZERO,
18072 .block_erasers =
18073 {
18074 {
18075 .eraseblocks = { {4 * 1024, 8192} },
18076 .block_erase = spi_block_erase_21,
18077 }, {
18078 .eraseblocks = { {4 * 1024, 8192} },
18079 .block_erase = spi_block_erase_20,
18080 }, {
18081 .eraseblocks = { {32 * 1024, 1024} },
18082 .block_erase = spi_block_erase_5c,
18083 }, {
18084 .eraseblocks = { {32 * 1024, 1024} },
18085 .block_erase = spi_block_erase_52,
18086 }, {
18087 .eraseblocks = { {64 * 1024, 512} },
18088 .block_erase = spi_block_erase_dc,
18089 }, {
18090 .eraseblocks = { {64 * 1024, 512} },
18091 .block_erase = spi_block_erase_d8,
18092 }, {
18093 .eraseblocks = { {32768 * 1024, 1} },
18094 .block_erase = spi_block_erase_60,
18095 }, {
18096 .eraseblocks = { {32768 * 1024, 1} },
18097 .block_erase = spi_block_erase_c7,
18098 },
18099 },
18100 .reg_bits =
18101 {
18102 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
18103 .srp = {STATUS1, 7, RW},
18104 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018105 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18106 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018107 .cmp = {STATUS2, 6, RW},
18108 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18109 },
18110 .wp_write_cfg = spi_wp_write_cfg,
18111 .wp_read_cfg = spi_wp_read_cfg,
18112 .wp_get_ranges = spi_wp_get_available_ranges,
18113 .decode_range = decode_range_spi25,
18114 .printlock = spi_prettyprint_status_register_bp4_srwd,
18115 .unlock = spi_disable_blockprotect_bp4_srwd,
18116 .write = spi_chip_write_256,
18117 .read = spi_chip_read,
18118 .voltage = {2700, 3600},
18119 .prepare_access = spi_prepare_io,
18120 .finish_access = spi_finish_io,
18121 },
18122
18123 {
18124 .vendor = "Puya",
18125 .name = "PY25Q512HB",
18126 .bustype = BUS_SPI,
18127 .manufacture_id = PUYA_ID,
18128 .model_id = PUYA_PY25Q512H,
18129 .total_size = 65536,
18130 .page_size = 256,
18131 /* Has configuration register that acts like third status register. */
18132 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18133 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18134 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18135 .tested = TEST_UNTESTED,
18136 .probe = probe_spi_rdid,
18137 .probe_timing = TIMING_ZERO,
18138 .block_erasers =
18139 {
18140 {
18141 .eraseblocks = { {4 * 1024, 16384} },
18142 .block_erase = spi_block_erase_21,
18143 }, {
18144 .eraseblocks = { {4 * 1024, 16384} },
18145 .block_erase = spi_block_erase_20,
18146 }, {
18147 .eraseblocks = { {32 * 1024, 2048} },
18148 .block_erase = spi_block_erase_5c,
18149 }, {
18150 .eraseblocks = { {32 * 1024, 2048} },
18151 .block_erase = spi_block_erase_52,
18152 }, {
18153 .eraseblocks = { {64 * 1024, 1024} },
18154 .block_erase = spi_block_erase_dc,
18155 }, {
18156 .eraseblocks = { {64 * 1024, 1024} },
18157 .block_erase = spi_block_erase_d8,
18158 }, {
18159 .eraseblocks = { {65536 * 1024, 1} },
18160 .block_erase = spi_block_erase_60,
18161 }, {
18162 .eraseblocks = { {65536 * 1024, 1} },
18163 .block_erase = spi_block_erase_c7,
18164 },
18165 },
18166 .reg_bits =
18167 {
18168 .qe = {STATUS2, 1, RW},
18169 .srp = {STATUS1, 7, RW},
18170 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018171 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18172 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018173 .cmp = {STATUS2, 6, RW},
18174 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18175 },
18176 .wp_write_cfg = spi_wp_write_cfg,
18177 .wp_read_cfg = spi_wp_read_cfg,
18178 .wp_get_ranges = spi_wp_get_available_ranges,
18179 .decode_range = decode_range_spi25,
18180 .printlock = spi_prettyprint_status_register_bp4_srwd,
18181 .unlock = spi_disable_blockprotect_bp4_srwd,
18182 .write = spi_chip_write_256,
18183 .read = spi_chip_read,
18184 .voltage = {2700, 3600},
18185 .prepare_access = spi_prepare_io,
18186 .finish_access = spi_finish_io,
18187 },
18188
18189 {
18190 .vendor = "Puya",
18191 .name = "PY25F512HB",
18192 .bustype = BUS_SPI,
18193 .manufacture_id = PUYA_ID,
18194 .model_id = PUYA_PY25F512H,
18195 .total_size = 65536,
18196 .page_size = 256,
18197 /* Has configuration register that acts like third status register. */
18198 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18199 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18200 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18201 .tested = TEST_UNTESTED,
18202 .probe = probe_spi_rdid,
18203 .probe_timing = TIMING_ZERO,
18204 .block_erasers =
18205 {
18206 {
18207 .eraseblocks = { {4 * 1024, 16384} },
18208 .block_erase = spi_block_erase_21,
18209 }, {
18210 .eraseblocks = { {4 * 1024, 16384} },
18211 .block_erase = spi_block_erase_20,
18212 }, {
18213 .eraseblocks = { {32 * 1024, 2048} },
18214 .block_erase = spi_block_erase_5c,
18215 }, {
18216 .eraseblocks = { {32 * 1024, 2048} },
18217 .block_erase = spi_block_erase_52,
18218 }, {
18219 .eraseblocks = { {64 * 1024, 1024} },
18220 .block_erase = spi_block_erase_dc,
18221 }, {
18222 .eraseblocks = { {64 * 1024, 1024} },
18223 .block_erase = spi_block_erase_d8,
18224 }, {
18225 .eraseblocks = { {65536 * 1024, 1} },
18226 .block_erase = spi_block_erase_60,
18227 }, {
18228 .eraseblocks = { {65536 * 1024, 1} },
18229 .block_erase = spi_block_erase_c7,
18230 },
18231 },
18232 .reg_bits =
18233 {
18234 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
18235 .srp = {STATUS1, 7, RW},
18236 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018237 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18238 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018239 .cmp = {STATUS2, 6, RW},
18240 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18241 },
18242 .wp_write_cfg = spi_wp_write_cfg,
18243 .wp_read_cfg = spi_wp_read_cfg,
18244 .wp_get_ranges = spi_wp_get_available_ranges,
18245 .decode_range = decode_range_spi25,
18246 .printlock = spi_prettyprint_status_register_bp4_srwd,
18247 .unlock = spi_disable_blockprotect_bp4_srwd,
18248 .write = spi_chip_write_256,
18249 .read = spi_chip_read,
18250 .voltage = {2700, 3600},
18251 .prepare_access = spi_prepare_io,
18252 .finish_access = spi_finish_io,
18253 },
18254
18255 {
18256 .vendor = "Puya",
18257 .name = "PY25Q01GHB",
18258 .bustype = BUS_SPI,
18259 .manufacture_id = PUYA_ID,
18260 .model_id = PUYA_PY25Q01GH,
18261 .total_size = 128 * 1024,
18262 .page_size = 256,
18263 /* Has configuration register that acts like third status register. */
18264 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18265 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18266 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18267 .tested = TEST_UNTESTED,
18268 .probe = probe_spi_rdid,
18269 .probe_timing = TIMING_ZERO,
18270 .block_erasers =
18271 {
18272 {
18273 .eraseblocks = { {4 * 1024, 32768} },
18274 .block_erase = spi_block_erase_21,
18275 }, {
18276 .eraseblocks = { {4 * 1024, 32768} },
18277 .block_erase = spi_block_erase_20,
18278 }, {
18279 .eraseblocks = { {32 * 1024, 4096} },
18280 .block_erase = spi_block_erase_5c,
18281 }, {
18282 .eraseblocks = { {32 * 1024, 4096} },
18283 .block_erase = spi_block_erase_52,
18284 }, {
18285 .eraseblocks = { {64 * 1024, 2048} },
18286 .block_erase = spi_block_erase_dc,
18287 }, {
18288 .eraseblocks = { {64 * 1024, 2048} },
18289 .block_erase = spi_block_erase_d8,
18290 }, {
18291 .eraseblocks = { {128 * 1024 * 1024, 1} },
18292 .block_erase = spi_block_erase_60,
18293 }, {
18294 .eraseblocks = { {128 * 1024 * 1024, 1} },
18295 .block_erase = spi_block_erase_c7,
18296 },
18297 },
18298 .reg_bits =
18299 {
18300 .qe = {STATUS2, 1, RW},
18301 .srp = {STATUS1, 7, RW},
18302 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018303 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18304 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018305 .cmp = {STATUS2, 6, RW},
18306 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18307 },
18308 .wp_write_cfg = spi_wp_write_cfg,
18309 .wp_read_cfg = spi_wp_read_cfg,
18310 .wp_get_ranges = spi_wp_get_available_ranges,
18311 .decode_range = decode_range_spi25,
18312 .printlock = spi_prettyprint_status_register_bp4_srwd,
18313 .unlock = spi_disable_blockprotect_bp4_srwd,
18314 .write = spi_chip_write_256,
18315 .read = spi_chip_read,
18316 .voltage = {2700, 3600},
18317 .prepare_access = spi_prepare_io,
18318 .finish_access = spi_finish_io,
18319 },
18320
18321 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018322 .vendor = "SST",
Idwer Volleringf3607d12014-05-07 15:25:04 +000018323 .name = "SST25LF020A",
18324 .bustype = BUS_SPI,
18325 .manufacture_id = SST_ID,
18326 .model_id = SST_SST25VF020_REMS,
18327 .total_size = 256,
18328 .page_size = 256,
18329 .feature_bits = FEATURE_WRSR_EWSR,
18330 .tested = TEST_OK_PREW,
18331 .probe = probe_spi_rems,
18332 .probe_timing = TIMING_ZERO,
18333 .block_erasers =
18334 {
18335 {
18336 .eraseblocks = { {4 * 1024, 64} },
18337 .block_erase = spi_block_erase_20,
18338 }, {
18339 .eraseblocks = { {32 * 1024, 8} },
18340 .block_erase = spi_block_erase_52,
18341 }, {
18342 .eraseblocks = { {256 * 1024, 1} },
18343 .block_erase = spi_block_erase_60,
18344 },
18345 },
18346 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
18347 .unlock = spi_disable_blockprotect,
18348 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18349 .read = spi_chip_read, /* Fast read (0x0B) supported */
18350 .voltage = {2700, 3600},
18351 },
18352
18353 {
18354 .vendor = "SST",
Zeus Castro33670ba2011-08-17 09:50:11 +000018355 .name = "SST25LF040A",
18356 .bustype = BUS_SPI,
18357 .manufacture_id = SST_ID,
18358 .model_id = SST_SST25VF040_REMS,
18359 .total_size = 512,
18360 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000018361 .feature_bits = FEATURE_WRSR_EWSR,
Uwe Hermann4335ec82011-09-07 20:20:25 +000018362 .tested = TEST_OK_PREW,
Zeus Castro33670ba2011-08-17 09:50:11 +000018363 .probe = probe_spi_res2,
18364 .probe_timing = TIMING_ZERO,
18365 .block_erasers =
18366 {
18367 {
18368 .eraseblocks = { {4 * 1024, 128} },
18369 .block_erase = spi_block_erase_20,
18370 }, {
18371 .eraseblocks = { {32 * 1024, 16} },
18372 .block_erase = spi_block_erase_52,
18373 }, {
18374 .eraseblocks = { {512 * 1024, 1} },
18375 .block_erase = spi_block_erase_60,
18376 },
18377 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018378 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000018379 .unlock = spi_disable_blockprotect,
18380 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18381 .read = spi_chip_read,
18382 .voltage = {3000, 3600},
18383 },
18384
18385 {
18386 .vendor = "SST",
Stefan Taunere34e3e82013-01-01 00:06:51 +000018387 .name = "SST25LF080(A)",
Zeus Castro33670ba2011-08-17 09:50:11 +000018388 .bustype = BUS_SPI,
18389 .manufacture_id = SST_ID,
18390 .model_id = SST_SST25VF080_REMS,
18391 .total_size = 1024,
18392 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000018393 .feature_bits = FEATURE_WRSR_EITHER,
Zeus Castro33670ba2011-08-17 09:50:11 +000018394 .tested = TEST_UNTESTED,
18395 .probe = probe_spi_res2,
18396 .probe_timing = TIMING_ZERO,
18397 .block_erasers =
18398 {
18399 {
18400 .eraseblocks = { {4 * 1024, 256} },
18401 .block_erase = spi_block_erase_20,
18402 }, {
18403 .eraseblocks = { {32 * 1024, 32} },
18404 .block_erase = spi_block_erase_52,
18405 }, {
18406 .eraseblocks = { {1024 * 1024, 1} },
18407 .block_erase = spi_block_erase_60,
18408 },
18409 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018410 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000018411 .unlock = spi_disable_blockprotect,
18412 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18413 .read = spi_chip_read,
18414 .voltage = {3000, 3600},
18415 },
18416
18417 {
18418 .vendor = "SST",
Stefan Tauner6697f712014-08-06 15:09:15 +000018419 .name = "SST25VF010(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018420 .bustype = BUS_SPI,
Mark Marshall90021f22010-12-03 14:48:11 +000018421 .manufacture_id = SST_ID,
18422 .model_id = SST_SST25VF010_REMS,
18423 .total_size = 128,
18424 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000018425 .feature_bits = FEATURE_WRSR_EWSR,
Mark Marshall90021f22010-12-03 14:48:11 +000018426 .tested = TEST_OK_PREW,
18427 .probe = probe_spi_rems,
18428 .probe_timing = TIMING_ZERO,
18429 .block_erasers =
18430 {
18431 {
18432 .eraseblocks = { {4 * 1024, 32} },
18433 .block_erase = spi_block_erase_20,
18434 }, {
18435 .eraseblocks = { {32 * 1024, 4} },
18436 .block_erase = spi_block_erase_52,
18437 }, {
Cory Henderson370f5822013-10-19 23:09:16 +000018438 .eraseblocks = { {32 * 1024, 4} },
Stefan Tauner6697f712014-08-06 15:09:15 +000018439 .block_erase = spi_block_erase_d8, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000018440 }, {
Mark Marshall90021f22010-12-03 14:48:11 +000018441 .eraseblocks = { {128 * 1024, 1} },
18442 .block_erase = spi_block_erase_60,
Cory Henderson370f5822013-10-19 23:09:16 +000018443 }, {
18444 .eraseblocks = { {128 * 1024, 1} },
Stefan Tauner6697f712014-08-06 15:09:15 +000018445 .block_erase = spi_block_erase_c7, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000018446 },
18447 },
18448 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
18449 .unlock = spi_disable_blockprotect,
18450 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
Stefan Tauner6697f712014-08-06 15:09:15 +000018451 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000018452 .voltage = {2700, 3600},
18453 },
18454
18455 {
18456 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018457 .name = "SST25VF016B",
18458 .bustype = BUS_SPI,
18459 .manufacture_id = SST_ID,
18460 .model_id = SST_SST25VF016B,
18461 .total_size = 2048,
18462 .page_size = 256,
18463 .feature_bits = FEATURE_WRSR_EITHER,
18464 .tested = TEST_OK_PREW,
18465 .probe = probe_spi_rdid,
18466 .probe_timing = TIMING_ZERO,
18467 .block_erasers =
18468 {
18469 {
18470 .eraseblocks = { {4 * 1024, 512} },
18471 .block_erase = spi_block_erase_20,
18472 }, {
18473 .eraseblocks = { {32 * 1024, 64} },
18474 .block_erase = spi_block_erase_52,
18475 }, {
18476 .eraseblocks = { {64 * 1024, 32} },
18477 .block_erase = spi_block_erase_d8,
18478 }, {
18479 .eraseblocks = { {2 * 1024 * 1024, 1} },
18480 .block_erase = spi_block_erase_60,
18481 }, {
18482 .eraseblocks = { {2 * 1024 * 1024, 1} },
18483 .block_erase = spi_block_erase_c7,
18484 },
18485 },
18486 .printlock = spi_prettyprint_status_register_sst25vf016,
18487 .unlock = spi_disable_blockprotect,
18488 .write = spi_aai_write,
18489 .read = spi_chip_read,
18490 .voltage = {2700, 3600},
18491 },
18492
18493 {
18494 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000018495 .name = "SST25VF020",
18496 .bustype = BUS_SPI,
18497 .manufacture_id = SST_ID,
18498 .model_id = SST_SST25VF020_REMS,
18499 .total_size = 256,
18500 .page_size = 256,
18501 .feature_bits = FEATURE_WRSR_EWSR,
18502 .tested = TEST_UNTESTED,
18503 .probe = probe_spi_rems,
18504 .probe_timing = TIMING_ZERO,
18505 .block_erasers =
18506 {
18507 {
18508 .eraseblocks = { {4 * 1024, 64} },
18509 .block_erase = spi_block_erase_20,
18510 }, {
18511 .eraseblocks = { {32 * 1024, 8} },
18512 .block_erase = spi_block_erase_52,
18513 }, {
18514 .eraseblocks = { {256 * 1024, 1} },
18515 .block_erase = spi_block_erase_60,
18516 },
18517 },
18518 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
18519 .unlock = spi_disable_blockprotect,
18520 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18521 .read = spi_chip_read, /* only */
18522 .voltage = {2700, 3600},
18523 },
18524
18525 {
18526 .vendor = "SST",
18527 .name = "SST25VF020B",
18528 .bustype = BUS_SPI,
18529 .manufacture_id = SST_ID,
18530 .model_id = SST_SST25VF020B,
18531 .total_size = 256,
18532 .page_size = 256,
18533 .feature_bits = FEATURE_WRSR_EWSR,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000018534 .tested = TEST_OK_PREW,
Cory Henderson370f5822013-10-19 23:09:16 +000018535 .probe = probe_spi_rdid,
18536 .probe_timing = TIMING_ZERO,
18537 .block_erasers =
18538 {
18539 {
18540 .eraseblocks = { {4 * 1024, 64} },
18541 .block_erase = spi_block_erase_20,
18542 }, {
18543 .eraseblocks = { {32 * 1024, 8} },
18544 .block_erase = spi_block_erase_52,
18545 }, {
18546 .eraseblocks = { {64 * 1024, 4} },
18547 .block_erase = spi_block_erase_d8,
18548 }, {
18549 .eraseblocks = { {256 * 1024, 1} },
18550 .block_erase = spi_block_erase_60,
18551 }, {
18552 .eraseblocks = { {256 * 1024, 1} },
18553 .block_erase = spi_block_erase_c7,
18554 },
18555 },
18556 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 and 2nd SR */
18557 .unlock = spi_disable_blockprotect, /* FIXME: 2nd SR */
18558 .write = spi_aai_write, /* AAI supported (0xAD) */
18559 .read = spi_chip_read, /* Fast read (0x0B) supported */
18560 .voltage = {2700, 3600},
18561 },
18562
18563 {
18564 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018565 .name = "SST25VF032B",
18566 .bustype = BUS_SPI,
18567 .manufacture_id = SST_ID,
18568 .model_id = SST_SST25VF032B,
18569 .total_size = 4096,
18570 .page_size = 256,
18571 .feature_bits = FEATURE_WRSR_EWSR,
18572 .tested = TEST_OK_PREW,
18573 .probe = probe_spi_rdid,
18574 .probe_timing = TIMING_ZERO,
18575 .block_erasers =
18576 {
18577 {
18578 .eraseblocks = { {4 * 1024, 1024} },
18579 .block_erase = spi_block_erase_20,
18580 }, {
18581 .eraseblocks = { {32 * 1024, 128} },
18582 .block_erase = spi_block_erase_52,
18583 }, {
18584 .eraseblocks = { {64 * 1024, 64} },
18585 .block_erase = spi_block_erase_d8,
18586 }, {
18587 .eraseblocks = { {4 * 1024 * 1024, 1} },
18588 .block_erase = spi_block_erase_60,
18589 }, {
18590 .eraseblocks = { {4 * 1024 * 1024, 1} },
18591 .block_erase = spi_block_erase_c7,
18592 },
18593 },
18594 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
18595 .unlock = spi_disable_blockprotect,
18596 .write = spi_aai_write,
18597 .read = spi_chip_read,
18598 .voltage = {2700, 3600},
18599 },
18600
18601 {
18602 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000018603 .name = "SST25VF040",
18604 .bustype = BUS_SPI,
18605 .manufacture_id = SST_ID,
18606 .model_id = SST_SST25VF040_REMS,
18607 .total_size = 512,
18608 .page_size = 256,
18609 .feature_bits = FEATURE_WRSR_EWSR,
18610 .tested = TEST_OK_PR,
18611 .probe = probe_spi_rems,
18612 .probe_timing = TIMING_ZERO,
18613 .block_erasers =
18614 {
18615 {
18616 .eraseblocks = { {4 * 1024, 128} },
18617 .block_erase = spi_block_erase_20,
18618 }, {
18619 .eraseblocks = { {32 * 1024, 16} },
18620 .block_erase = spi_block_erase_52,
18621 }, {
18622 .eraseblocks = { {512 * 1024, 1} },
18623 .block_erase = spi_block_erase_60,
Mark Marshall90021f22010-12-03 14:48:11 +000018624 },
18625 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018626 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Mark Marshall90021f22010-12-03 14:48:11 +000018627 .unlock = spi_disable_blockprotect,
Cory Henderson370f5822013-10-19 23:09:16 +000018628 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18629 .read = spi_chip_read,
18630 .voltage = {2700, 3600},
18631 },
18632
18633 {
18634 .vendor = "SST",
18635 .name = "SST25VF040B",
18636 .bustype = BUS_SPI,
18637 .manufacture_id = SST_ID,
18638 .model_id = SST_SST25VF040B,
18639 .total_size = 512,
18640 .page_size = 256,
18641 .feature_bits = FEATURE_WRSR_EWSR,
18642 .tested = TEST_OK_PREW,
18643 .probe = probe_spi_rdid,
18644 .probe_timing = TIMING_ZERO,
18645 .block_erasers =
18646 {
18647 {
18648 .eraseblocks = { {4 * 1024, 128} },
18649 .block_erase = spi_block_erase_20,
18650 }, {
18651 .eraseblocks = { {32 * 1024, 16} },
18652 .block_erase = spi_block_erase_52,
18653 }, {
18654 .eraseblocks = { {64 * 1024, 8} },
18655 .block_erase = spi_block_erase_d8,
18656 }, {
18657 .eraseblocks = { {512 * 1024, 1} },
18658 .block_erase = spi_block_erase_60,
18659 }, {
18660 .eraseblocks = { {512 * 1024, 1} },
18661 .block_erase = spi_block_erase_c7,
18662 },
18663 },
18664 .printlock = spi_prettyprint_status_register_sst25vf040b,
18665 .unlock = spi_disable_blockprotect,
18666 .write = spi_aai_write, /* AAI supported (0xAD) */
18667 .read = spi_chip_read, /* Fast read (0x0B) supported */
18668 .voltage = {2700, 3600},
18669 },
18670
18671 {
18672 .vendor = "SST",
18673 .name = "SST25VF040B.REMS",
18674 .bustype = BUS_SPI,
18675 .manufacture_id = SST_ID,
18676 .model_id = SST_SST25VF040B_REMS,
18677 .total_size = 512,
18678 .page_size = 256,
18679 .feature_bits = FEATURE_WRSR_EWSR,
18680 .tested = TEST_OK_PREW,
18681 .probe = probe_spi_rems,
18682 .probe_timing = TIMING_ZERO,
18683 .block_erasers =
18684 {
18685 {
18686 .eraseblocks = { {4 * 1024, 128} },
18687 .block_erase = spi_block_erase_20,
18688 }, {
18689 .eraseblocks = { {32 * 1024, 16} },
18690 .block_erase = spi_block_erase_52,
18691 }, {
18692 .eraseblocks = { {64 * 1024, 8} },
18693 .block_erase = spi_block_erase_d8,
18694 }, {
18695 .eraseblocks = { {512 * 1024, 1} },
18696 .block_erase = spi_block_erase_60,
18697 }, {
18698 .eraseblocks = { {512 * 1024, 1} },
18699 .block_erase = spi_block_erase_c7,
18700 },
18701 },
18702 .printlock = spi_prettyprint_status_register_sst25vf040b,
18703 .unlock = spi_disable_blockprotect,
18704 .write = spi_aai_write,
18705 .read = spi_chip_read,
18706 .voltage = {2700, 3600},
18707 },
18708
18709 {
18710 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018711 .name = "SST25VF064C",
Ben Gardnerbcf61092015-11-22 02:23:31 +000018712 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018713 .manufacture_id = SST_ID,
18714 .model_id = SST_SST25VF064C,
18715 .total_size = 8192,
Ben Gardnerbcf61092015-11-22 02:23:31 +000018716 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018717 .feature_bits = FEATURE_WRSR_EWSR,
Ben Gardnerbcf61092015-11-22 02:23:31 +000018718 .tested = TEST_OK_PREW,
18719 .probe = probe_spi_rdid,
18720 .probe_timing = TIMING_ZERO,
18721 .block_erasers =
18722 {
18723 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018724 .eraseblocks = { {4 * 1024, 2048} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000018725 .block_erase = spi_block_erase_20,
18726 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018727 .eraseblocks = { {32 * 1024, 256} },
18728 .block_erase = spi_block_erase_52,
18729 }, {
18730 .eraseblocks = { {64 * 1024, 128} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000018731 .block_erase = spi_block_erase_d8,
18732 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018733 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000018734 .block_erase = spi_block_erase_60,
18735 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018736 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000018737 .block_erase = spi_block_erase_c7,
18738 },
18739 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018740 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
18741 .unlock = spi_disable_blockprotect,
Ben Gardnerbcf61092015-11-22 02:23:31 +000018742 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018743 .read = spi_chip_read,
18744 .voltage = {2700, 3600},
Ben Gardnerbcf61092015-11-22 02:23:31 +000018745 },
18746
18747 {
18748 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000018749 .name = "SST25VF080B",
18750 .bustype = BUS_SPI,
18751 .manufacture_id = SST_ID,
18752 .model_id = SST_SST25VF080B,
18753 .total_size = 1024,
18754 .page_size = 256,
18755 .feature_bits = FEATURE_WRSR_EWSR,
18756 .tested = TEST_OK_PREW,
18757 .probe = probe_spi_rdid,
18758 .probe_timing = TIMING_ZERO,
18759 .block_erasers =
18760 {
18761 {
18762 .eraseblocks = { {4 * 1024, 256} },
18763 .block_erase = spi_block_erase_20,
18764 }, {
18765 .eraseblocks = { {32 * 1024, 32} },
18766 .block_erase = spi_block_erase_52,
18767 }, {
18768 .eraseblocks = { {64 * 1024, 16} },
18769 .block_erase = spi_block_erase_d8,
18770 }, {
18771 .eraseblocks = { {1024 * 1024, 1} },
18772 .block_erase = spi_block_erase_60,
18773 }, {
18774 .eraseblocks = { {1024 * 1024, 1} },
18775 .block_erase = spi_block_erase_c7,
18776 },
18777 },
18778 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
18779 .unlock = spi_disable_blockprotect,
18780 .write = spi_aai_write,
Mark Marshall90021f22010-12-03 14:48:11 +000018781 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +000018782 .voltage = {2700, 3600},
Mark Marshall90021f22010-12-03 14:48:11 +000018783 },
18784
18785 {
18786 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018787 .name = "SST25VF512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018788 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018789 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018790 .model_id = SST_SST25VF512_REMS,
18791 .total_size = 64,
18792 .page_size = 256,
18793 .feature_bits = FEATURE_WRSR_EWSR,
18794 .tested = TEST_OK_PREW,
18795 .probe = probe_spi_rems,
18796 .probe_timing = TIMING_ZERO,
18797 .block_erasers =
18798 {
18799 {
18800 .eraseblocks = { {4 * 1024, 16} },
18801 .block_erase = spi_block_erase_20,
18802 }, {
18803 .eraseblocks = { {32 * 1024, 2} },
18804 .block_erase = spi_block_erase_52,
18805 }, {
18806 .eraseblocks = { {32 * 1024, 2} },
18807 .block_erase = spi_block_erase_d8, /* Supported by SST25VF512A only */
18808 }, {
18809 .eraseblocks = { {64 * 1024, 1} },
18810 .block_erase = spi_block_erase_60,
18811 }, {
18812 .eraseblocks = { {64 * 1024, 1} },
18813 .block_erase = spi_block_erase_c7, /* Supported by SST25VF512A only */
18814 },
18815 },
18816 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
18817 .unlock = spi_disable_blockprotect,
18818 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18819 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF512A only */
18820 .voltage = {2700, 3600},
18821 },
18822
18823 {
18824 .vendor = "SST",
18825 .name = "SST25WF010",
18826 .bustype = BUS_SPI,
18827 .manufacture_id = SST_ID,
18828 .model_id = SST_SST25WF010,
18829 .total_size = 128,
18830 .page_size = 256,
18831 .feature_bits = FEATURE_WRSR_EITHER,
18832 .tested = TEST_UNTESTED,
18833 .probe = probe_spi_rdid,
18834 .probe_timing = TIMING_ZERO,
18835 .block_erasers =
18836 {
18837 {
18838 .eraseblocks = { {4 * 1024, 32} },
18839 .block_erase = spi_block_erase_20,
18840 }, {
18841 .eraseblocks = { {32 * 1024, 4} },
18842 .block_erase = spi_block_erase_52,
18843 }, {
18844 .eraseblocks = { {1024 * 128, 1} },
18845 .block_erase = spi_block_erase_60,
18846 }, {
18847 .eraseblocks = { {1024 * 128, 1} },
18848 .block_erase = spi_block_erase_c7,
18849 },
18850 },
18851 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
18852 .unlock = spi_disable_blockprotect_bp2_srwd,
18853 .write = spi_aai_write,
18854 .read = spi_chip_read, /* Fast read (0x0B) supported */
18855 .voltage = {1650, 1950},
18856 },
18857
18858 {
18859 .vendor = "SST",
18860 .name = "SST25WF020",
18861 .bustype = BUS_SPI,
18862 .manufacture_id = SST_ID,
18863 .model_id = SST_SST25WF020,
18864 .total_size = 256,
18865 .page_size = 256,
18866 .feature_bits = FEATURE_WRSR_EITHER,
18867 .tested = TEST_UNTESTED,
18868 .probe = probe_spi_rdid,
18869 .probe_timing = TIMING_ZERO,
18870 .block_erasers =
18871 {
18872 {
18873 .eraseblocks = { {4 * 1024, 64} },
18874 .block_erase = spi_block_erase_20,
18875 }, {
18876 .eraseblocks = { {32 * 1024, 8} },
18877 .block_erase = spi_block_erase_52,
18878 }, {
18879 .eraseblocks = { {64 * 1024, 4} },
18880 .block_erase = spi_block_erase_d8,
18881 }, {
18882 .eraseblocks = { {1024 * 256, 1} },
18883 .block_erase = spi_block_erase_60,
18884 }, {
18885 .eraseblocks = { {1024 * 256, 1} },
18886 .block_erase = spi_block_erase_c7,
18887 },
18888 },
18889 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
18890 .unlock = spi_disable_blockprotect_bp2_srwd,
18891 .write = spi_aai_write,
18892 .read = spi_chip_read, /* Fast read (0x0B) supported */
18893 .voltage = {1650, 1950},
18894 },
18895
18896 {
18897 .vendor = "SST",
18898 .name = "SST25WF020A",
18899 .bustype = BUS_SPI,
18900 .manufacture_id = SANYO_ID, /* See flashchips.h */
18901 .model_id = SST_SST25WF020A,
18902 .total_size = 256,
18903 .page_size = 256,
18904 .feature_bits = FEATURE_WRSR_WREN,
18905 .tested = TEST_UNTESTED,
18906 .probe = probe_spi_rdid,
18907 .probe_timing = TIMING_ZERO,
18908 .block_erasers =
18909 {
18910 {
18911 .eraseblocks = { {4 * 1024, 64} },
18912 .block_erase = spi_block_erase_20,
18913 }, {
18914 .eraseblocks = { {64 * 1024, 4} },
18915 .block_erase = spi_block_erase_d8,
18916 }, {
18917 .eraseblocks = { {256 * 1024, 1} },
18918 .block_erase = spi_block_erase_60,
18919 }, {
18920 .eraseblocks = { {256 * 1024, 1} },
18921 .block_erase = spi_block_erase_c7,
18922 },
18923 },
18924 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
18925 .unlock = spi_disable_blockprotect_bp2_srwd,
18926 .write = spi_chip_write_256,
18927 .read = spi_chip_read, /* Fast read (0x0B) supported */
18928 .voltage = {1650, 1950},
18929 },
18930
18931 {
18932 .vendor = "SST",
18933 .name = "SST25WF040",
18934 .bustype = BUS_SPI,
18935 .manufacture_id = SST_ID,
18936 .model_id = SST_SST25WF040,
18937 .total_size = 512,
18938 .page_size = 256,
18939 .feature_bits = FEATURE_WRSR_EITHER,
18940 .tested = TEST_UNTESTED,
18941 .probe = probe_spi_rdid,
18942 .probe_timing = TIMING_ZERO,
18943 .block_erasers =
18944 {
18945 {
18946 .eraseblocks = { {4 * 1024, 128} },
18947 .block_erase = spi_block_erase_20,
18948 }, {
18949 .eraseblocks = { {32 * 1024, 16} },
18950 .block_erase = spi_block_erase_52,
18951 }, {
18952 .eraseblocks = { {64 * 1024, 8} },
18953 .block_erase = spi_block_erase_d8,
18954 }, {
18955 .eraseblocks = { {1024 * 512, 1} },
18956 .block_erase = spi_block_erase_60,
18957 }, {
18958 .eraseblocks = { {1024 * 512, 1} },
18959 .block_erase = spi_block_erase_c7,
18960 },
18961 },
18962 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
18963 .unlock = spi_disable_blockprotect_bp2_srwd,
18964 .write = spi_aai_write,
18965 .read = spi_chip_read, /* Fast read (0x0B) supported */
18966 .voltage = {1650, 1950},
18967 },
18968
18969 {
18970 .vendor = "SST",
18971 .name = "SST25WF040B",
18972 .bustype = BUS_SPI,
18973 .manufacture_id = SANYO_ID, /* See flashchips.h */
18974 .model_id = SST_SST25WF040B,
18975 .total_size = 512,
18976 .page_size = 256,
18977 .feature_bits = FEATURE_WRSR_WREN,
18978 .tested = TEST_UNTESTED,
18979 .probe = probe_spi_rdid,
18980 .probe_timing = TIMING_ZERO,
18981 .block_erasers =
18982 {
18983 {
18984 .eraseblocks = { {4 * 1024, 128} },
18985 .block_erase = spi_block_erase_20,
18986 }, {
18987 .eraseblocks = { {64 * 1024, 8} },
18988 .block_erase = spi_block_erase_d8,
18989 }, {
18990 .eraseblocks = { {512 * 1024, 1} },
18991 .block_erase = spi_block_erase_60,
18992 }, {
18993 .eraseblocks = { {512 * 1024, 1} },
18994 .block_erase = spi_block_erase_c7,
18995 },
18996 },
18997 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
18998 .unlock = spi_disable_blockprotect_bp2_srwd,
18999 .write = spi_chip_write_256,
19000 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
19001 .voltage = {1650, 1950},
19002 },
19003
19004 {
19005 .vendor = "SST",
19006 .name = "SST25WF080",
19007 .bustype = BUS_SPI,
19008 .manufacture_id = SST_ID,
19009 .model_id = SST_SST25WF080,
19010 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019011 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000019012 .feature_bits = FEATURE_WRSR_EITHER,
Mark Marshall90021f22010-12-03 14:48:11 +000019013 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019014 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000019015 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019016 .block_erasers =
19017 {
19018 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019019 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019020 .block_erase = spi_block_erase_20,
19021 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019022 .eraseblocks = { {32 * 1024, 32} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019023 .block_erase = spi_block_erase_52,
19024 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019025 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019026 .block_erase = spi_block_erase_d8,
19027 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019028 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019029 .block_erase = spi_block_erase_60,
19030 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019031 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019032 .block_erase = spi_block_erase_c7,
19033 },
19034 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019035 .printlock = spi_prettyprint_status_register_sst25, /* *does* have a BP3 but it is useless */
19036 .unlock = spi_disable_blockprotect_bp3_srwd,
Joshua Roys87955bf2011-08-01 18:39:28 +000019037 .write = spi_aai_write,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019038 .read = spi_chip_read, /* Fast read (0x0B) supported */
19039 .voltage = {1650, 1950},
FENG yu ningff692fb2008-12-08 18:15:10 +000019040 },
19041
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019042 {
19043 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019044 .name = "SST25WF080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019045 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019046 .manufacture_id = SANYO_ID, /* See flashchips.h */
19047 .model_id = SST_SST25WF080B,
19048 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019049 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019050 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerfcf6a8c2011-05-18 01:32:00 +000019051 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019052 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000019053 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019054 .block_erasers =
19055 {
19056 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019057 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019058 .block_erase = spi_block_erase_20,
19059 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019060 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019061 .block_erase = spi_block_erase_d8,
19062 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019063 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019064 .block_erase = spi_block_erase_60,
19065 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019066 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019067 .block_erase = spi_block_erase_c7,
19068 },
19069 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019070 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19071 .unlock = spi_disable_blockprotect_bp2_srwd,
Helge Wagner1db7a442010-10-05 22:29:08 +000019072 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019073 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
19074 .voltage = {1650, 1950},
19075 },
19076
19077 {
19078 .vendor = "SST",
19079 .name = "SST25WF512",
19080 .bustype = BUS_SPI,
19081 .manufacture_id = SST_ID,
19082 .model_id = SST_SST25WF512,
19083 .total_size = 64,
19084 .page_size = 256,
19085 .feature_bits = FEATURE_WRSR_EITHER,
19086 .tested = TEST_UNTESTED,
19087 .probe = probe_spi_rdid,
19088 .probe_timing = TIMING_ZERO,
19089 .block_erasers =
19090 {
19091 {
19092 .eraseblocks = { {4 * 1024, 16} },
19093 .block_erase = spi_block_erase_20,
19094 }, {
19095 .eraseblocks = { {32 * 1024, 2} },
19096 .block_erase = spi_block_erase_52,
19097 }, {
19098 .eraseblocks = { {1024 * 64, 1} },
19099 .block_erase = spi_block_erase_60,
19100 }, {
19101 .eraseblocks = { {1024 * 64, 1} },
19102 .block_erase = spi_block_erase_c7,
19103 },
19104 },
19105 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
19106 .unlock = spi_disable_blockprotect_bp2_srwd,
19107 .write = spi_aai_write,
19108 .read = spi_chip_read, /* Fast read (0x0B) supported */
19109 .voltage = {1650, 1950},
Ed Swierk86f4e6d2010-07-21 15:02:22 +000019110 },
19111
19112 {
19113 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010019114 .name = "SST26VF016",
19115 .bustype = BUS_SPI,
19116 .manufacture_id = SST_ID,
19117 .model_id = SST_SST26VF016,
19118 .total_size = 2048,
19119 .page_size = 256,
19120 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19121 .tested = TEST_UNTESTED,
19122 .probe = probe_spi_rdid,
19123 .probe_timing = TIMING_ZERO,
19124 .block_erasers =
19125 {
19126 {
19127 .eraseblocks = { {4 * 1024, 512} },
19128 .block_erase = spi_block_erase_20,
19129 }, {
19130 .eraseblocks = {
19131 {8 * 1024, 4},
19132 {32 * 1024, 1},
19133 {64 * 1024, 30},
19134 {32 * 1024, 1},
19135 {8 * 1024, 4},
19136 },
19137 .block_erase = spi_block_erase_d8,
19138 }, {
19139 .eraseblocks = { {2 * 1024 * 1024, 1} },
19140 .block_erase = spi_block_erase_c7,
19141 },
19142 },
19143 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19144 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19145 .write = spi_chip_write_256, /* Multi I/O supported */
19146 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19147 .voltage = {2700, 3600},
19148 },
19149
19150 {
19151 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070019152 .name = "SST26VF016B(A)",
19153 .bustype = BUS_SPI,
19154 .manufacture_id = SST_ID,
19155 .model_id = SST_SST26VF016B,
19156 .total_size = 2048,
19157 .page_size = 256,
19158 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19159 .tested = TEST_OK_PREW,
19160 .probe = probe_spi_rdid,
19161 .probe_timing = TIMING_ZERO,
19162 .block_erasers =
19163 {
19164 {
19165 .eraseblocks = { {4 * 1024, 512} },
19166 .block_erase = spi_block_erase_20,
19167 }, {
19168 .eraseblocks = {
19169 {8 * 1024, 4},
19170 {32 * 1024, 1},
19171 {64 * 1024, 30},
19172 {32 * 1024, 1},
19173 {8 * 1024, 4},
19174 },
19175 .block_erase = spi_block_erase_d8,
19176 }, {
19177 .eraseblocks = { {2 * 1024 * 1024, 1} },
19178 .block_erase = spi_block_erase_c7,
19179 },
19180 },
19181 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19182 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19183 .write = spi_chip_write_256, /* Multi I/O supported */
19184 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19185 .voltage = {2700, 3600},
19186 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100019187
Wei Hu25584de2018-04-30 14:02:08 -070019188 {
19189 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010019190 .name = "SST26VF032",
19191 .bustype = BUS_SPI,
19192 .manufacture_id = SST_ID,
19193 .model_id = SST_SST26VF032,
19194 .total_size = 4096,
19195 .page_size = 256,
19196 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19197 .tested = TEST_UNTESTED,
19198 .probe = probe_spi_rdid,
19199 .probe_timing = TIMING_ZERO,
19200 .block_erasers =
19201 {
19202 {
19203 .eraseblocks = { {4 * 1024, 1024} },
19204 .block_erase = spi_block_erase_20,
19205 }, {
19206 .eraseblocks = {
19207 {8 * 1024, 4},
19208 {32 * 1024, 1},
19209 {64 * 1024, 62},
19210 {32 * 1024, 1},
19211 {8 * 1024, 4},
19212 },
19213 .block_erase = spi_block_erase_d8,
19214 }, {
19215 .eraseblocks = { {4 * 1024 * 1024, 1} },
19216 .block_erase = spi_block_erase_c7,
19217 },
19218 },
19219 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19220 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19221 .write = spi_chip_write_256, /* Multi I/O supported */
19222 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19223 .voltage = {2700, 3600},
19224 },
19225
19226 {
19227 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070019228 .name = "SST26VF032B(A)",
19229 .bustype = BUS_SPI,
19230 .manufacture_id = SST_ID,
19231 .model_id = SST_SST26VF032B,
19232 .total_size = 4096,
19233 .page_size = 256,
19234 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19235 .tested = TEST_UNTESTED,
19236 .probe = probe_spi_rdid,
19237 .probe_timing = TIMING_ZERO,
19238 .block_erasers =
19239 {
19240 {
19241 .eraseblocks = { {4 * 1024, 1024} },
19242 .block_erase = spi_block_erase_20,
19243 }, {
19244 .eraseblocks = {
19245 {8 * 1024, 4},
19246 {32 * 1024, 1},
19247 {64 * 1024, 62},
19248 {32 * 1024, 1},
19249 {8 * 1024, 4},
19250 },
19251 .block_erase = spi_block_erase_d8,
19252 }, {
19253 .eraseblocks = { {4 * 1024 * 1024, 1} },
19254 .block_erase = spi_block_erase_c7,
19255 },
19256 },
19257 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19258 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19259 .write = spi_chip_write_256, /* Multi I/O supported */
19260 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19261 .voltage = {2700, 3600},
19262 },
19263
Wei Hu25584de2018-04-30 14:02:08 -070019264 {
19265 .vendor = "SST",
19266 .name = "SST26VF064B(A)",
19267 .bustype = BUS_SPI,
19268 .manufacture_id = SST_ID,
19269 .model_id = SST_SST26VF064B,
19270 .total_size = 8192,
19271 .page_size = 256,
19272 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19273 .tested = TEST_OK_PREW,
19274 .probe = probe_spi_rdid,
19275 .probe_timing = TIMING_ZERO,
19276 .block_erasers =
19277 {
19278 {
19279 .eraseblocks = { {4 * 1024, 2048} },
19280 .block_erase = spi_block_erase_20,
19281 }, {
19282 .eraseblocks = {
19283 {8 * 1024, 4},
19284 {32 * 1024, 1},
19285 {64 * 1024, 126},
19286 {32 * 1024, 1},
19287 {8 * 1024, 4},
19288 },
19289 .block_erase = spi_block_erase_d8,
19290 }, {
19291 .eraseblocks = { {8 * 1024 * 1024, 1} },
19292 .block_erase = spi_block_erase_c7,
19293 },
19294 },
19295 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19296 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19297 .write = spi_chip_write_256, /* Multi I/O supported */
19298 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19299 .voltage = {2700, 3600},
19300 },
19301
19302 {
19303 .vendor = "SST",
Nico Huberd4e41d32024-10-18 14:59:54 +020019304 .name = "SST26VF080A",
19305 .bustype = BUS_SPI,
19306 .manufacture_id = SST_ID,
19307 .model_id = SST_SST26VF080A,
19308 .total_size = 1024,
19309 .page_size = 256,
19310 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19311 .tested = TEST_UNTESTED,
19312 .probe = probe_spi_rdid,
19313 .probe_timing = TIMING_ZERO,
19314 .block_erasers =
19315 {
19316 {
19317 .eraseblocks = { {4 * 1024, 256} },
19318 .block_erase = spi_block_erase_20,
19319 }, {
19320 .eraseblocks = { {32 * 1024, 32} },
19321 .block_erase = spi_block_erase_52,
19322 }, {
19323 .eraseblocks = { {64 * 1024, 16} },
19324 .block_erase = spi_block_erase_d8,
19325 }, {
19326 .eraseblocks = { {1024 * 1024, 1} },
19327 .block_erase = spi_block_erase_60,
19328 }, {
19329 .eraseblocks = { {1024 * 1024, 1} },
19330 .block_erase = spi_block_erase_c7,
19331 },
19332 },
19333 .printlock = spi_prettyprint_status_register_bp3_srwd,
19334 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19335 .write = spi_chip_write_256, /* Multi I/O supported */
19336 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19337 .voltage = {2700, 3600},
19338 },
19339
19340 {
19341 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019342 .name = "SST28SF040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019343 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019344 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019345 .model_id = SST_SST28SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019346 .total_size = 512,
19347 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000019348 .feature_bits = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019349 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019350 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000019351 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst28sf040.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019352 .block_erasers =
19353 {
19354 {
19355 .eraseblocks = { {128, 4096} },
19356 .block_erase = erase_sector_28sf040,
19357 }, {
19358 .eraseblocks = { {512 * 1024, 1} },
19359 .block_erase = erase_chip_28sf040,
19360 }
19361 },
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000019362 .unlock = unprotect_28sf040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019363 .write = write_28sf040,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019364 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019365 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019366 .prepare_access = prepare_memory_access,
19367 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019368 },
19369
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019370 {
19371 .vendor = "SST",
19372 .name = "SST29EE010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019373 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019374 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019375 .model_id = SST_SST29EE010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019376 .total_size = 128,
19377 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000019378 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000019379 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019380 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000019381 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019382 .block_erasers =
19383 {
19384 {
19385 .eraseblocks = { {128 * 1024, 1} },
19386 .block_erase = erase_chip_block_jedec,
19387 }
19388 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019389 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019390 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019391 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019392 .prepare_access = prepare_memory_access,
19393 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019394 },
19395
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019396 {
19397 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019398 .name = "SST29EE020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019399 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019400 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019401 .model_id = SST_SST29EE020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019402 .total_size = 256,
19403 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000019404 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000019405 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019406 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000019407 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019408 .block_erasers =
19409 {
19410 {
19411 .eraseblocks = { {256 * 1024, 1} },
19412 .block_erase = erase_chip_block_jedec,
19413 }
19414 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019415 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019416 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019417 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019418 .prepare_access = prepare_memory_access,
19419 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019420 },
19421
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019422 {
19423 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019424 .name = "SST29LE010",
19425 .bustype = BUS_PARALLEL,
19426 .manufacture_id = SST_ID,
19427 .model_id = SST_SST29LE010,
19428 .total_size = 128,
19429 .page_size = 128,
19430 .feature_bits = FEATURE_LONG_RESET,
19431 .tested = TEST_UNTESTED,
19432 .probe = probe_jedec,
19433 .probe_timing = 10,
19434 .block_erasers =
19435 {
19436 {
19437 .eraseblocks = { {128 * 1024, 1} },
19438 .block_erase = erase_chip_block_jedec,
19439 }
19440 },
19441 .write = write_jedec,
19442 .read = read_memmapped,
19443 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019444 .prepare_access = prepare_memory_access,
19445 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019446 },
19447
19448 {
19449 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019450 .name = "SST29LE020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019451 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019452 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019453 .model_id = SST_SST29LE020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019454 .total_size = 256,
19455 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000019456 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000019457 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019458 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000019459 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019460 .block_erasers =
19461 {
19462 {
19463 .eraseblocks = { {256 * 1024, 1} },
19464 .block_erase = erase_chip_block_jedec,
19465 }
19466 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019467 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019468 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019469 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019470 .prepare_access = prepare_memory_access,
19471 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019472 },
19473
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019474 {
19475 .vendor = "SST",
19476 .name = "SST39SF010A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019477 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019478 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019479 .model_id = SST_SST39SF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019480 .total_size = 128,
19481 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019482 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000019483 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019484 .probe = probe_jedec,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000019485 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019486 .block_erasers =
19487 {
19488 {
19489 .eraseblocks = { {4 * 1024, 32} },
19490 .block_erase = erase_sector_jedec,
19491 }, {
19492 .eraseblocks = { {128 * 1024, 1} },
19493 .block_erase = erase_chip_block_jedec,
19494 }
19495 },
Sean Nelson35727f72010-01-28 23:55:12 +000019496 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019497 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019498 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019499 .prepare_access = prepare_memory_access,
19500 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019501 },
19502
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019503 {
19504 .vendor = "SST",
19505 .name = "SST39SF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019506 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019507 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019508 .model_id = SST_SST39SF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019509 .total_size = 256,
19510 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019511 .feature_bits = FEATURE_EITHER_RESET,
Uwe Hermann19f46f22011-06-18 22:56:14 +000019512 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019513 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019514 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019515 .block_erasers =
19516 {
19517 {
19518 .eraseblocks = { {4 * 1024, 64} },
19519 .block_erase = erase_sector_jedec,
19520 }, {
19521 .eraseblocks = { {256 * 1024, 1} },
19522 .block_erase = erase_chip_block_jedec,
19523 }
19524 },
Sean Nelson35727f72010-01-28 23:55:12 +000019525 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019526 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019527 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019528 .prepare_access = prepare_memory_access,
19529 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019530 },
19531
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019532 {
19533 .vendor = "SST",
19534 .name = "SST39SF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019535 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019536 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019537 .model_id = SST_SST39SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019538 .total_size = 512,
19539 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019540 .feature_bits = FEATURE_EITHER_RESET,
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000019541 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019542 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019543 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019544 .block_erasers =
19545 {
19546 {
19547 .eraseblocks = { {4 * 1024, 128} },
19548 .block_erase = erase_sector_jedec,
19549 }, {
19550 .eraseblocks = { {512 * 1024, 1} },
19551 .block_erase = erase_chip_block_jedec,
19552 }
19553 },
Sean Nelson35727f72010-01-28 23:55:12 +000019554 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019555 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019556 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019557 .prepare_access = prepare_memory_access,
19558 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019559 },
19560
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019561 {
19562 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019563 .name = "SST39SF512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019564 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019565 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019566 .model_id = SST_SST39SF512,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019567 .total_size = 64,
19568 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019569 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd7d423b2012-10-20 09:13:16 +000019570 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019571 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019572 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019573 .block_erasers =
19574 {
19575 {
19576 .eraseblocks = { {4 * 1024, 16} },
19577 .block_erase = erase_sector_jedec,
19578 }, {
19579 .eraseblocks = { {64 * 1024, 1} },
19580 .block_erase = erase_chip_block_jedec,
19581 }
19582 },
Sean Nelson35727f72010-01-28 23:55:12 +000019583 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019584 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019585 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019586 .prepare_access = prepare_memory_access,
19587 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019588 },
19589
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019590 {
19591 .vendor = "SST",
19592 .name = "SST39VF010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019593 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019594 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019595 .model_id = SST_SST39VF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019596 .total_size = 128,
19597 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019598 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd94d25d2012-07-28 03:17:15 +000019599 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019600 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019601 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019602 .block_erasers =
19603 {
19604 {
19605 .eraseblocks = { {4 * 1024, 32} },
19606 .block_erase = erase_sector_jedec,
19607 }, {
19608 .eraseblocks = { {128 * 1024, 1} },
19609 .block_erase = erase_chip_block_jedec,
19610 }
19611 },
Sean Nelson35727f72010-01-28 23:55:12 +000019612 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019613 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019614 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019615 .prepare_access = prepare_memory_access,
19616 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019617 },
19618
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019619 {
19620 .vendor = "SST",
19621 .name = "SST39VF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019622 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019623 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019624 .model_id = SST_SST39VF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019625 .total_size = 256,
19626 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019627 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner5c316f92015-02-08 21:57:52 +000019628 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019629 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019630 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019631 .block_erasers =
19632 {
19633 {
19634 .eraseblocks = { {4 * 1024, 64} },
19635 .block_erase = erase_sector_jedec,
19636 }, {
19637 .eraseblocks = { {256 * 1024, 1} },
19638 .block_erase = erase_chip_block_jedec,
19639 }
19640 },
Sean Nelson35727f72010-01-28 23:55:12 +000019641 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019642 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019643 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019644 .prepare_access = prepare_memory_access,
19645 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019646 },
19647
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019648 {
19649 .vendor = "SST",
19650 .name = "SST39VF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019651 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019652 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019653 .model_id = SST_SST39VF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019654 .total_size = 512,
19655 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019656 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000019657 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019658 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019659 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019660 .block_erasers =
19661 {
19662 {
19663 .eraseblocks = { {4 * 1024, 128} },
19664 .block_erase = erase_sector_jedec,
19665 }, {
19666 .eraseblocks = { {512 * 1024, 1} },
19667 .block_erase = erase_chip_block_jedec,
19668 }
19669 },
Sean Nelson35727f72010-01-28 23:55:12 +000019670 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019671 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019672 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019673 .prepare_access = prepare_memory_access,
19674 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger90eff152008-12-08 23:51:45 +000019675 },
FENG yu ningff692fb2008-12-08 18:15:10 +000019676
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019677 {
19678 .vendor = "SST",
Peter Stuge8440cc02009-01-25 23:55:12 +000019679 .name = "SST39VF080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019680 .bustype = BUS_PARALLEL,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000019681 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019682 .model_id = SST_SST39VF080,
Peter Stuge8440cc02009-01-25 23:55:12 +000019683 .total_size = 1024,
19684 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019685 .feature_bits = FEATURE_EITHER_RESET,
Peter Stuge8440cc02009-01-25 23:55:12 +000019686 .tested = TEST_UNTESTED,
19687 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019688 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019689 .block_erasers =
19690 {
19691 {
19692 .eraseblocks = { {4 * 1024, 256} },
19693 .block_erase = erase_sector_jedec,
19694 }, {
19695 .eraseblocks = { {64 * 1024, 16} },
19696 .block_erase = erase_block_jedec,
19697 }, {
19698 .eraseblocks = { {1024 * 1024, 1} },
19699 .block_erase = erase_chip_block_jedec,
19700 }
19701 },
Sean Nelson35727f72010-01-28 23:55:12 +000019702 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019703 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019704 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019705 .prepare_access = prepare_memory_access,
19706 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +000019707 },
19708
19709 {
19710 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019711 .name = "SST39VF512",
19712 .bustype = BUS_PARALLEL,
19713 .manufacture_id = SST_ID,
19714 .model_id = SST_SST39VF512,
19715 .total_size = 64,
19716 .page_size = 4096,
19717 .feature_bits = FEATURE_EITHER_RESET,
19718 .tested = TEST_OK_PREW,
19719 .probe = probe_jedec,
19720 .probe_timing = 1, /* 150 ns */
19721 .block_erasers =
19722 {
19723 {
19724 .eraseblocks = { {4 * 1024, 16} },
19725 .block_erase = erase_sector_jedec,
19726 }, {
19727 .eraseblocks = { {64 * 1024, 1} },
19728 .block_erase = erase_chip_block_jedec,
19729 }
19730 },
19731 .write = write_jedec_1,
19732 .read = read_memmapped,
19733 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019734 .prepare_access = prepare_memory_access,
19735 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019736 },
19737
19738 {
19739 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019740 .name = "SST49LF002A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019741 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019742 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019743 .model_id = SST_SST49LF002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019744 .total_size = 256,
19745 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010019746 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000019747 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019748 .probe = probe_jedec,
19749 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019750 .block_erasers =
19751 {
19752 {
19753 .eraseblocks = { {4 * 1024, 64} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019754 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019755 }, {
19756 .eraseblocks = { {16 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019757 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019758 }, {
19759 .eraseblocks = { {256 * 1024, 1} },
19760 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
19761 }
19762 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019763 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019764 .unlock = unlock_sst_fwhub,
19765 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019766 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019767 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019768 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019769 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019770 },
19771
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019772 {
19773 .vendor = "SST",
19774 .name = "SST49LF003A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019775 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019776 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019777 .model_id = SST_SST49LF003A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019778 .total_size = 384,
19779 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010019780 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000019781 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019782 .probe = probe_jedec,
19783 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019784 .block_erasers =
19785 {
19786 {
19787 .eraseblocks = { {4 * 1024, 96} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019788 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019789 }, {
19790 .eraseblocks = { {64 * 1024, 6} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019791 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019792 }, {
19793 .eraseblocks = { {384 * 1024, 1} },
19794 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
19795 }
19796 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019797 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019798 .unlock = unlock_sst_fwhub,
19799 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019800 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019801 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019802 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019803 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019804 },
19805
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019806 {
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019807 /* Contrary to the data sheet, TBL# on the SST49LF004B affects the top 128kB (instead of 64kB)
19808 * and is only honored for 64k block erase, but not 4k sector erase.
19809 */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019810 .vendor = "SST",
19811 .name = "SST49LF004A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019812 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019813 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019814 .model_id = SST_SST49LF004A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019815 .total_size = 512,
19816 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010019817 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000019818 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019819 .probe = probe_jedec,
19820 .probe_timing = 1, /* 150 ns */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019821 .block_erasers =
19822 {
19823 {
19824 .eraseblocks = { {4 * 1024, 128} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019825 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019826 }, {
19827 .eraseblocks = { {64 * 1024, 8} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019828 .block_erase = erase_block_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019829 }, {
19830 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson51c83fb2010-01-20 20:55:53 +000019831 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019832 },
19833 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019834 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019835 .unlock = unlock_sst_fwhub,
19836 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019837 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019838 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019839 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019840 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019841 },
19842
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019843 {
19844 .vendor = "SST",
19845 .name = "SST49LF004C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019846 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019847 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019848 .model_id = SST_SST49LF004C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019849 .total_size = 512,
19850 .page_size = 4 * 1024,
19851 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019852 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000019853 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019854 .block_erasers =
19855 {
19856 {
19857 .eraseblocks = { {4 * 1024, 128} },
19858 .block_erase = erase_sector_49lfxxxc,
19859 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000019860 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000019861 {64 * 1024, 7},
19862 {32 * 1024, 1},
19863 {8 * 1024, 2},
19864 {16 * 1024, 1},
19865 },
Sean Nelson69e58112010-03-23 17:10:28 +000019866 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019867 }
19868 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000019869 .printlock = printlock_regspace2_block_eraser_1,
19870 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000019871 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019872 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019873 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019874 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019875 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019876 },
19877
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019878 {
19879 .vendor = "SST",
19880 .name = "SST49LF008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019881 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019882 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019883 .model_id = SST_SST49LF008A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019884 .total_size = 1024,
19885 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010019886 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000019887 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019888 .probe = probe_jedec,
19889 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019890 .block_erasers =
19891 {
19892 {
19893 .eraseblocks = { {4 * 1024, 256} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019894 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019895 }, {
19896 .eraseblocks = { {64 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019897 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019898 }, {
19899 .eraseblocks = { {1024 * 1024, 1} },
19900 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
19901 }
19902 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019903 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019904 .unlock = unlock_sst_fwhub,
19905 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019906 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019907 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019908 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019909 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019910 },
19911
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019912 {
19913 .vendor = "SST",
19914 .name = "SST49LF008C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019915 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019916 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019917 .model_id = SST_SST49LF008C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019918 .total_size = 1024,
19919 .page_size = 4 * 1024,
19920 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019921 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000019922 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019923 .block_erasers =
19924 {
19925 {
19926 .eraseblocks = { {4 * 1024, 256} },
19927 .block_erase = erase_sector_49lfxxxc,
19928 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000019929 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000019930 {64 * 1024, 15},
19931 {32 * 1024, 1},
19932 {8 * 1024, 2},
19933 {16 * 1024, 1},
19934 },
Sean Nelson69e58112010-03-23 17:10:28 +000019935 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019936 }
19937 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000019938 .printlock = printlock_regspace2_block_eraser_1,
19939 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000019940 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019941 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019942 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019943 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019944 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019945 },
19946
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019947 {
19948 .vendor = "SST",
19949 .name = "SST49LF016C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019950 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019951 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019952 .model_id = SST_SST49LF016C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019953 .total_size = 2048,
19954 .page_size = 4 * 1024,
Stefan Tauner23e10b82016-01-23 16:16:49 +000019955 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019956 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000019957 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019958 .block_erasers =
19959 {
19960 {
19961 .eraseblocks = { {4 * 1024, 512} },
19962 .block_erase = erase_sector_49lfxxxc,
19963 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000019964 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000019965 {64 * 1024, 31},
19966 {32 * 1024, 1},
19967 {8 * 1024, 2},
19968 {16 * 1024, 1},
19969 },
Sean Nelson69e58112010-03-23 17:10:28 +000019970 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019971 }
19972 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000019973 .printlock = printlock_regspace2_block_eraser_1,
19974 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000019975 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019976 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019977 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019978 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019979 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019980 },
19981
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019982 {
19983 .vendor = "SST",
19984 .name = "SST49LF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019985 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019986 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019987 .model_id = SST_SST49LF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019988 .total_size = 256,
19989 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000019990 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +000019991 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019992 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019993 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019994 .block_erasers =
19995 {
19996 {
19997 .eraseblocks = { {4 * 1024, 64} },
19998 .block_erase = erase_sector_jedec,
19999 }, {
20000 .eraseblocks = { {16 * 1024, 16} },
20001 .block_erase = erase_block_jedec,
20002 }, {
20003 .eraseblocks = { {256 * 1024, 1} },
20004 .block_erase = NULL,
20005 }
20006 },
Sean Nelson35727f72010-01-28 23:55:12 +000020007 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020008 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020009 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020010 .prepare_access = prepare_memory_access,
20011 .finish_access = finish_memory_access,
Sven Schnellec208dfb2009-01-07 12:35:09 +000020012 },
20013
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020014 {
20015 .vendor = "SST",
20016 .name = "SST49LF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020017 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020018 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000020019 .model_id = SST_SST49LF020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020020 .total_size = 256,
Carl-Daniel Hailfingerda654322009-07-23 01:44:38 +000020021 .page_size = 4 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020022 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000020023 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020024 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000020025 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000020026 .block_erasers =
20027 {
20028 {
20029 .eraseblocks = { {4 * 1024, 64} },
20030 .block_erase = erase_sector_jedec,
20031 }, {
20032 .eraseblocks = { {16 * 1024, 16} },
20033 .block_erase = erase_block_jedec,
20034 }, {
20035 .eraseblocks = { {256 * 1024, 1} },
20036 .block_erase = NULL,
20037 }
20038 },
Sean Nelson35727f72010-01-28 23:55:12 +000020039 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020040 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020041 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020042 .prepare_access = prepare_memory_access,
20043 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020044 },
20045
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020046 {
20047 .vendor = "SST",
20048 .name = "SST49LF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020049 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020050 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000020051 .model_id = SST_SST49LF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020052 .total_size = 512,
20053 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000020054 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000020055 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020056 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000020057 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000020058 .block_erasers =
20059 {
20060 {
20061 .eraseblocks = { {4 * 1024, 128} },
20062 .block_erase = erase_sector_jedec,
20063 }, {
20064 .eraseblocks = { {64 * 1024, 8} },
20065 .block_erase = erase_block_jedec,
20066 }, {
20067 .eraseblocks = { {512 * 1024, 1} },
20068 .block_erase = NULL,
20069 }
20070 },
Sean Nelson35727f72010-01-28 23:55:12 +000020071 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020072 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020073 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020074 .prepare_access = prepare_memory_access,
20075 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020076 },
20077
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020078 {
20079 .vendor = "SST",
20080 .name = "SST49LF040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020081 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020082 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000020083 .model_id = SST_SST49LF040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020084 .total_size = 512,
20085 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020086 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020087 .tested = TEST_OK_PREW,
Sean Nelson51c83fb2010-01-20 20:55:53 +000020088 .probe = probe_jedec,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000020089 .probe_timing = 1, /* 150ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000020090 .block_erasers =
20091 {
20092 {
20093 .eraseblocks = { {4 * 1024, 128} },
20094 .block_erase = erase_sector_jedec,
20095 }, {
20096 .eraseblocks = { {64 * 1024, 8} },
20097 .block_erase = erase_block_jedec,
20098 }, {
20099 .eraseblocks = { {512 * 1024, 1} },
20100 .block_erase = NULL,
20101 }
20102 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020103 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000020104 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020105 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020106 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010020107 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020108 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020109 },
20110
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020111 {
20112 .vendor = "SST",
20113 .name = "SST49LF080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020114 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020115 .manufacture_id = SST_ID,
Elyes HAOUAS124ef382018-03-27 12:15:09 +020020116 .model_id = SST_SST49LF080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020117 .total_size = 1024,
20118 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000020119 .feature_bits = FEATURE_EITHER_RESET,
Brandon Dowdyf07bf322011-03-06 18:31:11 +000020120 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020121 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020122 .probe_timing = TIMING_FIXME,
Sean Nelson51c83fb2010-01-20 20:55:53 +000020123 .block_erasers =
20124 {
20125 {
20126 .eraseblocks = { {4 * 1024, 256} },
20127 .block_erase = erase_sector_jedec,
20128 }, {
20129 .eraseblocks = { {64 * 1024, 16} },
20130 .block_erase = erase_block_jedec,
20131 }, {
20132 .eraseblocks = { {1024 * 1024, 1} },
20133 .block_erase = NULL,
20134 }
20135 },
Sean Nelson35727f72010-01-28 23:55:12 +000020136 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020137 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020138 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020139 .prepare_access = prepare_memory_access,
20140 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020141 },
20142
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020143 {
20144 .vendor = "SST",
20145 .name = "SST49LF160C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020146 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020147 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000020148 .model_id = SST_SST49LF160C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020149 .total_size = 2048,
20150 .page_size = 4 * 1024,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020151 .tested = TEST_OK_PR,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000020152 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000020153 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000020154 .block_erasers =
20155 {
20156 {
20157 .eraseblocks = { {4 * 1024, 512} },
20158 .block_erase = erase_sector_49lfxxxc,
20159 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000020160 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000020161 {64 * 1024, 31},
20162 {32 * 1024, 1},
20163 {8 * 1024, 2},
20164 {16 * 1024, 1},
20165 },
Sean Nelson69e58112010-03-23 17:10:28 +000020166 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000020167 }
20168 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020169 .printlock = printlock_regspace2_block_eraser_1,
20170 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000020171 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020172 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020173 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010020174 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020175 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020176 },
20177
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020178 {
20179 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020180 .name = "M29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020181 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020182 .manufacture_id = ST_ID,
20183 .model_id = ST_M29F002B,
20184 .total_size = 256,
20185 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020186 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020187 .tested = TEST_UNTESTED,
20188 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020189 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020190 .block_erasers =
20191 {
20192 {
20193 .eraseblocks = {
20194 {16 * 1024, 1},
20195 {8 * 1024, 2},
20196 {32 * 1024, 1},
20197 {64 * 1024, 3},
20198 },
20199 .block_erase = erase_sector_jedec,
20200 }, {
20201 .eraseblocks = { {256 * 1024, 1} },
20202 .block_erase = erase_chip_block_jedec,
20203 }
20204 },
Sean Nelson35727f72010-01-28 23:55:12 +000020205 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020206 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020207 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010020208 .prepare_access = prepare_memory_access,
20209 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020210 },
20211
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020212 {
20213 .vendor = "ST",
20214 .name = "M29F002T/NT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020215 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020216 .manufacture_id = ST_ID,
20217 .model_id = ST_M29F002T,
20218 .total_size = 256,
20219 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020220 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stefan Taunere34e3e82013-01-01 00:06:51 +000020221 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020222 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020223 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020224 .block_erasers =
20225 {
20226 {
20227 .eraseblocks = {
20228 {64 * 1024, 3},
20229 {32 * 1024, 1},
20230 {8 * 1024, 2},
20231 {16 * 1024, 1},
20232 },
20233 .block_erase = erase_sector_jedec,
20234 }, {
20235 .eraseblocks = { {256 * 1024, 1} },
20236 .block_erase = erase_chip_block_jedec,
20237 }
20238 },
Sean Nelson35727f72010-01-28 23:55:12 +000020239 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020240 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020241 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010020242 .prepare_access = prepare_memory_access,
20243 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020244 },
20245
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020246 {
20247 .vendor = "ST",
20248 .name = "M29F040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020249 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020250 .manufacture_id = ST_ID,
20251 .model_id = ST_M29F040B,
20252 .total_size = 512,
20253 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020254 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
20255 .tested = TEST_UNTESTED,
20256 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000020257 .probe_timing = TIMING_ZERO, /* datasheet specifies no timing */
Sean Nelson56358aa2010-01-19 16:08:51 +000020258 .block_erasers =
20259 {
20260 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020261 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000020262 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000020263 }, {
20264 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000020265 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000020266 }
20267 },
Sean Nelson35727f72010-01-28 23:55:12 +000020268 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020269 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020270 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020271 .prepare_access = prepare_memory_access,
20272 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020273 },
20274
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020275 {
Sean Nelson35727f72010-01-28 23:55:12 +000020276 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020277 .vendor = "ST",
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020278 .name = "M29F400BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020279 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020280 .manufacture_id = ST_ID,
20281 .model_id = ST_M29F400BB,
20282 .total_size = 512,
20283 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020284 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000020285 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020286 .probe = probe_jedec,
20287 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020288 .block_erasers =
20289 {
20290 {
20291 .eraseblocks = {
20292 {16 * 1024, 1},
20293 {8 * 1024, 2},
20294 {32 * 1024, 1},
20295 {64 * 1024, 7},
20296 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020297 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020298 }, {
20299 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020300 .block_erase = erase_chip_block_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020301 }
20302 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020303 .write = write_jedec_1,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020304 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020305 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020306 .prepare_access = prepare_memory_access,
20307 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020308 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100020309
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020310 {
20311 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
20312 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020313 .name = "M29F400BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020314 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020315 .manufacture_id = ST_ID,
20316 .model_id = ST_M29F400BT,
20317 .total_size = 512,
20318 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020319 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020320 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020321 .probe = probe_jedec,
20322 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson56358aa2010-01-19 16:08:51 +000020323 .block_erasers =
20324 {
20325 {
20326 .eraseblocks = {
20327 {64 * 1024, 7},
20328 {32 * 1024, 1},
20329 {8 * 1024, 2},
20330 {16 * 1024, 1},
20331 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020332 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000020333 }, {
20334 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020335 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000020336 }
20337 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020338 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020339 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020340 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020341 .prepare_access = prepare_memory_access,
20342 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020343 },
20344
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020345 {
20346 .vendor = "ST",
20347 .name = "M29W010B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020348 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020349 .manufacture_id = ST_ID,
20350 .model_id = ST_M29W010B,
20351 .total_size = 128,
20352 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020353 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020354 .tested = TEST_UNTESTED,
20355 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020356 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020357 .block_erasers =
20358 {
20359 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020360 .eraseblocks = { {16 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000020361 .block_erase = erase_sector_jedec,
20362 }, {
20363 .eraseblocks = { {128 * 1024, 1} },
20364 .block_erase = erase_chip_block_jedec,
20365 }
20366 },
Sean Nelson35727f72010-01-28 23:55:12 +000020367 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020368 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020369 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020370 .prepare_access = prepare_memory_access,
20371 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020372 },
20373
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020374 {
20375 .vendor = "ST",
20376 .name = "M29W040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020377 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020378 .manufacture_id = ST_ID,
20379 .model_id = ST_M29W040B,
20380 .total_size = 512,
20381 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020382 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020383 .tested = TEST_UNTESTED,
20384 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020385 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020386 .block_erasers =
20387 {
20388 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020389 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000020390 .block_erase = erase_sector_jedec,
20391 }, {
20392 .eraseblocks = { {512 * 1024, 1} },
20393 .block_erase = erase_chip_block_jedec,
20394 }
20395 },
Sean Nelson35727f72010-01-28 23:55:12 +000020396 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020397 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020398 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020399 .prepare_access = prepare_memory_access,
20400 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020401 },
20402
Stefan Taunereb582572012-09-21 12:52:50 +000020403 {
20404 .vendor = "ST",
20405 .name = "M29W512B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020406 .bustype = BUS_PARALLEL,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020407 .manufacture_id = ST_ID,
Stefan Taunereb582572012-09-21 12:52:50 +000020408 .model_id = ST_M29W512B,
20409 .total_size = 64,
20410 .page_size = 64 * 1024,
20411 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020412 .tested = TEST_OK_PREW,
Stefan Taunereb582572012-09-21 12:52:50 +000020413 .probe = probe_jedec,
20414 .probe_timing = TIMING_ZERO,
20415 .block_erasers =
20416 {
20417 {
20418 .eraseblocks = { {64 * 1024, 1} },
20419 .block_erase = erase_chip_block_jedec,
20420 }
20421 },
20422 .write = write_jedec_1,
20423 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020424 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020425 .prepare_access = prepare_memory_access,
20426 .finish_access = finish_memory_access,
Stefan Taunereb582572012-09-21 12:52:50 +000020427 },
Jeffrey A. Kentba7c9222010-02-01 05:49:46 +000020428
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020429 {
20430 .vendor = "ST",
20431 .name = "M50FLW040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020432 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020433 .manufacture_id = ST_ID,
20434 .model_id = ST_M50FLW040A,
20435 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000020436 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020437 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000020438 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000020439 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000020440 .block_erasers =
20441 {
20442 {
Sean Nelson329bde72010-01-19 16:39:19 +000020443 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000020444 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000020445 {64 * 1024, 5}, /* block */
20446 {4 * 1024, 16}, /* sector */
20447 {4 * 1024, 16}, /* sector */
20448 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000020449 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000020450 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000020451 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000020452 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020453 }
20454 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020455 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100020456 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020457 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020458 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020459 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020460 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020461 },
20462
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020463 {
20464 .vendor = "ST",
20465 .name = "M50FLW040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020466 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020467 .manufacture_id = ST_ID,
20468 .model_id = ST_M50FLW040B,
20469 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000020470 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020471 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000020472 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000020473 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000020474 .block_erasers =
20475 {
20476 {
Sean Nelson329bde72010-01-19 16:39:19 +000020477 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000020478 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000020479 {4 * 1024, 16}, /* sector */
20480 {64 * 1024, 5}, /* block */
20481 {4 * 1024, 16}, /* sector */
20482 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000020483 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000020484 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000020485 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000020486 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020487 }
20488 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020489 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100020490 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020491 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020492 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020493 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020494 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020495 },
20496
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020497 {
20498 .vendor = "ST",
20499 .name = "M50FLW080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020500 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020501 .manufacture_id = ST_ID,
20502 .model_id = ST_M50FLW080A,
20503 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000020504 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020505 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000020506 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000020507 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000020508 .block_erasers =
20509 {
20510 {
Sean Nelson329bde72010-01-19 16:39:19 +000020511 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000020512 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000020513 {64 * 1024, 13}, /* block */
20514 {4 * 1024, 16}, /* sector */
20515 {4 * 1024, 16}, /* sector */
20516 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000020517 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000020518 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000020519 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000020520 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020521 }
20522 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020523 .printlock = printlock_regspace2_block_eraser_0,
20524 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000020525 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020526 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020527 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020528 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020529 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020530 },
20531
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020532 {
20533 .vendor = "ST",
20534 .name = "M50FLW080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020535 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020536 .manufacture_id = ST_ID,
20537 .model_id = ST_M50FLW080B,
20538 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000020539 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020540 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000020541 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000020542 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000020543 .block_erasers =
20544 {
20545 {
Sean Nelson329bde72010-01-19 16:39:19 +000020546 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000020547 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000020548 {4 * 1024, 16}, /* sector */
20549 {64 * 1024, 13}, /* block */
20550 {4 * 1024, 16}, /* sector */
20551 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000020552 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000020553 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000020554 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000020555 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020556 }
20557 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020558 .printlock = printlock_regspace2_block_eraser_0,
20559 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000020560 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020561 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020562 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020563 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020564 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020565 },
20566
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020567 {
20568 .vendor = "ST",
20569 .name = "M50FW002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020570 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020571 .manufacture_id = ST_ID,
20572 .model_id = ST_M50FW002,
20573 .total_size = 256,
Stefan Tauner4404f732013-09-12 08:28:56 +000020574 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020575 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000020576 .probe = probe_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020577 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000020578 .block_erasers =
20579 {
20580 {
20581 .eraseblocks = {
20582 {64 * 1024, 3},
20583 {32 * 1024, 1},
20584 {8 * 1024, 2},
20585 {16 * 1024, 1},
20586 },
Sean Nelson28accc22010-03-19 18:47:06 +000020587 .block_erase = erase_block_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020588 }, {
Stefan Tauner5c316f92015-02-08 21:57:52 +000020589 .eraseblocks = { {256 * 1024, 1} },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020590 .block_erase = NULL, /* Only in A/A mux mode */
Sean Nelson56358aa2010-01-19 16:08:51 +000020591 }
20592 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020593 .printlock = printlock_regspace2_block_eraser_0,
20594 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000020595 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020596 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020597 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020598 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020599 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020600 },
20601
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020602 {
20603 .vendor = "ST",
20604 .name = "M50FW016",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020605 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020606 .manufacture_id = ST_ID,
20607 .model_id = ST_M50FW016,
20608 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000020609 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020610 .tested = TEST_UNTESTED,
20611 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000020612 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000020613 .block_erasers =
20614 {
20615 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020616 .eraseblocks = { {64 * 1024, 32} },
Sean Nelson28accc22010-03-19 18:47:06 +000020617 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020618 }
20619 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020620 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000020621 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020622 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020623 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020624 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020625 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020626 },
20627
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020628 {
20629 .vendor = "ST",
20630 .name = "M50FW040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020631 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020632 .manufacture_id = ST_ID,
20633 .model_id = ST_M50FW040,
20634 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000020635 .page_size = 0,
Sean Nelson28accc22010-03-19 18:47:06 +000020636 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020637 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000020638 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000020639 .block_erasers =
20640 {
20641 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020642 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000020643 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020644 }
20645 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020646 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000020647 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020648 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020649 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020650 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020651 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020652 },
20653
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020654 {
20655 .vendor = "ST",
20656 .name = "M50FW080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020657 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020658 .manufacture_id = ST_ID,
20659 .model_id = ST_M50FW080,
20660 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000020661 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020662 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020663 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000020664 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000020665 .block_erasers =
20666 {
20667 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020668 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000020669 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020670 }
20671 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020672 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000020673 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020674 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020675 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020676 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020677 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020678 },
20679
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020680 {
20681 .vendor = "ST",
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020682 .name = "M50LPW080",
20683 .bustype = BUS_LPC, /* A/A Mux */
20684 .manufacture_id = ST_ID,
20685 .model_id = ST_M50LPW080,
20686 .total_size = 1024,
20687 .page_size = 0,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020688 .tested = TEST_UNTESTED,
20689 .probe = probe_82802ab,
20690 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
20691 .block_erasers =
20692 {
20693 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020694 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020695 .block_erase = erase_block_82802ab,
20696 }
20697 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020698 .unlock = unlock_regspace2_uniform_64k,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020699 .write = write_82802ab,
20700 .read = read_memmapped,
20701 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020702 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020703 .finish_access = finish_memory_access,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020704 },
20705
20706 {
20707 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020708 .name = "M50LPW116",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020709 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020710 .manufacture_id = ST_ID,
20711 .model_id = ST_M50LPW116,
20712 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000020713 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020714 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000020715 .probe = probe_82802ab,
Udu Ogahc04ee222009-09-05 01:31:32 +000020716 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020717 .block_erasers =
20718 {
20719 {
20720 .eraseblocks = {
20721 {4 * 1024, 16},
20722 {64 * 1024, 30},
20723 {32 * 1024, 1},
20724 {8 * 1024, 2},
20725 {16 * 1024, 1},
20726 },
Sean Nelson28accc22010-03-19 18:47:06 +000020727 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020728 }
20729 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020730 .printlock = printlock_regspace2_block_eraser_0,
20731 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000020732 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020733 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020734 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020735 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020736 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020737 },
20738
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020739 {
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030020740 .vendor = "ST",
20741 .name = "M95M02",
20742 .bustype = BUS_SPI,
20743 .manufacture_id = ST_ID,
20744 .model_id = ST_M95M02,
20745 .total_size = 256,
20746 .page_size = 256,
20747 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
20748 .tested = TEST_OK_PREW,
Nico Huber54557862023-05-15 12:01:04 +020020749 .spi_cmd_set = SPI95,
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030020750 .probe = probe_spi_st95,
20751 .probe_timing = TIMING_ZERO,
20752 .block_erasers =
20753 {
20754 {
20755 .eraseblocks = { {256 * 1024, 1} },
20756 .block_erase = spi_block_erase_emulation,
20757 }
20758 },
20759
20760 .printlock = spi_prettyprint_status_register_bp1_srwd,
20761 .unlock = spi_disable_blockprotect_bp1_srwd,
20762 .write = spi_chip_write_256,
20763 .read = spi_chip_read,
20764 .voltage = {2500, 5500},
20765 },
20766
20767 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020768 .vendor = "Sanyo",
20769 .name = "LE25FU106B",
20770 .bustype = BUS_SPI,
20771 .manufacture_id = SANYO_ID,
20772 .model_id = SANYO_LE25FU106B,
20773 .total_size = 128,
20774 .page_size = 256,
20775 .feature_bits = FEATURE_WRSR_WREN,
20776 .tested = TEST_UNTESTED,
20777 .probe = probe_spi_res2,
20778 .probe_timing = TIMING_ZERO,
20779 .block_erasers =
20780 {
20781 /* FIXME: Is this correct?
20782 {
20783 .eraseblocks = { {2 * 1024, 64} },
20784 .block_erase = spi_block_erase_d7,
20785 },*/
20786 {
20787 .eraseblocks = { {32 * 1024, 4} },
20788 .block_erase = spi_block_erase_d8,
20789 }, {
20790 .eraseblocks = { {128 * 1024, 1} },
20791 .block_erase = spi_block_erase_c7,
20792 }
20793 },
20794 .printlock = spi_prettyprint_status_register_bp1_srwd,
20795 .unlock = spi_disable_blockprotect_bp1_srwd,
20796 .write = spi_chip_write_256,
20797 .read = spi_chip_read,
20798 .voltage = {2300, 3600},
20799 },
20800
20801 {
20802 .vendor = "Sanyo",
20803 .name = "LE25FU206",
20804 .bustype = BUS_SPI,
20805 .manufacture_id = SANYO_ID,
20806 .model_id = SANYO_LE25FU206,
20807 .total_size = 256,
20808 .page_size = 256,
20809 .feature_bits = FEATURE_WRSR_WREN,
20810 .tested = TEST_UNTESTED,
20811 .probe = probe_spi_res2,
20812 .probe_timing = TIMING_ZERO,
20813 .block_erasers =
20814 {
20815 {
20816 .eraseblocks = { {4 * 1024, 64} },
20817 .block_erase = spi_block_erase_d7,
20818 }, {
20819 .eraseblocks = { {64 * 1024, 4} },
20820 .block_erase = spi_block_erase_d8,
20821 }, {
20822 .eraseblocks = { {256 * 1024, 1} },
20823 .block_erase = spi_block_erase_c7,
20824 }
20825 },
20826 .printlock = spi_prettyprint_status_register_bp1_srwd,
20827 .unlock = spi_disable_blockprotect_bp1_srwd,
20828 .write = spi_chip_write_256,
20829 .read = spi_chip_read,
20830 .voltage = {2300, 3600},
20831 },
20832
20833 {
20834 .vendor = "Sanyo",
20835 .name = "LE25FU206A",
20836 .bustype = BUS_SPI,
20837 .manufacture_id = SANYO_ID,
20838 .model_id = SANYO_LE25FU206A,
20839 .total_size = 256,
20840 .page_size = 256,
20841 .tested = TEST_UNTESTED,
20842 .probe = probe_spi_rdid,
20843 .probe_timing = TIMING_ZERO,
20844 .block_erasers =
20845 {
20846 {
20847 .eraseblocks = { {4 * 1024, 64} },
20848 .block_erase = spi_block_erase_20,
20849 }, {
20850 .eraseblocks = { {4 * 1024, 64} },
20851 .block_erase = spi_block_erase_d7,
20852 }, {
20853 .eraseblocks = { {64 * 1024, 4} },
20854 .block_erase = spi_block_erase_d8,
20855 }, {
20856 .eraseblocks = { {256 * 1024, 1} },
20857 .block_erase = spi_block_erase_60,
20858 }, {
20859 .eraseblocks = { {256 * 1024, 1} },
20860 .block_erase = spi_block_erase_c7,
20861 }
20862 },
20863 .printlock = spi_prettyprint_status_register_bp2_srwd,
20864 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
20865 .write = spi_chip_write_256,
20866 .read = spi_chip_read,
20867 .voltage = {2300, 3600},
20868 },
20869
20870 {
20871 .vendor = "Sanyo",
20872 .name = "LE25FU406B",
20873 .bustype = BUS_SPI,
20874 .manufacture_id = SANYO_ID,
20875 .model_id = SANYO_LE25FU406B,
20876 .total_size = 512,
20877 .page_size = 256,
20878 .feature_bits = FEATURE_WRSR_WREN,
20879 .tested = TEST_OK_PREW,
20880 .probe = probe_spi_res2,
20881 .probe_timing = TIMING_ZERO,
20882 .block_erasers =
20883 {
20884 {
20885 .eraseblocks = { {4 * 1024, 128} },
20886 .block_erase = spi_block_erase_d7,
20887 }, {
20888 .eraseblocks = { {64 * 1024, 8} },
20889 .block_erase = spi_block_erase_d8,
20890 }, {
20891 .eraseblocks = { {512 * 1024, 1} },
20892 .block_erase = spi_block_erase_c7,
20893 }
20894 },
20895 .printlock = spi_prettyprint_status_register_bp2_srwd,
20896 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
20897 .write = spi_chip_write_256,
20898 .read = spi_chip_read,
20899 .voltage = {2300, 3600},
20900 },
20901
20902 {
20903 .vendor = "Sanyo",
20904 .name = "LE25FU406C/LE25U40CMC",
20905 .bustype = BUS_SPI,
20906 .manufacture_id = SANYO_ID,
20907 .model_id = SANYO_LE25FU406C,
20908 .total_size = 512,
20909 .page_size = 256,
20910 .feature_bits = FEATURE_WRSR_WREN,
20911 .tested = TEST_OK_PREW,
20912 .probe = probe_spi_rdid,
20913 .probe_timing = TIMING_ZERO,
20914 .block_erasers =
20915 {
20916 {
20917 .eraseblocks = { {4 * 1024, 128} },
20918 .block_erase = spi_block_erase_20,
20919 }, {
20920 .eraseblocks = { {4 * 1024, 128} },
20921 .block_erase = spi_block_erase_d7,
20922 }, {
20923 .eraseblocks = { {64 * 1024, 8} },
20924 .block_erase = spi_block_erase_d8,
20925 }, {
20926 .eraseblocks = { {512 * 1024, 1} },
20927 .block_erase = spi_block_erase_60,
20928 }, {
20929 .eraseblocks = { {512 * 1024, 1} },
20930 .block_erase = spi_block_erase_c7,
20931 }
20932 },
20933 .printlock = spi_prettyprint_status_register_bp2_srwd,
20934 .unlock = spi_disable_blockprotect_bp2_srwd,
20935 .write = spi_chip_write_256,
20936 .read = spi_chip_read, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */
20937 .voltage = {2300, 3600},
20938 },
20939
20940 {
20941 .vendor = "Sanyo",
20942 .name = "LE25FW106",
20943 .bustype = BUS_SPI,
20944 .manufacture_id = SANYO_ID,
20945 .model_id = SANYO_LE25FW106,
20946 .total_size = 128,
20947 .page_size = 256,
20948 .feature_bits = FEATURE_WRSR_WREN,
20949 .tested = TEST_OK_PREW,
20950 .probe = probe_spi_res2,
20951 .probe_timing = TIMING_ZERO,
20952 .block_erasers =
20953 {
20954 {
20955 .eraseblocks = { {2 * 1024, 64} },
20956 .block_erase = spi_block_erase_d7,
20957 }, {
20958 .eraseblocks = { {32 * 1024, 4} },
20959 .block_erase = spi_block_erase_d8,
20960 }, {
20961 .eraseblocks = { {128 * 1024, 1} },
20962 .block_erase = spi_block_erase_c7,
20963 }
20964 },
20965 .printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */
20966 .unlock = spi_disable_blockprotect_bp1_srwd,
20967 .write = spi_chip_write_256,
20968 .read = spi_chip_read,
20969 .voltage = {2700, 3600},
20970 },
20971
20972 {
20973 .vendor = "Sanyo",
20974 .name = "LE25FW203A",
20975 .bustype = BUS_SPI,
20976 .manufacture_id = SANYO_ID,
20977 .model_id = SANYO_LE25FW203A,
20978 .total_size = 256,
20979 .page_size = 256,
20980 .tested = TEST_UNTESTED,
20981 .probe = probe_spi_rdid,
20982 .probe_timing = TIMING_ZERO,
20983 .block_erasers =
20984 {
20985 {
20986 .eraseblocks = { {256, 1024} },
20987 .block_erase = spi_block_erase_db,
20988 }, {
20989 .eraseblocks = { {64 * 1024, 4} },
20990 .block_erase = spi_block_erase_d8,
20991 }, {
20992 .eraseblocks = { {256 * 1024, 1} },
20993 .block_erase = spi_block_erase_c7,
20994 }
20995 },
20996 .printlock = spi_prettyprint_status_register_default_welwip,
20997 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
20998 .write = spi_chip_write_256,
20999 .read = spi_chip_read,
21000 .voltage = {2700, 3600},
21001 },
21002
21003 {
21004 .vendor = "Sanyo",
21005 .name = "LE25FW403A",
21006 .bustype = BUS_SPI,
21007 .manufacture_id = SANYO_ID,
21008 .model_id = SANYO_LE25FW403A,
21009 .total_size = 512,
21010 .page_size = 256,
21011 .tested = TEST_UNTESTED,
21012 .probe = probe_spi_rdid,
21013 .probe_timing = TIMING_ZERO,
21014 .block_erasers =
21015 {
21016 {
21017 .eraseblocks = { {256, 2 * 1024} },
21018 .block_erase = spi_block_erase_db,
21019 }, {
21020 .eraseblocks = { {64 * 1024, 8} },
21021 .block_erase = spi_block_erase_d8,
21022 }, {
21023 .eraseblocks = { {512 * 1024, 1} },
21024 .block_erase = spi_block_erase_c7,
21025 }
21026 },
21027 .printlock = spi_prettyprint_status_register_default_welwip,
21028 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
21029 .write = spi_chip_write_256,
21030 .read = spi_chip_read,
21031 .voltage = {2700, 3600},
21032 },
21033
21034 {
21035 .vendor = "Sanyo",
21036 .name = "LE25FW406A",
21037 .bustype = BUS_SPI,
21038 .manufacture_id = SANYO_ID,
21039 .model_id = SANYO_LE25FW406A,
21040 .total_size = 512,
21041 .page_size = 256,
21042 .feature_bits = FEATURE_WRSR_WREN,
21043 .tested = TEST_OK_PREW,
21044 .probe = probe_spi_res2,
21045 .probe_timing = TIMING_ZERO,
21046 .block_erasers =
21047 {
21048 {
21049 .eraseblocks = { {4 * 1024, 128} },
21050 .block_erase = spi_block_erase_d7,
21051 }, {
21052 .eraseblocks = { {64 * 1024, 8} },
21053 .block_erase = spi_block_erase_d8,
21054 }, {
21055 .eraseblocks = { {512 * 1024, 1} },
21056 .block_erase = spi_block_erase_c7,
21057 }
21058 },
21059 .printlock = spi_prettyprint_status_register_plain,
21060 .unlock = spi_disable_blockprotect,
21061 .write = spi_chip_write_256,
21062 .read = spi_chip_read,
21063 .voltage = {2700, 3600},
21064 },
21065
21066 {
21067 .vendor = "Sanyo",
21068 .name = "LE25FW418A",
21069 .bustype = BUS_SPI,
21070 .manufacture_id = SANYO_ID,
21071 .model_id = SANYO_LE25FW418A,
21072 .total_size = 512,
21073 .page_size = 256,
21074 .feature_bits = FEATURE_WRSR_WREN,
21075 .tested = TEST_UNTESTED,
21076 .probe = probe_spi_res2,
21077 .probe_timing = TIMING_ZERO,
21078 .block_erasers =
21079 {
21080 {
21081 .eraseblocks = { {4 * 1024, 128} },
21082 .block_erase = spi_block_erase_d7,
21083 }, {
21084 .eraseblocks = { {64 * 1024, 8} },
21085 .block_erase = spi_block_erase_d8,
21086 }, {
21087 .eraseblocks = { {512 * 1024, 1} },
21088 .block_erase = spi_block_erase_c7,
21089 }
21090 },
21091 .printlock = spi_prettyprint_status_register_bp2_srwd,
21092 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
21093 .write = spi_chip_write_256,
21094 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
21095 .voltage = {2700, 3600},
21096 },
21097
21098 {
21099 .vendor = "Sanyo",
21100 .name = "LE25FW806",
21101 .bustype = BUS_SPI,
21102 .manufacture_id = SANYO_ID,
21103 .model_id = SANYO_LE25FW806,
21104 .total_size = 1024,
21105 .page_size = 256,
21106 .feature_bits = FEATURE_WRSR_WREN,
21107 .tested = TEST_UNTESTED,
21108 .probe = probe_spi_res2,
21109 .probe_timing = TIMING_ZERO,
21110 .block_erasers =
21111 {
21112 {
21113 .eraseblocks = { {4 * 1024, 256} },
21114 .block_erase = spi_block_erase_20,
21115 }, {
21116 .eraseblocks = { {4 * 1024, 256} },
21117 .block_erase = spi_block_erase_d7,
21118 }, {
21119 .eraseblocks = { {64 * 1024, 16} },
21120 .block_erase = spi_block_erase_d8,
21121 }, {
21122 .eraseblocks = { {1024 * 1024, 1} },
21123 .block_erase = spi_block_erase_c7,
21124 }
21125 },
21126 .printlock = spi_prettyprint_status_register_bp2_srwd,
21127 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
21128 .write = spi_chip_write_256,
21129 .read = spi_chip_read,
21130 .voltage = {2700, 3600},
21131 },
21132
21133 {
21134 .vendor = "Sanyo",
21135 .name = "LE25FW808",
21136 .bustype = BUS_SPI,
21137 .manufacture_id = SANYO_ID,
21138 .model_id = SANYO_LE25FW808,
21139 .total_size = 1024,
21140 .page_size = 256,
21141 .feature_bits = FEATURE_WRSR_WREN,
21142 .tested = TEST_UNTESTED,
21143 .probe = probe_spi_res2,
21144 .probe_timing = TIMING_ZERO,
21145 .block_erasers =
21146 {
21147 {
21148 .eraseblocks = { {8 * 1024, 128} },
21149 .block_erase = spi_block_erase_d7,
21150 }, {
21151 .eraseblocks = { {64 * 1024, 16} },
21152 .block_erase = spi_block_erase_d8,
21153 }, {
21154 .eraseblocks = { {1024 * 1024, 1} },
21155 .block_erase = spi_block_erase_c7,
21156 }
21157 },
21158 .printlock = spi_prettyprint_status_register_bp2_srwd,
21159 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
21160 .write = spi_chip_write_256,
21161 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
21162 .voltage = {2700, 3600},
21163 },
21164
21165 {
21166 .vendor = "Sharp",
21167 .name = "LH28F008BJT-BTLZ1",
21168 .bustype = BUS_PARALLEL,
21169 .manufacture_id = SHARP_ID,
21170 .model_id = SHARP_LH28F008BJ__PB,
21171 .total_size = 1024,
21172 .page_size = 64 * 1024,
21173 .tested = TEST_OK_PREW,
21174 .probe = probe_82802ab,
21175 .probe_timing = TIMING_ZERO,
21176 .block_erasers =
21177 {
21178 {
21179 .eraseblocks = {
21180 {8 * 1024, 8},
21181 {64 * 1024, 15}
21182 },
21183 .block_erase = erase_block_82802ab,
21184 }, {
21185 .eraseblocks = { {1024 * 1024, 1} },
21186 .block_erase = erase_sector_49lfxxxc,
21187 }
21188 },
21189 .unlock = unlock_lh28f008bjt,
21190 .write = write_82802ab,
21191 .read = read_memmapped,
21192 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021193 .prepare_access = prepare_memory_access,
21194 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021195 },
21196
21197 {
21198 .vendor = "Sharp",
21199 .name = "LHF00L04",
21200 .bustype = BUS_FWH, /* A/A Mux */
21201 .manufacture_id = SHARP_ID,
21202 .model_id = SHARP_LHF00L04,
21203 .total_size = 1024,
21204 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021205 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021206 .tested = TEST_UNTESTED,
21207 .probe = probe_82802ab,
21208 .probe_timing = TIMING_ZERO,
21209 .block_erasers =
21210 {
21211 {
21212 .eraseblocks = {
21213 {64 * 1024, 15},
21214 {8 * 1024, 8}
21215 },
21216 .block_erase = erase_block_82802ab,
21217 }, {
21218 .eraseblocks = {
21219 {1024 * 1024, 1}
21220 },
21221 .block_erase = NULL, /* 30 D0, only in A/A mux mode */
21222 },
21223 },
21224 .unlock = unlock_regspace2_uniform_64k,
21225 .write = write_82802ab,
21226 .read = read_memmapped,
21227 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010021228 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021229 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021230 },
21231
21232 {
21233 .vendor = "Spansion",
21234 .name = "S25FL004A",
21235 .bustype = BUS_SPI,
21236 .manufacture_id = SPANSION_ID,
21237 .model_id = SPANSION_S25FL004A,
21238 .total_size = 512,
21239 .page_size = 256,
21240 .feature_bits = FEATURE_WRSR_WREN,
21241 .tested = TEST_UNTESTED,
21242 .probe = probe_spi_rdid,
21243 .probe_timing = TIMING_ZERO,
21244 .block_erasers =
21245 {
21246 {
21247 .eraseblocks = { {64 * 1024, 8} },
21248 .block_erase = spi_block_erase_d8,
21249 }, {
21250 .eraseblocks = { {512 * 1024, 1} },
21251 .block_erase = spi_block_erase_c7,
21252 }
21253 },
21254 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21255 .unlock = spi_disable_blockprotect,
21256 .write = spi_chip_write_256,
21257 .read = spi_chip_read,
21258 .voltage = {2700, 3600},
21259 },
21260
21261 {
21262 .vendor = "Spansion",
21263 .name = "S25FL008A",
21264 .bustype = BUS_SPI,
21265 .manufacture_id = SPANSION_ID,
21266 .model_id = SPANSION_S25FL008A,
21267 .total_size = 1024,
21268 .page_size = 256,
21269 .feature_bits = FEATURE_WRSR_WREN,
21270 .tested = TEST_OK_PRE,
21271 .probe = probe_spi_rdid,
21272 .probe_timing = TIMING_ZERO,
21273 .block_erasers =
21274 {
21275 {
21276 .eraseblocks = { {64 * 1024, 16} },
21277 .block_erase = spi_block_erase_d8,
21278 }, {
21279 .eraseblocks = { {1024 * 1024, 1} },
21280 .block_erase = spi_block_erase_c7,
21281 }
21282 },
21283 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21284 .unlock = spi_disable_blockprotect,
21285 .write = spi_chip_write_256,
21286 .read = spi_chip_read,
21287 .voltage = {2700, 3600},
21288 },
21289
21290 {
21291 .vendor = "Spansion",
21292 .name = "S25FL016A",
21293 .bustype = BUS_SPI,
21294 .manufacture_id = SPANSION_ID,
21295 .model_id = SPANSION_S25FL016A,
21296 .total_size = 2048,
21297 .page_size = 256,
21298 .feature_bits = FEATURE_WRSR_WREN,
21299 .tested = TEST_OK_PREW,
21300 .probe = probe_spi_rdid,
21301 .probe_timing = TIMING_ZERO,
21302 .block_erasers =
21303 {
21304 {
21305 .eraseblocks = { {64 * 1024, 32} },
21306 .block_erase = spi_block_erase_d8,
21307 }, {
21308 .eraseblocks = { {2 * 1024 * 1024, 1} },
21309 .block_erase = spi_block_erase_c7,
21310 }
21311 },
21312 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21313 .unlock = spi_disable_blockprotect,
21314 .write = spi_chip_write_256,
21315 .read = spi_chip_read,
21316 .voltage = {2700, 3600},
21317 },
21318
21319 {
21320 .vendor = "Spansion",
21321 .name = "S25FL032A/P",
21322 .bustype = BUS_SPI,
21323 .manufacture_id = SPANSION_ID,
21324 .model_id = SPANSION_S25FL032A,
21325 .total_size = 4096,
21326 .page_size = 256,
21327 .feature_bits = FEATURE_WRSR_WREN,
21328 .tested = TEST_OK_PREW,
21329 .probe = probe_spi_rdid,
21330 .probe_timing = TIMING_ZERO,
21331 .block_erasers =
21332 {
21333 {
21334 .eraseblocks = { {64 * 1024, 64} },
21335 .block_erase = spi_block_erase_d8,
21336 }, {
21337 .eraseblocks = { {4 * 1024 * 1024, 1} },
21338 .block_erase = spi_block_erase_c7,
21339 }
21340 },
21341 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21342 .unlock = spi_disable_blockprotect,
21343 .write = spi_chip_write_256,
21344 .read = spi_chip_read,
21345 .voltage = {2700, 3600},
21346 },
21347
21348 {
21349 .vendor = "Spansion",
21350 .name = "S25FL064A/P",
21351 .bustype = BUS_SPI,
21352 .manufacture_id = SPANSION_ID,
21353 .model_id = SPANSION_S25FL064A,
21354 .total_size = 8192,
21355 .page_size = 256,
21356 .feature_bits = FEATURE_WRSR_WREN,
21357 .tested = TEST_OK_PREW,
21358 .probe = probe_spi_rdid,
21359 .probe_timing = TIMING_ZERO,
21360 .block_erasers =
21361 {
21362 {
21363 .eraseblocks = { {64 * 1024, 128} },
21364 .block_erase = spi_block_erase_d8,
21365 }, {
21366 .eraseblocks = { {8 * 1024 * 1024, 1} },
21367 .block_erase = spi_block_erase_c7,
21368 }
21369 },
21370 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21371 .unlock = spi_disable_blockprotect,
21372 .write = spi_chip_write_256,
21373 .read = spi_chip_read,
21374 .voltage = {2700, 3600},
21375 },
21376
21377 {
21378 .vendor = "Spansion",
21379 .name = "S25FL116K/S25FL216K", /* FIXME: separate them */
21380 .bustype = BUS_SPI,
21381 .manufacture_id = SPANSION_ID,
21382 .model_id = SPANSION_S25FL216,
21383 .total_size = 2048,
21384 .page_size = 256,
21385 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (S25FL116K only) */
21386 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21387 .tested = TEST_UNTESTED,
21388 .probe = probe_spi_rdid,
21389 .probe_timing = TIMING_ZERO,
21390 .block_erasers =
21391 {
21392 {
21393 .eraseblocks = { {4 * 1024, 512} },
21394 .block_erase = spi_block_erase_20,
21395 }, {
21396 .eraseblocks = { {64 * 1024, 32} },
21397 .block_erase = spi_block_erase_d8,
21398 }, {
21399 .eraseblocks = { { 2048 * 1024, 1} },
21400 .block_erase = spi_block_erase_60,
21401 }, {
21402 .eraseblocks = { { 2048 * 1024, 1} },
21403 .block_erase = spi_block_erase_c7,
21404 }
21405 },
21406 .printlock = spi_prettyprint_status_register_bp3_srwd,
21407 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
21408 .write = spi_chip_write_256,
21409 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
21410 .voltage = {2700, 3600},
21411 },
21412
21413 {
21414 .vendor = "Spansion",
21415 .name = "S25FL127S-256kB", /* uniform 256kB sectors */
21416 .bustype = BUS_SPI,
21417 .manufacture_id = SPANSION_ID,
21418 .model_id = SPANSION_S25FL128,
21419 .total_size = 16384,
21420 .page_size = 512,
21421 /* supports 4B addressing */
21422 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
21423 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21424 .tested = TEST_UNTESTED,
21425 .probe = probe_spi_rdid,
21426 .probe_timing = TIMING_ZERO,
21427 .block_erasers =
21428 {
21429 {
21430 .eraseblocks = { {256 * 1024, 64} },
21431 .block_erase = spi_block_erase_d8,
21432 }, {
21433 .eraseblocks = { { 16384 * 1024, 1} },
21434 .block_erase = spi_block_erase_60,
21435 }, {
21436 .eraseblocks = { { 16384 * 1024, 1} },
21437 .block_erase = spi_block_erase_c7,
21438 }
21439 },
21440 .printlock = spi_prettyprint_status_register_bp2_srwd,
21441 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
21442 .write = spi_chip_write_256, /* Multi I/O supported */
21443 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21444 .voltage = {2700, 3600},
21445 },
21446
21447 {
21448 .vendor = "Spansion",
21449 .name = "S25FL127S-64kB", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
21450 .bustype = BUS_SPI,
21451 .manufacture_id = SPANSION_ID,
21452 .model_id = SPANSION_S25FL128,
21453 .total_size = 16384,
21454 .page_size = 256,
21455 /* supports 4B addressing */
21456 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
21457 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21458 .tested = TEST_OK_PREW,
21459 /* FIXME: we should distinguish the configuration on probing time like we do for AT45DB chips */
21460 .probe = probe_spi_rdid,
21461 .probe_timing = TIMING_ZERO,
21462 .block_erasers =
21463 {
21464 {
21465 /* This chip supports erasing of 32 so-called "parameter sectors" with
21466 * opcode 0x20 which may be configured to be on top or bottom of the address
21467 * space. Trying to access an address outside these 4kB blocks does have no
21468 * effect on the memory contents, e.g.
21469 .eraseblocks = {
21470 {4 * 1024, 32},
21471 {64 * 1024, 254} // inaccessible
21472 },
21473 .block_erase = spi_block_erase_20,
21474 }, { */
21475 .eraseblocks = { { 64 * 1024, 256} },
21476 .block_erase = spi_block_erase_d8,
21477 }, {
21478 .eraseblocks = { { 16384 * 1024, 1} },
21479 .block_erase = spi_block_erase_60,
21480 }, {
21481 .eraseblocks = { { 16384 * 1024, 1} },
21482 .block_erase = spi_block_erase_c7,
21483 }
21484 },
21485 .printlock = spi_prettyprint_status_register_bp2_srwd,
21486 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
21487 .write = spi_chip_write_256, /* Multi I/O supported */
21488 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21489 .voltage = {2700, 3600},
21490 },
21491
21492 {
21493 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020021494 .name = "S25FL128L",
21495 .bustype = BUS_SPI,
21496 .manufacture_id = SPANSION_ID,
21497 .model_id = SPANSION_S25FL128L,
21498 .total_size = 16384,
21499 .page_size = 256,
21500 /* 4 x 256B Security Region (OTP) */
21501 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP,
21502 .tested = TEST_UNTESTED,
21503 .probe = probe_spi_rdid,
21504 .probe_timing = TIMING_ZERO,
21505 .block_erasers =
21506 {
21507 {
21508 .eraseblocks = { {4 * 1024, 4096} },
21509 .block_erase = spi_block_erase_20,
21510 }, {
21511 .eraseblocks = { {32 * 1024, 512} },
21512 .block_erase = spi_block_erase_52,
21513 }, {
21514 .eraseblocks = { {64 * 1024, 256} },
21515 .block_erase = spi_block_erase_d8,
21516 }, {
21517 .eraseblocks = { {16384 * 1024, 1} },
21518 .block_erase = spi_block_erase_60,
21519 }, {
21520 .eraseblocks = { {16384 * 1024, 1} },
21521 .block_erase = spi_block_erase_c7,
21522 }
21523 },
21524 .printlock = spi_prettyprint_status_register_bp2_srwd,
21525 .unlock = spi_disable_blockprotect_bp2_srwd,
21526 .write = spi_chip_write_256,
21527 .read = spi_chip_read, /* Fast read (0x0B) supported */
21528 .voltage = {2700, 3600},
21529 .reg_bits =
21530 {
21531 /*
21532 * Note: This chip has a read-only Status Register 2 that is not
21533 * counted here. Registers are mapped as follows:
21534 * STATUS1 ... Status Register 1
21535 * STATUS2 ... Configuration Register 1
21536 * STATUS3 ... Configuration Register 2
21537 */
21538 .srp = {STATUS1, 7, RW},
21539 .srl = {STATUS2, 0, RW},
21540 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21541 .tb = {STATUS1, 5, RW},
21542 .sec = {STATUS1, 6, RW},
21543 .cmp = {STATUS2, 6, RW},
21544 .wps = {STATUS3, 2, RW},
21545 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021546 .wp_write_cfg = spi_wp_write_cfg,
21547 .wp_read_cfg = spi_wp_read_cfg,
21548 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020021549 .decode_range = decode_range_spi25,
21550 },
21551
21552 {
21553 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100021554 .name = "S25FL128P......0", /* uniform 64 kB sectors */
21555 .bustype = BUS_SPI,
21556 .manufacture_id = SPANSION_ID,
21557 .model_id = SPANSION_S25FL128,
21558 .total_size = 16384,
21559 .page_size = 256,
21560 .feature_bits = FEATURE_WRSR_WREN,
21561 .tested = TEST_OK_PREW,
21562 .probe = probe_spi_rdid,
21563 .probe_timing = TIMING_ZERO,
21564 .block_erasers =
21565 {
21566 {
21567 .eraseblocks = { {64 * 1024, 256} },
21568 .block_erase = spi_block_erase_20,
21569 }, {
21570 .eraseblocks = { {64 * 1024, 256} },
21571 .block_erase = spi_block_erase_d8,
21572 }, {
21573 .eraseblocks = { { 16384 * 1024, 1} },
21574 .block_erase = spi_block_erase_60,
21575 }, {
21576 .eraseblocks = { { 16384 * 1024, 1} },
21577 .block_erase = spi_block_erase_c7,
21578 }
21579 },
21580 .printlock = spi_prettyprint_status_register_bp3_srwd,
21581 .unlock = spi_disable_blockprotect_bp3_srwd,
21582 .write = spi_chip_write_256,
21583 .read = spi_chip_read, /* Fast read (0x0B) supported */
21584 .voltage = {2700, 3600},
21585 },
21586
21587 {
21588 .vendor = "Spansion",
21589 .name = "S25FL128P......1", /* uniform 256kB sectors */
21590 .bustype = BUS_SPI,
21591 .manufacture_id = SPANSION_ID,
21592 .model_id = SPANSION_S25FL128,
21593 .total_size = 16384,
21594 .page_size = 256,
21595 .feature_bits = FEATURE_WRSR_WREN,
21596 .tested = TEST_UNTESTED,
21597 .probe = probe_spi_rdid,
21598 .probe_timing = TIMING_ZERO,
21599 .block_erasers =
21600 {
21601 {
21602 .eraseblocks = { {256 * 1024, 64} },
21603 .block_erase = spi_block_erase_d8,
21604 }, {
21605 .eraseblocks = { { 16384 * 1024, 1} },
21606 .block_erase = spi_block_erase_c7,
21607 }
21608 },
21609 .printlock = spi_prettyprint_status_register_bp2_srwd,
21610 .unlock = spi_disable_blockprotect_bp2_srwd,
21611 .write = spi_chip_write_256,
21612 .read = spi_chip_read, /* Fast read (0x0B) supported */
21613 .voltage = {2700, 3600},
21614 },
21615
21616 {
21617 .vendor = "Spansion",
21618 .name = "S25FL128S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
21619 .bustype = BUS_SPI,
21620 .manufacture_id = SPANSION_ID,
21621 .model_id = SPANSION_S25FL128,
21622 .total_size = 16384,
21623 .page_size = 256,
21624 /* supports 4B addressing */
21625 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
21626 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21627 .tested = TEST_OK_PREW,
21628 .probe = probe_spi_rdid,
21629 .probe_timing = TIMING_ZERO,
21630 .block_erasers =
21631 {
21632 {
21633 /* This chip supports erasing of the 32 so-called "parameter sectors" with
21634 * opcode 0x20. Trying to access an address outside these 4kB blocks does
21635 * have no effect on the memory contents, but sets a flag in the SR.
21636 .eraseblocks = {
21637 {4 * 1024, 32},
21638 {64 * 1024, 254} // inaccessible
21639 },
21640 .block_erase = spi_block_erase_20,
21641 }, { */
21642 .eraseblocks = { { 64 * 1024, 256} },
21643 .block_erase = spi_block_erase_d8,
21644 }, {
21645 .eraseblocks = { { 16384 * 1024, 1} },
21646 .block_erase = spi_block_erase_60,
21647 }, {
21648 .eraseblocks = { { 16384 * 1024, 1} },
21649 .block_erase = spi_block_erase_c7,
21650 }
21651 },
21652 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
21653 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
21654 .write = spi_chip_write_256, /* Multi I/O supported */
21655 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21656 .voltage = {2700, 3600},
21657 },
21658
21659 {
21660 .vendor = "Spansion",
21661 .name = "S25FL128S......1", /* uniform 256 kB sectors */
21662 .bustype = BUS_SPI,
21663 .manufacture_id = SPANSION_ID,
21664 .model_id = SPANSION_S25FL128,
21665 .total_size = 16384,
21666 .page_size = 512,
21667 /* supports 4B addressing */
21668 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
21669 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21670 .tested = TEST_UNTESTED,
21671 .probe = probe_spi_rdid,
21672 .probe_timing = TIMING_ZERO,
21673 .block_erasers =
21674 {
21675 {
21676 .eraseblocks = { {256 * 1024, 64} },
21677 .block_erase = spi_block_erase_d8,
21678 }, {
21679 .eraseblocks = { { 16384 * 1024, 1} },
21680 .block_erase = spi_block_erase_60,
21681 }, {
21682 .eraseblocks = { { 16384 * 1024, 1} },
21683 .block_erase = spi_block_erase_c7,
21684 }
21685 },
21686 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
21687 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
21688 .write = spi_chip_write_256, /* Multi I/O supported */
21689 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21690 .voltage = {2700, 3600},
21691 },
21692
21693 {
21694 .vendor = "Spansion",
21695 .name = "S25FL129P......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
21696 .bustype = BUS_SPI,
21697 .manufacture_id = SPANSION_ID,
21698 .model_id = SPANSION_S25FL128,
21699 .total_size = 16384,
21700 .page_size = 256,
21701 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
21702 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21703 .tested = TEST_OK_PREW,
21704 .probe = probe_spi_rdid,
21705 .probe_timing = TIMING_ZERO,
21706 .block_erasers =
21707 {
21708 {
21709 /* FIXME: This chip supports erasing of the 32 so-called "parameter sectors" with
21710 * opcode 0x20. Trying to access an address outside these 4kB blocks does have no
21711 * effect on the memory contents, but sets a flag in the SR.
21712 .eraseblocks = {
21713 {4 * 1024, 32},
21714 {64 * 1024, 254} // inaccessible
21715 },
21716 .block_erase = spi_block_erase_20,
21717 }, { */
21718 /* FIXME: Additionally it also supports erase opcode 40h for the respective 2*4 kB pairs
21719 .eraseblocks = {
21720 {8 * 1024, 16},
21721 {64 * 1024, 254} // inaccessible
21722 },
21723 .block_erase = spi_block_erase_40,
21724 }, { */
21725 .eraseblocks = { { 64 * 1024, 256} },
21726 .block_erase = spi_block_erase_d8,
21727 }, {
21728 .eraseblocks = { { 16384 * 1024, 1} },
21729 .block_erase = spi_block_erase_60,
21730 }, {
21731 .eraseblocks = { { 16384 * 1024, 1} },
21732 .block_erase = spi_block_erase_c7,
21733 }
21734 },
21735 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
21736 .unlock = spi_disable_blockprotect_bp2_srwd,
21737 .write = spi_chip_write_256, /* Multi I/O supported */
21738 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21739 .voltage = {2700, 3600},
21740 },
21741
21742 {
21743 .vendor = "Spansion",
21744 .name = "S25FL129P......1", /* uniform 256 kB sectors */
21745 .bustype = BUS_SPI,
21746 .manufacture_id = SPANSION_ID,
21747 .model_id = SPANSION_S25FL128,
21748 .total_size = 16384,
21749 .page_size = 256,
21750 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
21751 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21752 .tested = TEST_UNTESTED,
21753 .probe = probe_spi_rdid,
21754 .probe_timing = TIMING_ZERO,
21755 .block_erasers =
21756 {
21757 {
21758 .eraseblocks = { {256 * 1024, 64} },
21759 .block_erase = spi_block_erase_d8,
21760 }, {
21761 .eraseblocks = { { 16384 * 1024, 1} },
21762 .block_erase = spi_block_erase_60,
21763 }, {
21764 .eraseblocks = { { 16384 * 1024, 1} },
21765 .block_erase = spi_block_erase_c7,
21766 }
21767 },
21768 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
21769 .unlock = spi_disable_blockprotect_bp2_srwd,
21770 .write = spi_chip_write_256, /* Multi I/O supported */
21771 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21772 .voltage = {2700, 3600},
21773 },
21774
21775 {
21776 .vendor = "Spansion",
21777 .name = "S25FL132K",
21778 .bustype = BUS_SPI,
21779 .manufacture_id = SPANSION_ID,
21780 .model_id = SPANSION_S25FL132K,
21781 .total_size = 4096,
21782 .page_size = 256,
21783 /* OTP: 768B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
21784 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21785 .tested = TEST_UNTESTED,
21786 .probe = probe_spi_rdid,
21787 .probe_timing = TIMING_ZERO,
21788 .block_erasers =
21789 {
21790 {
21791 .eraseblocks = { {4 * 1024, 1024} },
21792 .block_erase = spi_block_erase_20,
21793 }, {
21794 .eraseblocks = { {64 * 1024, 64} },
21795 .block_erase = spi_block_erase_d8,
21796 }, {
21797 .eraseblocks = { { 4096 * 1024, 1} },
21798 .block_erase = spi_block_erase_60,
21799 }, {
21800 .eraseblocks = { { 4096 * 1024, 1} },
21801 .block_erase = spi_block_erase_c7,
21802 }
21803 },
21804 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
21805 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
21806 .write = spi_chip_write_256,
21807 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21808 .voltage = {2700, 3600},
21809 },
21810
21811 {
21812 .vendor = "Spansion",
21813 .name = "S25FL164K",
21814 .bustype = BUS_SPI,
21815 .manufacture_id = SPANSION_ID,
21816 .model_id = SPANSION_S25FL164K,
21817 .total_size = 8192,
21818 .page_size = 256,
21819 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
21820 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21821 .tested = TEST_OK_PREW,
21822 .probe = probe_spi_rdid,
21823 .probe_timing = TIMING_ZERO,
21824 .block_erasers =
21825 {
21826 {
21827 .eraseblocks = { {4 * 1024, 2048} },
21828 .block_erase = spi_block_erase_20,
21829 }, {
21830 .eraseblocks = { {64 * 1024, 128} },
21831 .block_erase = spi_block_erase_d8,
21832 }, {
21833 .eraseblocks = { { 8192 * 1024, 1} },
21834 .block_erase = spi_block_erase_60,
21835 }, {
21836 .eraseblocks = { { 8192 * 1024, 1} },
21837 .block_erase = spi_block_erase_c7,
21838 }
21839 },
21840 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
21841 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
21842 .write = spi_chip_write_256,
21843 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21844 .voltage = {2700, 3600},
21845 },
21846
21847 {
21848 .vendor = "Spansion",
21849 .name = "S25FL204K",
21850 .bustype = BUS_SPI,
21851 .manufacture_id = SPANSION_ID,
21852 .model_id = SPANSION_S25FL204,
21853 .total_size = 512,
21854 .page_size = 256,
21855 .feature_bits = FEATURE_WRSR_WREN,
21856 .tested = TEST_OK_PR,
21857 .probe = probe_spi_rdid,
21858 .probe_timing = TIMING_ZERO,
21859 .block_erasers =
21860 {
21861 {
21862 .eraseblocks = { {4 * 1024, 128} },
21863 .block_erase = spi_block_erase_20,
21864 }, {
21865 .eraseblocks = { {64 * 1024, 8} },
21866 .block_erase = spi_block_erase_d8,
21867 }, {
21868 .eraseblocks = { { 512 * 1024, 1} },
21869 .block_erase = spi_block_erase_60,
21870 }, {
21871 .eraseblocks = { { 512 * 1024, 1} },
21872 .block_erase = spi_block_erase_c7,
21873 }
21874 },
21875 .printlock = spi_prettyprint_status_register_bp3_srwd,
21876 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
21877 .write = spi_chip_write_256,
21878 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
21879 .voltage = {2700, 3600},
21880 },
21881
21882 {
21883 .vendor = "Spansion",
21884 .name = "S25FL208K",
21885 .bustype = BUS_SPI,
21886 .manufacture_id = SPANSION_ID,
21887 .model_id = SPANSION_S25FL208,
21888 .total_size = 1024,
21889 .page_size = 256,
21890 .feature_bits = FEATURE_WRSR_WREN,
21891 .tested = TEST_OK_PREW,
21892 .probe = probe_spi_rdid,
21893 .probe_timing = TIMING_ZERO,
21894 .block_erasers =
21895 {
21896 {
21897 .eraseblocks = { {4 * 1024, 256} },
21898 .block_erase = spi_block_erase_20,
21899 }, {
21900 .eraseblocks = { {64 * 1024, 16} },
21901 .block_erase = spi_block_erase_d8,
21902 }, {
21903 .eraseblocks = { { 1024 * 1024, 1} },
21904 .block_erase = spi_block_erase_60,
21905 }, {
21906 .eraseblocks = { { 1024 * 1024, 1} },
21907 .block_erase = spi_block_erase_c7,
21908 }
21909 },
21910 .printlock = spi_prettyprint_status_register_bp3_srwd,
21911 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
21912 .write = spi_chip_write_256,
21913 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
21914 .voltage = {2700, 3600},
21915 },
21916
21917 {
21918 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020021919 .name = "S25FL256L",
21920 .bustype = BUS_SPI,
21921 .manufacture_id = SPANSION_ID,
21922 .model_id = SPANSION_S25FL256L,
21923 .total_size = 32768,
21924 .page_size = 256,
21925 /* 4 x 256B Security Region (OTP) */
21926 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP |
21927 FEATURE_4BA_ENTER | FEATURE_4BA_NATIVE,
21928 .tested = TEST_UNTESTED,
21929 .probe = probe_spi_rdid,
21930 .probe_timing = TIMING_ZERO,
21931 .block_erasers =
21932 {
21933 {
21934 .eraseblocks = { {4 * 1024, 8192} },
21935 .block_erase = spi_block_erase_21,
21936 }, {
21937 .eraseblocks = { {4 * 1024, 8192} },
21938 .block_erase = spi_block_erase_20,
21939 }, {
21940 .eraseblocks = { {32 * 1024, 1024} },
21941 .block_erase = spi_block_erase_53,
21942 }, {
21943 .eraseblocks = { {32 * 1024, 1024} },
21944 .block_erase = spi_block_erase_52,
21945 }, {
21946 .eraseblocks = { {64 * 1024, 512} },
21947 .block_erase = spi_block_erase_dc,
21948 }, {
21949 .eraseblocks = { {64 * 1024, 512} },
21950 .block_erase = spi_block_erase_d8,
21951 }, {
21952 .eraseblocks = { {32768 * 1024, 1} },
21953 .block_erase = spi_block_erase_60,
21954 }, {
21955 .eraseblocks = { {32768 * 1024, 1} },
21956 .block_erase = spi_block_erase_c7,
21957 }
21958 },
21959 .printlock = spi_prettyprint_status_register_bp3_srwd,
21960 .unlock = spi_disable_blockprotect_bp3_srwd,
21961 .write = spi_chip_write_256,
21962 .read = spi_chip_read, /* Fast read (0x0B) supported */
21963 .voltage = {2700, 3600},
21964 .reg_bits =
21965 {
21966 /*
21967 * Note: This chip has a read-only Status Register 2 that is not
21968 * counted here. Registers are mapped as follows:
21969 * STATUS1 ... Status Register 1
21970 * STATUS2 ... Configuration Register 1
21971 * STATUS3 ... Configuration Register 2
21972 */
21973 .srp = {STATUS1, 7, RW},
21974 .srl = {STATUS2, 0, RW},
21975 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
21976 .tb = {STATUS1, 6, RW},
21977 .cmp = {STATUS2, 6, RW},
21978 .wps = {STATUS3, 2, RW},
21979 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021980 .wp_write_cfg = spi_wp_write_cfg,
21981 .wp_read_cfg = spi_wp_read_cfg,
21982 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020021983 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021984 .prepare_access = spi_prepare_io,
21985 .finish_access = spi_finish_io,
Nico Huberfffc48d2022-05-28 14:26:06 +020021986 },
21987
21988 {
21989 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100021990 .name = "S25FL256S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
21991 .bustype = BUS_SPI,
21992 .manufacture_id = SPANSION_ID,
21993 .model_id = SPANSION_S25FL256,
21994 .total_size = 32768,
21995 .page_size = 256,
21996 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber9bb8a322022-05-24 15:07:34 +020021997 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
21998 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021999 .tested = TEST_OK_PREW,
22000 .probe = probe_spi_rdid,
22001 .probe_timing = TIMING_ZERO,
22002 .block_erasers =
22003 {
22004 {
22005 /* This chip supports erasing of the 32 so-called "parameter sectors" with
22006 * opcode 0x20. Trying to access an address outside these 4kB blocks does
22007 * have no effect on the memory contents, but sets a flag in the SR.
22008 .eraseblocks = {
22009 {4 * 1024, 32},
22010 {64 * 1024, 254} // inaccessible
22011 },
22012 .block_erase = spi_block_erase_20,
22013 }, { */
22014 .eraseblocks = { { 64 * 1024, 512} },
22015 .block_erase = spi_block_erase_dc,
22016 }, {
22017 .eraseblocks = { { 64 * 1024, 512} },
22018 .block_erase = spi_block_erase_d8,
22019 }, {
22020 .eraseblocks = { { 32768 * 1024, 1} },
22021 .block_erase = spi_block_erase_60,
22022 }, {
22023 .eraseblocks = { { 32768 * 1024, 1} },
22024 .block_erase = spi_block_erase_c7,
22025 }
22026 },
22027 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
22028 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
22029 .write = spi_chip_write_256, /* Multi I/O supported */
22030 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
22031 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020022032 .prepare_access = spi_prepare_io,
22033 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022034 },
22035
22036 {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010022037 .vendor = "Spansion",
22038 .name = "S25FL512S",
22039 .bustype = BUS_SPI,
22040 .manufacture_id = SPANSION_ID,
22041 .model_id = SPANSION_S25FL512,
22042 .total_size = 65536, /* 512 Mb (=> 64 MB)) */
22043 .page_size = 256,
22044 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber26237922022-06-20 19:37:37 +020022045 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
22046 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
22047 .tested = TEST_UNTESTED,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010022048 .probe = probe_spi_rdid,
22049 .probe_timing = TIMING_ZERO,
22050 .block_erasers =
22051 {
22052 {
22053 .eraseblocks = { { 256 * 1024, 256} },
22054 .block_erase = spi_block_erase_dc,
22055 }, {
Nico Huberbb608ff2022-05-24 15:33:26 +020022056 .eraseblocks = { { 256 * 1024, 256} },
22057 .block_erase = spi_block_erase_d8,
22058 }, {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010022059 .eraseblocks = { { 65536 * 1024, 1} },
22060 .block_erase = spi_block_erase_60,
22061 }, {
22062 .eraseblocks = { { 65536 * 1024, 1} },
22063 .block_erase = spi_block_erase_c7,
22064 }
22065 },
22066 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
22067 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
22068 .write = spi_chip_write_256, /* Multi I/O supported, IGNORE for now */
22069 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
22070 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020022071 .prepare_access = spi_prepare_io,
22072 .finish_access = spi_finish_io,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010022073 },
22074
22075 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000022076 .vendor = "SyncMOS/MoselVitelic",
22077 .name = "{F,S,V}29C51001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022078 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022079 .manufacture_id = SYNCMOS_MVC_ID,
22080 .model_id = SM_MVC_29C51001B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022081 .total_size = 128,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022082 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000022083 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022084 .tested = TEST_UNTESTED,
22085 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022086 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000022087 .block_erasers =
22088 {
22089 {
22090 .eraseblocks = { {512, 256} },
22091 .block_erase = erase_sector_jedec,
22092 }, {
22093 .eraseblocks = { {128 * 1024, 1} },
22094 .block_erase = erase_chip_block_jedec,
22095 },
22096 },
Sean Nelson35727f72010-01-28 23:55:12 +000022097 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022098 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022099 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022100 .prepare_access = prepare_memory_access,
22101 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000022102 },
22103
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022104 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000022105 .vendor = "SyncMOS/MoselVitelic",
22106 .name = "{F,S,V}29C51001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022107 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022108 .manufacture_id = SYNCMOS_MVC_ID,
22109 .model_id = SM_MVC_29C51001T,
22110 .total_size = 128,
22111 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000022112 .feature_bits = FEATURE_EITHER_RESET,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022113 .tested = TEST_UNTESTED,
22114 .probe = probe_jedec,
22115 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
22116 .block_erasers =
22117 {
22118 {
22119 .eraseblocks = { {512, 256} },
22120 .block_erase = erase_sector_jedec,
22121 }, {
22122 .eraseblocks = { {128 * 1024, 1} },
22123 .block_erase = erase_chip_block_jedec,
22124 },
22125 },
22126 .write = write_jedec_1,
22127 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022128 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022129 .prepare_access = prepare_memory_access,
22130 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022131 },
22132
22133 {
22134 .vendor = "SyncMOS/MoselVitelic",
22135 .name = "{F,S,V}29C51002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022136 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022137 .manufacture_id = SYNCMOS_MVC_ID,
22138 .model_id = SM_MVC_29C51002B,
22139 .total_size = 256,
22140 .page_size = 512,
22141 .feature_bits = FEATURE_EITHER_RESET,
22142 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022143 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022144 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000022145 .block_erasers =
22146 {
22147 {
22148 .eraseblocks = { {512, 512} },
22149 .block_erase = erase_sector_jedec,
22150 }, {
22151 .eraseblocks = { {256 * 1024, 1} },
22152 .block_erase = erase_chip_block_jedec,
22153 },
22154 },
Sean Nelson35727f72010-01-28 23:55:12 +000022155 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022156 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010022157 .prepare_access = prepare_memory_access,
22158 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000022159 },
22160
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022161 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000022162 .vendor = "SyncMOS/MoselVitelic",
22163 .name = "{F,S,V}29C51002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022164 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022165 .manufacture_id = SYNCMOS_MVC_ID,
22166 .model_id = SM_MVC_29C51002T,
22167 .total_size = 256,
22168 .page_size = 512,
22169 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000022170 .tested = TEST_OK_PREW,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022171 .probe = probe_jedec,
22172 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
22173 .block_erasers =
22174 {
22175 {
22176 .eraseblocks = { {512, 512} },
22177 .block_erase = erase_sector_jedec,
22178 }, {
22179 .eraseblocks = { {256 * 1024, 1} },
22180 .block_erase = erase_chip_block_jedec,
22181 },
22182 },
22183 .write = write_jedec_1,
22184 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010022185 .prepare_access = prepare_memory_access,
22186 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022187 },
22188
22189 {
22190 .vendor = "SyncMOS/MoselVitelic",
22191 .name = "{F,S,V}29C51004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022192 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022193 .manufacture_id = SYNCMOS_MVC_ID,
22194 .model_id = SM_MVC_29C51004B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022195 .total_size = 512,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022196 .page_size = 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000022197 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022198 .tested = TEST_UNTESTED,
22199 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022200 .probe_timing = TIMING_ZERO,
Sean Nelson56358aa2010-01-19 16:08:51 +000022201 .block_erasers =
22202 {
22203 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000022204 .eraseblocks = { {1024, 512} },
22205 .block_erase = erase_sector_jedec,
22206 }, {
22207 .eraseblocks = { {512 * 1024, 1} },
22208 .block_erase = erase_chip_block_jedec,
22209 },
22210 },
22211 .write = write_jedec_1,
22212 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022213 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022214 .prepare_access = prepare_memory_access,
22215 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022216 },
22217
22218 {
22219 .vendor = "SyncMOS/MoselVitelic",
22220 .name = "{F,S,V}29C51004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022221 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022222 .manufacture_id = SYNCMOS_MVC_ID,
22223 .model_id = SM_MVC_29C51004T,
22224 .total_size = 512,
22225 .page_size = 1024,
22226 .feature_bits = FEATURE_EITHER_RESET,
22227 .tested = TEST_UNTESTED,
22228 .probe = probe_jedec,
22229 .probe_timing = TIMING_ZERO,
22230 .block_erasers =
22231 {
22232 {
22233 .eraseblocks = { {1024, 512} },
22234 .block_erase = erase_sector_jedec,
22235 }, {
22236 .eraseblocks = { {512 * 1024, 1} },
22237 .block_erase = erase_chip_block_jedec,
22238 },
22239 },
22240 .write = write_jedec_1,
22241 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022242 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022243 .prepare_access = prepare_memory_access,
22244 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022245 },
22246
22247 {
22248 .vendor = "SyncMOS/MoselVitelic",
22249 .name = "{S,V}29C31004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022250 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022251 .manufacture_id = SYNCMOS_MVC_ID,
22252 .model_id = SM_MVC_29C31004B,
22253 .total_size = 512,
22254 .page_size = 1024,
22255 .feature_bits = FEATURE_EITHER_RESET,
22256 .tested = TEST_UNTESTED,
22257 .probe = probe_jedec,
22258 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
22259 .block_erasers =
22260 {
22261 {
22262 .eraseblocks = { {1024, 512} },
22263 .block_erase = erase_sector_jedec,
22264 }, {
22265 .eraseblocks = { {512 * 1024, 1} },
22266 .block_erase = erase_chip_block_jedec,
22267 },
22268 },
22269 .write = write_jedec_1,
22270 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022271 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010022272 .prepare_access = prepare_memory_access,
22273 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022274 },
22275
22276 {
22277 .vendor = "SyncMOS/MoselVitelic",
22278 .name = "{S,V}29C31004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022279 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022280 .manufacture_id = SYNCMOS_MVC_ID,
22281 .model_id = SM_MVC_29C31004T,
22282 .total_size = 512,
22283 .page_size = 1024,
22284 .feature_bits = FEATURE_EITHER_RESET,
22285 .tested = TEST_UNTESTED,
22286 .probe = probe_jedec,
22287 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
22288 .block_erasers =
22289 {
22290 {
22291 .eraseblocks = { {1024, 512} },
Sean Nelson56358aa2010-01-19 16:08:51 +000022292 .block_erase = erase_sector_jedec,
22293 }, {
22294 .eraseblocks = { {512 * 1024, 1} },
22295 .block_erase = erase_chip_block_jedec,
22296 },
22297 },
Sean Nelson35727f72010-01-28 23:55:12 +000022298 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022299 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022300 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010022301 .prepare_access = prepare_memory_access,
22302 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000022303 },
22304
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022305 {
Uwe Hermanna106d152009-05-27 23:17:40 +000022306 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022307 .name = "TMS29F002RB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022308 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022309 .manufacture_id = TI_OLD_ID,
22310 .model_id = TI_TMS29F002RB,
22311 .total_size = 256,
22312 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000022313 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022314 .tested = TEST_UNTESTED,
22315 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022316 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000022317 .block_erasers =
22318 {
22319 {
22320 .eraseblocks = {
22321 {16 * 1024, 1},
22322 {8 * 1024, 2},
22323 {32 * 1024, 1},
22324 {64 * 1024, 3},
22325 },
22326 .block_erase = erase_sector_jedec,
22327 }, {
22328 .eraseblocks = { {256 * 1024, 1} },
22329 .block_erase = erase_chip_block_jedec,
22330 },
22331 },
Sean Nelson35727f72010-01-28 23:55:12 +000022332 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022333 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022334 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022335 .prepare_access = prepare_memory_access,
22336 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022337 },
22338
22339 {
Uwe Hermanna106d152009-05-27 23:17:40 +000022340 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022341 .name = "TMS29F002RT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022342 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022343 .manufacture_id = TI_OLD_ID,
22344 .model_id = TI_TMS29F002RT,
22345 .total_size = 256,
22346 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000022347 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022348 .tested = TEST_UNTESTED,
22349 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022350 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000022351 .block_erasers =
22352 {
22353 {
22354 .eraseblocks = {
22355 {64 * 1024, 3},
22356 {32 * 1024, 1},
22357 {8 * 1024, 2},
22358 {16 * 1024, 1},
22359 },
22360 .block_erase = erase_sector_jedec,
22361 }, {
22362 .eraseblocks = { {256 * 1024, 1} },
22363 .block_erase = erase_chip_block_jedec,
22364 },
22365 },
Sean Nelson35727f72010-01-28 23:55:12 +000022366 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022367 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022368 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022369 .prepare_access = prepare_memory_access,
22370 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022371 },
22372
22373 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022374 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022375 .name = "W25P16",
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022376 .bustype = BUS_SPI,
22377 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022378 .model_id = WINBOND_NEX_W25P16,
22379 .total_size = 2048,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022380 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022381 .feature_bits = FEATURE_WRSR_WREN,
22382 .tested = TEST_UNTESTED,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022383 .probe = probe_spi_rdid,
22384 .probe_timing = TIMING_ZERO,
22385 .block_erasers =
22386 {
22387 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100022388 .eraseblocks = { {64 * 1024, 32} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022389 .block_erase = spi_block_erase_d8,
22390 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100022391 .eraseblocks = { {2048 * 1024, 1} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022392 .block_erase = spi_block_erase_c7,
22393 }
22394 },
22395 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22396 .unlock = spi_disable_blockprotect,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022397 .write = spi_chip_write_256,
22398 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022399 .voltage = {2700, 3600},
22400 },
22401
22402 {
22403 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022404 .name = "W25P32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022405 .bustype = BUS_SPI,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022406 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022407 .model_id = WINBOND_NEX_W25P32,
22408 .total_size = 4096,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022409 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022410 .feature_bits = FEATURE_WRSR_WREN,
22411 .tested = TEST_UNTESTED,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022412 .probe = probe_spi_rdid,
22413 .probe_timing = TIMING_ZERO,
22414 .block_erasers =
22415 {
22416 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100022417 .eraseblocks = { {64 * 1024, 64} },
22418 .block_erase = spi_block_erase_d8,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022419 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100022420 .eraseblocks = { {4096 * 1024, 1} },
22421 .block_erase = spi_block_erase_c7,
22422 }
22423 },
22424 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22425 .unlock = spi_disable_blockprotect,
22426 .write = spi_chip_write_256,
22427 .read = spi_chip_read, /* Fast read (0x0B) supported */
22428 .voltage = {2700, 3600},
22429 },
22430
22431 {
22432 .vendor = "Winbond",
22433 .name = "W25P80",
22434 .bustype = BUS_SPI,
22435 .manufacture_id = WINBOND_NEX_ID,
22436 .model_id = WINBOND_NEX_W25P80,
22437 .total_size = 1024,
22438 .page_size = 256,
22439 .feature_bits = FEATURE_WRSR_WREN,
22440 .tested = TEST_UNTESTED,
22441 .probe = probe_spi_rdid,
22442 .probe_timing = TIMING_ZERO,
22443 .block_erasers =
22444 {
22445 {
Rudolf Marekce1c7982010-04-20 19:34:31 +000022446 .eraseblocks = { {64 * 1024, 16} },
22447 .block_erase = spi_block_erase_d8,
22448 }, {
22449 .eraseblocks = { {1024 * 1024, 1} },
Rudolf Marekce1c7982010-04-20 19:34:31 +000022450 .block_erase = spi_block_erase_c7,
22451 }
22452 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000022453 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000022454 .unlock = spi_disable_blockprotect,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022455 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022456 .read = spi_chip_read, /* Fast read (0x0B) supported */
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022457 .voltage = {2700, 3600},
David Hendricksc4acec92010-06-24 11:39:57 +000022458 },
22459
22460 {
22461 .vendor = "Winbond",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022462 .name = "W25Q128.V",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022463 .bustype = BUS_SPI,
Antony Rheneus0fbba982011-05-26 14:28:51 +000022464 .manufacture_id = WINBOND_NEX_ID,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022465 .model_id = WINBOND_NEX_W25Q128_V,
Antony Rheneus0fbba982011-05-26 14:28:51 +000022466 .total_size = 16384,
22467 .page_size = 256,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022468 /* supports SFDP */
22469 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022470 /* QPI: only FV & JV..M versions */
Nico Huber98970632024-08-30 02:14:05 +020022471 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020022472 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Edward O'Callaghana97e3532022-12-16 15:41:05 +110022473 .tested = TEST_OK_PREWB,
Antony Rheneus0fbba982011-05-26 14:28:51 +000022474 .probe = probe_spi_rdid,
22475 .probe_timing = TIMING_ZERO,
22476 .block_erasers =
22477 {
22478 {
22479 .eraseblocks = { {4 * 1024, 4096} },
22480 .block_erase = spi_block_erase_20,
22481 }, {
22482 .eraseblocks = { {32 * 1024, 512} },
22483 .block_erase = spi_block_erase_52,
22484 }, {
22485 .eraseblocks = { {64 * 1024, 256} },
22486 .block_erase = spi_block_erase_d8,
22487 }, {
22488 .eraseblocks = { {16 * 1024 * 1024, 1} },
22489 .block_erase = spi_block_erase_60,
22490 }, {
22491 .eraseblocks = { {16 * 1024 * 1024, 1} },
22492 .block_erase = spi_block_erase_c7,
22493 }
22494 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000022495 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Antony Rheneus0fbba982011-05-26 14:28:51 +000022496 .unlock = spi_disable_blockprotect,
22497 .write = spi_chip_write_256,
22498 .read = spi_chip_read,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022499 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020022500 /* FIXME: Older versions (e.g. 25Q128BV) use WRSR_EXT and have no WPS. */
22501 .reg_bits =
22502 {
Nico Huber2133f592024-01-06 18:30:01 +010022503 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020022504 .srp = {STATUS1, 7, RW},
22505 .srl = {STATUS2, 0, RW},
22506 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22507 .tb = {STATUS1, 5, RW},
22508 .sec = {STATUS1, 6, RW},
22509 .cmp = {STATUS2, 6, RW},
22510 .wps = {STATUS3, 2, RW},
22511 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022512 .wp_write_cfg = spi_wp_write_cfg,
22513 .wp_read_cfg = spi_wp_read_cfg,
22514 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020022515 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022516 .prepare_access = spi_prepare_io,
22517 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022518 },
22519
22520 {
22521 .vendor = "Winbond",
Patrick Rudolph34323492018-10-04 14:59:40 +020022522 .name = "W25Q128.V..M",
22523 .bustype = BUS_SPI,
22524 .manufacture_id = WINBOND_NEX_ID,
22525 .model_id = WINBOND_NEX_W25Q128_V_M,
22526 .total_size = 16384,
22527 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010022528 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
22529 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030022530 .tested = TEST_OK_PREWB,
Patrick Rudolph34323492018-10-04 14:59:40 +020022531 .probe = probe_spi_rdid,
22532 .probe_timing = TIMING_ZERO,
22533 .block_erasers =
22534 {
22535 {
22536 .eraseblocks = { {4 * 1024, 4096} },
22537 .block_erase = spi_block_erase_20,
22538 }, {
22539 .eraseblocks = { {32 * 1024, 512} },
22540 .block_erase = spi_block_erase_52,
22541 }, {
22542 .eraseblocks = { {64 * 1024, 256} },
22543 .block_erase = spi_block_erase_d8,
22544 }, {
22545 .eraseblocks = { {16 * 1024 * 1024, 1} },
22546 .block_erase = spi_block_erase_60,
22547 }, {
22548 .eraseblocks = { {16 * 1024 * 1024, 1} },
22549 .block_erase = spi_block_erase_c7,
22550 }
22551 },
Alan Greena1fc01d2019-09-23 17:12:44 +100022552 .printlock = spi_prettyprint_status_register_plain,
Patrick Rudolph34323492018-10-04 14:59:40 +020022553 .unlock = spi_disable_blockprotect,
22554 .write = spi_chip_write_256,
22555 .read = spi_chip_read,
22556 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022557 .reg_bits =
22558 {
Nico Huber2133f592024-01-06 18:30:01 +010022559 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022560 .srp = {STATUS1, 7, RW},
22561 .srl = {STATUS2, 0, RW},
22562 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22563 .tb = {STATUS1, 5, RW},
22564 .sec = {STATUS1, 6, RW},
22565 .cmp = {STATUS2, 6, RW},
22566 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022567 .wp_write_cfg = spi_wp_write_cfg,
22568 .wp_read_cfg = spi_wp_read_cfg,
22569 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022570 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022571 .prepare_access = spi_prepare_io,
22572 .finish_access = spi_finish_io,
Patrick Rudolph34323492018-10-04 14:59:40 +020022573 },
22574
22575 {
22576 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022577 .name = "W25Q128.W",
22578 .bustype = BUS_SPI,
22579 .manufacture_id = WINBOND_NEX_ID,
22580 .model_id = WINBOND_NEX_W25Q128_W,
22581 .total_size = 16384,
22582 .page_size = 256,
22583 /* supports SFDP */
22584 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010022585 /* QPI: only FW & JW..M versions */
22586 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022587 .tested = TEST_OK_PREW,
22588 .probe = probe_spi_rdid,
22589 .probe_timing = TIMING_ZERO,
22590 .block_erasers =
22591 {
22592 {
22593 .eraseblocks = { {4 * 1024, 4096} },
22594 .block_erase = spi_block_erase_20,
22595 }, {
22596 .eraseblocks = { {32 * 1024, 512} },
22597 .block_erase = spi_block_erase_52,
22598 }, {
22599 .eraseblocks = { {64 * 1024, 256} },
22600 .block_erase = spi_block_erase_d8,
22601 }, {
22602 .eraseblocks = { {16 * 1024 * 1024, 1} },
22603 .block_erase = spi_block_erase_60,
22604 }, {
22605 .eraseblocks = { {16 * 1024 * 1024, 1} },
22606 .block_erase = spi_block_erase_c7,
22607 }
22608 },
22609 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22610 .unlock = spi_disable_blockprotect,
22611 .write = spi_chip_write_256,
22612 .read = spi_chip_read,
22613 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022614 .reg_bits =
22615 {
Nico Huber2133f592024-01-06 18:30:01 +010022616 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022617 .srp = {STATUS1, 7, RW},
22618 .srl = {STATUS2, 0, RW},
22619 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22620 .tb = {STATUS1, 5, RW},
22621 .sec = {STATUS1, 6, RW},
22622 .cmp = {STATUS2, 6, RW},
22623 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022624 .wp_write_cfg = spi_wp_write_cfg,
22625 .wp_read_cfg = spi_wp_read_cfg,
22626 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022627 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022628 .prepare_access = spi_prepare_io,
22629 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022630 },
22631
22632 {
22633 .vendor = "Winbond",
Peichao Wang1a119492019-11-11 15:26:41 +080022634 .name = "W25Q128.JW.DTR",
22635 .bustype = BUS_SPI,
22636 .manufacture_id = WINBOND_NEX_ID,
22637 .model_id = WINBOND_NEX_W25Q128_DTR,
22638 .total_size = 16384,
22639 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010022640 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
22641 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Peichao Wang1a119492019-11-11 15:26:41 +080022642 .tested = TEST_OK_PREW,
22643 .probe = probe_spi_rdid,
22644 .probe_timing = TIMING_ZERO,
22645 .block_erasers =
22646 {
22647 {
22648 .eraseblocks = { {4 * 1024, 4096} },
22649 .block_erase = spi_block_erase_20,
22650 }, {
22651 .eraseblocks = { {32 * 1024, 512} },
22652 .block_erase = spi_block_erase_52,
22653 }, {
22654 .eraseblocks = { {64 * 1024, 256} },
22655 .block_erase = spi_block_erase_d8,
22656 }, {
22657 .eraseblocks = { {16 * 1024 * 1024, 1} },
22658 .block_erase = spi_block_erase_60,
22659 }, {
22660 .eraseblocks = { {16 * 1024 * 1024, 1} },
22661 .block_erase = spi_block_erase_c7,
22662 }
22663 },
22664 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22665 .unlock = spi_disable_blockprotect,
22666 .write = spi_chip_write_256,
22667 .read = spi_chip_read,
22668 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022669 .reg_bits =
22670 {
Nico Huber2133f592024-01-06 18:30:01 +010022671 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022672 .srp = {STATUS1, 7, RW},
22673 .srl = {STATUS2, 0, RW},
22674 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22675 .tb = {STATUS1, 5, RW},
22676 .sec = {STATUS1, 6, RW},
22677 .cmp = {STATUS2, 6, RW},
22678 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022679 .wp_write_cfg = spi_wp_write_cfg,
22680 .wp_read_cfg = spi_wp_read_cfg,
22681 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022682 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022683 .prepare_access = spi_prepare_io,
22684 .finish_access = spi_finish_io,
Peichao Wang1a119492019-11-11 15:26:41 +080022685 },
22686
22687 {
22688 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022689 .name = "W25Q16.V",
22690 .bustype = BUS_SPI,
22691 .manufacture_id = WINBOND_NEX_ID,
22692 .model_id = WINBOND_NEX_W25Q16_V,
22693 .total_size = 2048,
22694 .page_size = 256,
22695 /* supports SFDP */
22696 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022697 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022698 .tested = TEST_OK_PREW,
22699 .probe = probe_spi_rdid,
22700 .probe_timing = TIMING_ZERO,
22701 .block_erasers =
22702 {
22703 {
22704 .eraseblocks = { {4 * 1024, 512} },
22705 .block_erase = spi_block_erase_20,
22706 }, {
22707 .eraseblocks = { {32 * 1024, 64} },
22708 .block_erase = spi_block_erase_52,
22709 }, {
22710 .eraseblocks = { {64 * 1024, 32} },
22711 .block_erase = spi_block_erase_d8,
22712 }, {
22713 .eraseblocks = { {2 * 1024 * 1024, 1} },
22714 .block_erase = spi_block_erase_60,
22715 }, {
22716 .eraseblocks = { {2 * 1024 * 1024, 1} },
22717 .block_erase = spi_block_erase_c7,
22718 }
22719 },
Nico Huber2133f592024-01-06 18:30:01 +010022720 .reg_bits =
22721 {
22722 .qe = {STATUS2, 1, RW},
22723 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100022724 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22725 .unlock = spi_disable_blockprotect,
22726 .write = spi_chip_write_256,
22727 .read = spi_chip_read,
22728 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020022729 .prepare_access = spi_prepare_io,
22730 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022731 },
22732
22733 {
22734 .vendor = "Winbond",
Nico Huberfea6e162024-10-20 23:11:57 +020022735 .name = "W25Q16JV_M",
22736 .bustype = BUS_SPI,
22737 .manufacture_id = WINBOND_NEX_ID,
22738 .model_id = WINBOND_NEX_W25Q16JV_M,
22739 .total_size = 2048,
22740 .page_size = 256,
22741 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
22742 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
22743 FEATURE_QPI_SRP,
22744 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
22745 .tested = TEST_UNTESTED,
22746 .probe = probe_spi_rdid,
22747 .probe_timing = TIMING_ZERO,
22748 .block_erasers =
22749 {
22750 {
22751 .eraseblocks = { {4 * 1024, 512} },
22752 .block_erase = spi_block_erase_20,
22753 }, {
22754 .eraseblocks = { {32 * 1024, 64} },
22755 .block_erase = spi_block_erase_52,
22756 }, {
22757 .eraseblocks = { {64 * 1024, 32} },
22758 .block_erase = spi_block_erase_d8,
22759 }, {
22760 .eraseblocks = { {2048 * 1024, 1} },
22761 .block_erase = spi_block_erase_60,
22762 }, {
22763 .eraseblocks = { {2048 * 1024, 1} },
22764 .block_erase = spi_block_erase_c7,
22765 },
22766 },
22767 .reg_bits =
22768 {
22769 .qe = {STATUS2, 1, RW},
22770 .srp = {STATUS1, 7, RW},
22771 .srl = {STATUS2, 0, RW},
22772 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22773 .tb = {STATUS1, 5, RW},
22774 .sec = {STATUS1, 6, RW},
22775 .cmp = {STATUS2, 6, RW},
22776 .wps = {STATUS3, 2, RW},
22777 },
22778 .wp_write_cfg = spi_wp_write_cfg,
22779 .wp_read_cfg = spi_wp_read_cfg,
22780 .wp_get_ranges = spi_wp_get_available_ranges,
22781 .decode_range = decode_range_spi25,
22782 .printlock = spi_prettyprint_status_register_bp4_srwd,
22783 .unlock = spi_disable_blockprotect_bp4_srwd,
22784 .write = spi_chip_write_256,
22785 .read = spi_chip_read,
22786 .voltage = {2700, 3600},
22787 .prepare_access = spi_prepare_io,
22788 .finish_access = spi_finish_io,
22789 },
22790
22791 {
22792 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022793 .name = "W25Q16.W",
22794 .bustype = BUS_SPI,
22795 .manufacture_id = WINBOND_NEX_ID,
22796 .model_id = WINBOND_NEX_W25Q16_W,
22797 .total_size = 2048,
22798 .page_size = 256,
22799 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010022800 /* QPI: only FW & JW..M versions .qpi_read_params = { 2, 4, 6, 8 } */
22801 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022802 .tested = TEST_UNTESTED,
22803 .probe = probe_spi_rdid,
22804 .probe_timing = TIMING_ZERO,
22805 .block_erasers =
22806 {
22807 {
22808 .eraseblocks = { {4 * 1024, 512} },
22809 .block_erase = spi_block_erase_20,
22810 }, {
22811 .eraseblocks = { {32 * 1024, 64} },
22812 .block_erase = spi_block_erase_52,
22813 }, {
22814 .eraseblocks = { {64 * 1024, 32} },
22815 .block_erase = spi_block_erase_d8,
22816 }, {
22817 .eraseblocks = { {2 * 1024 * 1024, 1} },
22818 .block_erase = spi_block_erase_60,
22819 }, {
22820 .eraseblocks = { {2 * 1024 * 1024, 1} },
22821 .block_erase = spi_block_erase_c7,
22822 }
22823 },
Nico Huber2133f592024-01-06 18:30:01 +010022824 .reg_bits =
22825 {
22826 .qe = {STATUS2, 1, RW},
22827 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100022828 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22829 .unlock = spi_disable_blockprotect,
22830 .write = spi_chip_write_256,
22831 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010022832 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020022833 .prepare_access = spi_prepare_io,
22834 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022835 },
22836
22837 {
22838 .vendor = "Winbond",
22839 .name = "W25Q20.W",
22840 .bustype = BUS_SPI,
22841 .manufacture_id = WINBOND_NEX_ID,
22842 .model_id = WINBOND_NEX_W25Q20_W,
22843 .total_size = 256,
22844 .page_size = 256,
22845 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022846 /* W25Q20EW: FEATURE_WRSR2 */
22847 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022848 .tested = TEST_UNTESTED,
22849 .probe = probe_spi_rdid,
22850 .probe_timing = TIMING_ZERO,
22851 .block_erasers =
22852 {
22853 {
22854 .eraseblocks = { {4 * 1024, 64} },
22855 .block_erase = spi_block_erase_20,
22856 }, {
22857 .eraseblocks = { {32 * 1024, 8} },
22858 .block_erase = spi_block_erase_52,
22859 }, {
22860 .eraseblocks = { {64 * 1024, 4} },
22861 .block_erase = spi_block_erase_d8,
22862 }, {
22863 .eraseblocks = { {256 * 1024, 1} },
22864 .block_erase = spi_block_erase_60,
22865 }, {
22866 .eraseblocks = { {256 * 1024, 1} },
22867 .block_erase = spi_block_erase_c7,
22868 }
22869 },
Nico Huber2133f592024-01-06 18:30:01 +010022870 .reg_bits =
22871 {
22872 .qe = {STATUS2, 1, RW},
22873 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100022874 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22875 .unlock = spi_disable_blockprotect,
22876 .write = spi_chip_write_256,
22877 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010022878 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020022879 .prepare_access = spi_prepare_io,
22880 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022881 },
22882
22883 {
22884 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020022885 .name = "W25Q256FV",
Boris Baykovaa6c3742016-06-11 18:29:01 +020022886 .bustype = BUS_SPI,
22887 .manufacture_id = WINBOND_NEX_ID,
22888 .model_id = WINBOND_NEX_W25Q256_V,
22889 .total_size = 32768,
22890 .page_size = 256,
22891 /* supports SFDP */
22892 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022893 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
22894 FEATURE_4BA_ENTER_WREN | FEATURE_4BA_EAR_C5C8 |
22895 FEATURE_4BA_READ | FEATURE_4BA_FAST_READ |
22896 FEATURE_QPI_SRP,
22897 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons3130cbd2018-09-30 19:32:30 +020022898 .tested = TEST_OK_PREW,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022899 .probe = probe_spi_rdid,
22900 .probe_timing = TIMING_ZERO,
22901 .block_erasers =
22902 {
22903 {
22904 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7a077222017-10-14 18:18:30 +020022905 .block_erase = spi_block_erase_20,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022906 }, {
22907 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber7a077222017-10-14 18:18:30 +020022908 .block_erase = spi_block_erase_52,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022909 }, {
22910 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7a077222017-10-14 18:18:30 +020022911 .block_erase = spi_block_erase_d8,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022912 }, {
22913 .eraseblocks = { {32 * 1024 * 1024, 1} },
22914 .block_erase = spi_block_erase_60,
22915 }, {
22916 .eraseblocks = { {32 * 1024 * 1024, 1} },
22917 .block_erase = spi_block_erase_c7,
22918 }
22919 },
22920 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22921 .unlock = spi_disable_blockprotect,
22922 .write = spi_chip_write_256,
22923 .read = spi_chip_read,
22924 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022925 .reg_bits =
22926 {
Nico Huber2133f592024-01-06 18:30:01 +010022927 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022928 .srp = {STATUS1, 7, RW},
22929 .srl = {STATUS2, 0, RW},
22930 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
22931 .tb = {STATUS1, 6, RW},
22932 .cmp = {STATUS2, 6, RW},
22933 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022934 .wp_write_cfg = spi_wp_write_cfg,
22935 .wp_read_cfg = spi_wp_read_cfg,
22936 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022937 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022938 .prepare_access = spi_prepare_io,
22939 .finish_access = spi_finish_io,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022940 },
22941
22942 {
22943 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020022944 .name = "W25Q256JV_Q",
22945 .bustype = BUS_SPI,
22946 .manufacture_id = WINBOND_NEX_ID,
22947 .model_id = WINBOND_NEX_W25Q256_V,
22948 .total_size = 32768,
22949 .page_size = 256,
22950 /* supports SFDP */
22951 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022952 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Nico Huberddfbbe82023-12-21 16:31:27 +010022953 .tested = TEST_OK_PREW,
Nico Huber5215eab2022-05-23 15:13:07 +020022954 .probe = probe_spi_rdid,
22955 .probe_timing = TIMING_ZERO,
22956 .block_erasers =
22957 {
22958 {
22959 .eraseblocks = { {4 * 1024, 8192} },
22960 .block_erase = spi_block_erase_21,
22961 }, {
22962 .eraseblocks = { {4 * 1024, 8192} },
22963 .block_erase = spi_block_erase_20,
22964 }, {
22965 .eraseblocks = { {32 * 1024, 1024} },
22966 .block_erase = spi_block_erase_52,
22967 }, {
22968 .eraseblocks = { {64 * 1024, 512} },
22969 .block_erase = spi_block_erase_dc,
22970 }, {
22971 .eraseblocks = { {64 * 1024, 512} },
22972 .block_erase = spi_block_erase_d8,
22973 }, {
22974 .eraseblocks = { {32 * 1024 * 1024, 1} },
22975 .block_erase = spi_block_erase_60,
22976 }, {
22977 .eraseblocks = { {32 * 1024 * 1024, 1} },
22978 .block_erase = spi_block_erase_c7,
22979 }
22980 },
22981 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22982 .unlock = spi_disable_blockprotect,
22983 .write = spi_chip_write_256,
22984 .read = spi_chip_read,
22985 .voltage = {2700, 3600},
22986 .reg_bits =
22987 {
Nico Huber2133f592024-01-06 18:30:01 +010022988 .qe = {STATUS2, 1, RW},
Nico Huber5215eab2022-05-23 15:13:07 +020022989 .srp = {STATUS1, 7, RW},
22990 .srl = {STATUS2, 0, RW},
22991 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
22992 .tb = {STATUS1, 6, RW},
22993 .cmp = {STATUS2, 6, RW},
22994 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022995 .wp_write_cfg = spi_wp_write_cfg,
22996 .wp_read_cfg = spi_wp_read_cfg,
22997 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber5215eab2022-05-23 15:13:07 +020022998 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022999 .prepare_access = spi_prepare_io,
23000 .finish_access = spi_finish_io,
Nico Huber5215eab2022-05-23 15:13:07 +020023001 },
23002
23003 {
23004 .vendor = "Winbond",
David Hendricks49876792018-10-27 20:19:42 +000023005 .name = "W25Q256JV_M",
23006 .bustype = BUS_SPI,
23007 .manufacture_id = WINBOND_NEX_ID,
23008 .model_id = WINBOND_NEX_W25Q256JV_M,
23009 .total_size = 32768,
23010 .page_size = 256,
23011 /* supports SFDP */
23012 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023013 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
23014 FEATURE_4BA | FEATURE_QPI_SRP,
23015 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
David Hendricks49876792018-10-27 20:19:42 +000023016 .tested = TEST_OK_PREW,
23017 .probe = probe_spi_rdid,
23018 .probe_timing = TIMING_ZERO,
23019 .block_erasers =
23020 {
23021 {
23022 .eraseblocks = { {4 * 1024, 8192} },
23023 .block_erase = spi_block_erase_21,
23024 }, {
23025 .eraseblocks = { {4 * 1024, 8192} },
23026 .block_erase = spi_block_erase_20,
23027 }, {
23028 .eraseblocks = { {32 * 1024, 1024} },
23029 .block_erase = spi_block_erase_52,
23030 }, {
23031 .eraseblocks = { {64 * 1024, 512} },
23032 .block_erase = spi_block_erase_dc,
23033 }, {
23034 .eraseblocks = { {64 * 1024, 512} },
23035 .block_erase = spi_block_erase_d8,
23036 }, {
23037 .eraseblocks = { {32 * 1024 * 1024, 1} },
23038 .block_erase = spi_block_erase_60,
23039 }, {
23040 .eraseblocks = { {32 * 1024 * 1024, 1} },
23041 .block_erase = spi_block_erase_c7,
23042 }
23043 },
23044 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23045 .unlock = spi_disable_blockprotect,
23046 .write = spi_chip_write_256,
23047 .read = spi_chip_read,
23048 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110023049 .reg_bits =
23050 {
Nico Huber2133f592024-01-06 18:30:01 +010023051 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110023052 .srp = {STATUS1, 7, RW},
23053 .srl = {STATUS2, 0, RW},
23054 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
23055 .tb = {STATUS1, 6, RW},
23056 .cmp = {STATUS2, 6, RW},
23057 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023058 .wp_write_cfg = spi_wp_write_cfg,
23059 .wp_read_cfg = spi_wp_read_cfg,
23060 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110023061 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023062 .prepare_access = spi_prepare_io,
23063 .finish_access = spi_finish_io,
David Hendricks49876792018-10-27 20:19:42 +000023064 },
23065
23066 {
23067 .vendor = "Winbond",
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020023068 .name = "W25Q256JW",
el-coderon01209852020-04-29 12:12:53 +020023069 .bustype = BUS_SPI,
23070 .manufacture_id = WINBOND_NEX_ID,
23071 .model_id = WINBOND_NEX_W25Q256_W,
23072 .total_size = 32768,
23073 .page_size = 256,
23074 /* supports SFDP */
23075 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023076 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
23077 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
el-coderon01209852020-04-29 12:12:53 +020023078 .tested = TEST_OK_PREW,
23079 .probe = probe_spi_rdid,
23080 .probe_timing = TIMING_ZERO,
23081 .block_erasers =
23082 {
23083 {
23084 .eraseblocks = { {4 * 1024, 8192} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020023085 .block_erase = spi_block_erase_21,
23086 }, {
23087 .eraseblocks = { {4 * 1024, 8192} },
el-coderon01209852020-04-29 12:12:53 +020023088 .block_erase = spi_block_erase_20,
23089 }, {
23090 .eraseblocks = { {32 * 1024, 1024} },
23091 .block_erase = spi_block_erase_52,
23092 }, {
23093 .eraseblocks = { {64 * 1024, 512} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020023094 .block_erase = spi_block_erase_dc,
23095 }, {
23096 .eraseblocks = { {64 * 1024, 512} },
el-coderon01209852020-04-29 12:12:53 +020023097 .block_erase = spi_block_erase_d8,
23098 }, {
23099 .eraseblocks = { {32 * 1024 * 1024, 1} },
23100 .block_erase = spi_block_erase_60,
23101 }, {
23102 .eraseblocks = { {32 * 1024 * 1024, 1} },
23103 .block_erase = spi_block_erase_c7,
23104 }
23105 },
Nico Huber2133f592024-01-06 18:30:01 +010023106 .reg_bits =
23107 {
23108 .qe = {STATUS2, 1, RW},
23109 },
el-coderon01209852020-04-29 12:12:53 +020023110 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23111 .unlock = spi_disable_blockprotect,
23112 .write = spi_chip_write_256,
23113 .read = spi_chip_read,
23114 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020023115 .prepare_access = spi_prepare_io,
23116 .finish_access = spi_finish_io,
el-coderon01209852020-04-29 12:12:53 +020023117 },
23118
23119 {
23120 .vendor = "Winbond",
David Hendricks31532602020-08-16 17:14:56 -070023121 .name = "W25Q256JW_DTR",
23122 .bustype = BUS_SPI,
23123 .manufacture_id = WINBOND_NEX_ID,
23124 .model_id = WINBOND_NEX_W25Q256_DTR,
23125 .total_size = 32768,
23126 .page_size = 256,
23127 /* supports SFDP */
23128 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023129 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
23130 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
23131 .dummy_cycles =
23132 {
23133 .qpi_read_params = {
23134 2, /* Datasheet Rev.K says 4 is the default, though.
23135 Will assume that the text is wrong, if not,
23136 we'll know why it doesn't work. */
23137 4, 6, 8
23138 },
23139 },
Kapil Porwal111c3802022-12-09 19:41:27 +053023140 .tested = TEST_OK_PREWB,
David Hendricks31532602020-08-16 17:14:56 -070023141 .probe = probe_spi_rdid,
23142 .probe_timing = TIMING_ZERO,
23143 .block_erasers =
23144 {
23145 {
23146 .eraseblocks = { {4 * 1024, 8192} },
23147 .block_erase = spi_block_erase_21,
23148 }, {
23149 .eraseblocks = { {4 * 1024, 8192} },
23150 .block_erase = spi_block_erase_20,
23151 }, {
23152 .eraseblocks = { {32 * 1024, 1024} },
23153 .block_erase = spi_block_erase_52,
23154 }, {
23155 .eraseblocks = { {64 * 1024, 512} },
23156 .block_erase = spi_block_erase_dc,
23157 }, {
23158 .eraseblocks = { {64 * 1024, 512} },
23159 .block_erase = spi_block_erase_d8,
23160 }, {
23161 .eraseblocks = { {32 * 1024 * 1024, 1} },
23162 .block_erase = spi_block_erase_60,
23163 }, {
23164 .eraseblocks = { {32 * 1024 * 1024, 1} },
23165 .block_erase = spi_block_erase_c7,
23166 }
23167 },
23168 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23169 .unlock = spi_disable_blockprotect,
23170 .write = spi_chip_write_256,
23171 .read = spi_chip_read,
23172 .voltage = {1700, 1950},
Kapil Porwal111c3802022-12-09 19:41:27 +053023173 .reg_bits =
23174 {
Nico Huber2133f592024-01-06 18:30:01 +010023175 .qe = {STATUS2, 1, RW},
Kapil Porwal111c3802022-12-09 19:41:27 +053023176 .srp = {STATUS1, 7, RW},
23177 .srl = {STATUS2, 0, RW},
23178 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
23179 .tb = {STATUS1, 6, RW},
23180 .cmp = {STATUS2, 6, RW},
23181 .wps = {STATUS3, 2, RW},
23182 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023183 .wp_write_cfg = spi_wp_write_cfg,
23184 .wp_read_cfg = spi_wp_read_cfg,
23185 .wp_get_ranges = spi_wp_get_available_ranges,
Kapil Porwal111c3802022-12-09 19:41:27 +053023186 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023187 .prepare_access = spi_prepare_io,
23188 .finish_access = spi_finish_io,
David Hendricks31532602020-08-16 17:14:56 -070023189 },
23190
23191 {
23192 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023193 .name = "W25Q32BV/W25Q32CV/W25Q32DV",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023194 .bustype = BUS_SPI,
23195 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023196 .model_id = WINBOND_NEX_W25Q32_V,
23197 .total_size = 4096,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023198 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023199 /* supports SFDP */
23200 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023201 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023202 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023203 .probe = probe_spi_rdid,
23204 .probe_timing = TIMING_ZERO,
23205 .block_erasers =
23206 {
23207 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023208 .eraseblocks = { {4 * 1024, 1024} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023209 .block_erase = spi_block_erase_20,
23210 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023211 .eraseblocks = { {32 * 1024, 128} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023212 .block_erase = spi_block_erase_52,
23213 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023214 .eraseblocks = { {64 * 1024, 64} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023215 .block_erase = spi_block_erase_d8,
23216 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023217 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023218 .block_erase = spi_block_erase_60,
23219 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023220 .eraseblocks = { {4 * 1024 * 1024, 1} },
23221 .block_erase = spi_block_erase_c7,
23222 }
23223 },
23224 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23225 .unlock = spi_disable_blockprotect,
23226 .write = spi_chip_write_256,
23227 .read = spi_chip_read,
23228 .voltage = {2700, 3600},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023229 .reg_bits =
23230 {
Nico Huber2133f592024-01-06 18:30:01 +010023231 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023232 .srp = {STATUS1, 7, RW},
23233 .srl = {STATUS2, 0, RW},
23234 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23235 .tb = {STATUS1, 5, RW},
23236 .sec = {STATUS1, 6, RW},
23237 .cmp = {STATUS2, 6, RW},
23238 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023239 .wp_write_cfg = spi_wp_write_cfg,
23240 .wp_read_cfg = spi_wp_read_cfg,
23241 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023242 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023243 .prepare_access = spi_prepare_io,
23244 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023245 },
23246
23247 {
23248 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023249 .name = "W25Q32FV",
23250 .bustype = BUS_SPI,
23251 .manufacture_id = WINBOND_NEX_ID,
23252 .model_id = WINBOND_NEX_W25Q32_V,
23253 .total_size = 4096,
23254 .page_size = 256,
23255 /* supports SFDP */
23256 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010023257 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023258 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010023259 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023260 .tested = TEST_OK_PREW,
23261 .probe = probe_spi_rdid,
23262 .probe_timing = TIMING_ZERO,
23263 .block_erasers =
23264 {
23265 {
23266 .eraseblocks = { {4 * 1024, 1024} },
23267 .block_erase = spi_block_erase_20,
23268 }, {
23269 .eraseblocks = { {32 * 1024, 128} },
23270 .block_erase = spi_block_erase_52,
23271 }, {
23272 .eraseblocks = { {64 * 1024, 64} },
23273 .block_erase = spi_block_erase_d8,
23274 }, {
23275 .eraseblocks = { {4 * 1024 * 1024, 1} },
23276 .block_erase = spi_block_erase_60,
23277 }, {
23278 .eraseblocks = { {4 * 1024 * 1024, 1} },
23279 .block_erase = spi_block_erase_c7,
23280 }
23281 },
23282 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23283 .unlock = spi_disable_blockprotect,
23284 .write = spi_chip_write_256,
23285 .read = spi_chip_read,
23286 .voltage = {2700, 3600},
23287 .reg_bits =
23288 {
Nico Huber2133f592024-01-06 18:30:01 +010023289 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023290 .srp = {STATUS1, 7, RW},
23291 .srl = {STATUS2, 0, RW},
23292 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23293 .tb = {STATUS1, 5, RW},
23294 .sec = {STATUS1, 6, RW},
23295 .cmp = {STATUS2, 6, RW},
23296 .wps = {STATUS3, 2, RW},
23297 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023298 .wp_write_cfg = spi_wp_write_cfg,
23299 .wp_read_cfg = spi_wp_read_cfg,
23300 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023301 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023302 .prepare_access = spi_prepare_io,
23303 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023304 },
23305
23306 {
23307 .vendor = "Winbond",
23308 .name = "W25Q32JV",
23309 .bustype = BUS_SPI,
23310 .manufacture_id = WINBOND_NEX_ID,
23311 .model_id = WINBOND_NEX_W25Q32_V,
23312 .total_size = 4096,
23313 .page_size = 256,
23314 /* supports SFDP */
23315 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023316 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023317 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
23318 .tested = TEST_OK_PREW,
23319 .probe = probe_spi_rdid,
23320 .probe_timing = TIMING_ZERO,
23321 .block_erasers =
23322 {
23323 {
23324 .eraseblocks = { {4 * 1024, 1024} },
23325 .block_erase = spi_block_erase_20,
23326 }, {
23327 .eraseblocks = { {32 * 1024, 128} },
23328 .block_erase = spi_block_erase_52,
23329 }, {
23330 .eraseblocks = { {64 * 1024, 64} },
23331 .block_erase = spi_block_erase_d8,
23332 }, {
23333 .eraseblocks = { {4 * 1024 * 1024, 1} },
23334 .block_erase = spi_block_erase_60,
23335 }, {
23336 .eraseblocks = { {4 * 1024 * 1024, 1} },
23337 .block_erase = spi_block_erase_c7,
23338 }
23339 },
23340 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23341 .unlock = spi_disable_blockprotect,
23342 .write = spi_chip_write_256,
23343 .read = spi_chip_read,
23344 .voltage = {2700, 3600},
23345 .reg_bits =
23346 {
Nico Huber2133f592024-01-06 18:30:01 +010023347 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023348 .srp = {STATUS1, 7, RW},
23349 .srl = {STATUS2, 0, RW},
23350 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23351 .tb = {STATUS1, 5, RW},
23352 .sec = {STATUS1, 6, RW},
23353 .cmp = {STATUS2, 6, RW},
23354 .wps = {STATUS3, 2, RW},
23355 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023356 .wp_write_cfg = spi_wp_write_cfg,
23357 .wp_read_cfg = spi_wp_read_cfg,
23358 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023359 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023360 .prepare_access = spi_prepare_io,
23361 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023362 },
23363
23364 {
23365 .vendor = "Winbond",
Angel Pons0d4354e2024-05-26 16:33:51 +020023366 .name = "W25Q32JV-.M",
23367 .bustype = BUS_SPI,
23368 .manufacture_id = WINBOND_NEX_ID,
23369 .model_id = WINBOND_NEX_W25Q32JV,
23370 .total_size = 4096,
23371 .page_size = 256,
23372 /* supports SFDP */
Nico Huber1412d9f2024-01-06 18:25:49 +010023373 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Angel Pons0d4354e2024-05-26 16:33:51 +020023374 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010023375 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons0d4354e2024-05-26 16:33:51 +020023376 .tested = TEST_OK_PREW,
23377 .probe = probe_spi_rdid,
23378 .probe_timing = TIMING_ZERO,
23379 .block_erasers =
23380 {
23381 {
23382 .eraseblocks = { {4 * 1024, 1024} },
23383 .block_erase = spi_block_erase_20,
23384 }, {
23385 .eraseblocks = { {32 * 1024, 128} },
23386 .block_erase = spi_block_erase_52,
23387 }, {
23388 .eraseblocks = { {64 * 1024, 64} },
23389 .block_erase = spi_block_erase_d8,
23390 }, {
23391 .eraseblocks = { {4 * 1024 * 1024, 1} },
23392 .block_erase = spi_block_erase_60,
23393 }, {
23394 .eraseblocks = { {4 * 1024 * 1024, 1} },
23395 .block_erase = spi_block_erase_c7,
23396 }
23397 },
23398 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
23399 .unlock = spi_disable_blockprotect_bp2_srwd,
23400 .write = spi_chip_write_256,
23401 .read = spi_chip_read,
23402 .voltage = {2700, 3600},
23403 .reg_bits =
23404 {
Nico Huber2133f592024-01-06 18:30:01 +010023405 .qe = {STATUS2, 1, RW},
Angel Pons0d4354e2024-05-26 16:33:51 +020023406 .srp = {STATUS1, 7, RW},
23407 .srl = {STATUS2, 0, RW},
23408 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23409 .tb = {STATUS1, 5, RW},
23410 .sec = {STATUS1, 6, RW},
23411 .cmp = {STATUS2, 6, RW},
23412 .wps = {STATUS3, 2, RW},
23413 },
23414 .wp_write_cfg = spi_wp_write_cfg,
23415 .wp_read_cfg = spi_wp_read_cfg,
23416 .wp_get_ranges = spi_wp_get_available_ranges,
23417 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023418 .prepare_access = spi_prepare_io,
23419 .finish_access = spi_finish_io,
Angel Pons0d4354e2024-05-26 16:33:51 +020023420 },
23421
23422 {
23423 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023424 .name = "W25Q32BW/W25Q32CW/W25Q32DW",
Alan Green1f9cc7d2019-07-01 11:10:45 +100023425 .bustype = BUS_SPI,
23426 .manufacture_id = WINBOND_NEX_ID,
23427 .model_id = WINBOND_NEX_W25Q32_W,
23428 .total_size = 4096,
23429 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023430 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010023431 /* QPI: only DW version */
23432 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023433 .tested = TEST_OK_PREW,
23434 .probe = probe_spi_rdid,
23435 .probe_timing = TIMING_ZERO,
23436 .block_erasers =
23437 {
23438 {
23439 .eraseblocks = { {4 * 1024, 1024} },
23440 .block_erase = spi_block_erase_20,
23441 }, {
23442 .eraseblocks = { {32 * 1024, 128} },
23443 .block_erase = spi_block_erase_52,
23444 }, {
23445 .eraseblocks = { {64 * 1024, 64} },
23446 .block_erase = spi_block_erase_d8,
23447 }, {
23448 .eraseblocks = { {4 * 1024 * 1024, 1} },
23449 .block_erase = spi_block_erase_60,
23450 }, {
23451 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023452 .block_erase = spi_block_erase_c7,
23453 }
23454 },
23455 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23456 .unlock = spi_disable_blockprotect,
23457 .write = spi_chip_write_256,
23458 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010023459 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023460 .reg_bits =
23461 {
Nico Huber2133f592024-01-06 18:30:01 +010023462 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023463 .srp = {STATUS1, 7, RW},
23464 .srl = {STATUS2, 0, RW},
23465 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23466 .tb = {STATUS1, 5, RW},
23467 .sec = {STATUS1, 6, RW},
23468 .cmp = {STATUS2, 6, RW},
23469 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023470 .wp_write_cfg = spi_wp_write_cfg,
23471 .wp_read_cfg = spi_wp_read_cfg,
23472 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023473 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023474 .prepare_access = spi_prepare_io,
23475 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023476 },
23477
23478 {
23479 .vendor = "Winbond",
23480 .name = "W25Q32FW",
23481 .bustype = BUS_SPI,
23482 .manufacture_id = WINBOND_NEX_ID,
23483 .model_id = WINBOND_NEX_W25Q32_W,
23484 .total_size = 4096,
23485 .page_size = 256,
23486 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010023487 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023488 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010023489 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023490 .tested = TEST_OK_PREW,
23491 .probe = probe_spi_rdid,
23492 .probe_timing = TIMING_ZERO,
23493 .block_erasers =
23494 {
23495 {
23496 .eraseblocks = { {4 * 1024, 1024} },
23497 .block_erase = spi_block_erase_20,
23498 }, {
23499 .eraseblocks = { {32 * 1024, 128} },
23500 .block_erase = spi_block_erase_52,
23501 }, {
23502 .eraseblocks = { {64 * 1024, 64} },
23503 .block_erase = spi_block_erase_d8,
23504 }, {
23505 .eraseblocks = { {4 * 1024 * 1024, 1} },
23506 .block_erase = spi_block_erase_60,
23507 }, {
23508 .eraseblocks = { {4 * 1024 * 1024, 1} },
23509 .block_erase = spi_block_erase_c7,
23510 }
23511 },
23512 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23513 .unlock = spi_disable_blockprotect,
23514 .write = spi_chip_write_256,
23515 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010023516 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023517 .reg_bits =
23518 {
Nico Huber2133f592024-01-06 18:30:01 +010023519 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023520 .srp = {STATUS1, 7, RW},
23521 .srl = {STATUS2, 0, RW},
23522 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23523 .tb = {STATUS1, 5, RW},
23524 .sec = {STATUS1, 6, RW},
23525 .cmp = {STATUS2, 6, RW},
23526 .wps = {STATUS3, 2, RW},
23527 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023528 .wp_write_cfg = spi_wp_write_cfg,
23529 .wp_read_cfg = spi_wp_read_cfg,
23530 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023531 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023532 .prepare_access = spi_prepare_io,
23533 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023534 },
23535
23536 {
23537 .vendor = "Winbond",
23538 .name = "W25Q32JW...Q",
23539 .bustype = BUS_SPI,
23540 .manufacture_id = WINBOND_NEX_ID,
23541 .model_id = WINBOND_NEX_W25Q32_W,
23542 .total_size = 4096,
23543 .page_size = 256,
23544 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
23545 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010023546 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023547 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
23548 .tested = TEST_OK_PREW,
23549 .probe = probe_spi_rdid,
23550 .probe_timing = TIMING_ZERO,
23551 .block_erasers =
23552 {
23553 {
23554 .eraseblocks = { {4 * 1024, 1024} },
23555 .block_erase = spi_block_erase_20,
23556 }, {
23557 .eraseblocks = { {32 * 1024, 128} },
23558 .block_erase = spi_block_erase_52,
23559 }, {
23560 .eraseblocks = { {64 * 1024, 64} },
23561 .block_erase = spi_block_erase_d8,
23562 }, {
23563 .eraseblocks = { {4 * 1024 * 1024, 1} },
23564 .block_erase = spi_block_erase_60,
23565 }, {
23566 .eraseblocks = { {4 * 1024 * 1024, 1} },
23567 .block_erase = spi_block_erase_c7,
23568 }
23569 },
23570 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23571 .unlock = spi_disable_blockprotect,
23572 .write = spi_chip_write_256,
23573 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010023574 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023575 .reg_bits =
23576 {
Nico Huber37e07a82025-02-26 23:26:59 +010023577 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023578 .srp = {STATUS1, 7, RW},
23579 .srl = {STATUS2, 0, RW},
23580 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23581 .tb = {STATUS1, 5, RW},
23582 .sec = {STATUS1, 6, RW},
23583 .cmp = {STATUS2, 6, RW},
23584 .wps = {STATUS3, 2, RW},
23585 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023586 .wp_write_cfg = spi_wp_write_cfg,
23587 .wp_read_cfg = spi_wp_read_cfg,
23588 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023589 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023590 .prepare_access = spi_prepare_io,
23591 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023592 },
23593
23594 {
23595 .vendor = "Winbond",
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100023596 .name = "W25Q32JW...M",
23597 .bustype = BUS_SPI,
23598 .manufacture_id = WINBOND_NEX_ID,
23599 .model_id = WINBOND_NEX_W25Q32JW_M,
23600 .total_size = 4096,
23601 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023602 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
23603 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010023604 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023605 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_WRSR_EXT2,
Nico Huber2133f592024-01-06 18:30:01 +010023606 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100023607 .tested = TEST_OK_PREW,
23608 .probe = probe_spi_rdid,
23609 .probe_timing = TIMING_ZERO,
23610 .block_erasers =
23611 {
23612 {
23613 .eraseblocks = { {4 * 1024, 1024} },
23614 .block_erase = spi_block_erase_20,
23615 }, {
23616 .eraseblocks = { {32 * 1024, 128} },
23617 .block_erase = spi_block_erase_52,
23618 }, {
23619 .eraseblocks = { {64 * 1024, 64} },
23620 .block_erase = spi_block_erase_d8,
23621 }, {
23622 .eraseblocks = { {4 * 1024 * 1024, 1} },
23623 .block_erase = spi_block_erase_60,
23624 }, {
23625 .eraseblocks = { {4 * 1024 * 1024, 1} },
23626 .block_erase = spi_block_erase_c7,
23627 }
23628 },
23629 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
23630 .unlock = spi_disable_blockprotect_bp2_srwd,
23631 .write = spi_chip_write_256,
23632 .read = spi_chip_read,
23633 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023634 .reg_bits =
23635 {
Nico Huber2133f592024-01-06 18:30:01 +010023636 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023637 .srp = {STATUS1, 7, RW},
23638 .srl = {STATUS2, 0, RW},
23639 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23640 .tb = {STATUS1, 5, RW},
23641 .sec = {STATUS1, 6, RW},
23642 .cmp = {STATUS2, 6, RW},
23643 .wps = {STATUS3, 2, RW},
23644 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023645 .wp_write_cfg = spi_wp_write_cfg,
23646 .wp_read_cfg = spi_wp_read_cfg,
23647 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023648 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023649 .prepare_access = spi_prepare_io,
23650 .finish_access = spi_finish_io,
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100023651 },
23652
23653 {
23654 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100023655 .name = "W25Q40.V",
23656 .bustype = BUS_SPI,
23657 .manufacture_id = WINBOND_NEX_ID,
23658 .model_id = WINBOND_NEX_W25Q40_V,
23659 .total_size = 512,
23660 .page_size = 256,
23661 /* supports SFDP */
23662 /* OTP: 756B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023663 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023664 .tested = TEST_OK_PREW,
23665 .probe = probe_spi_rdid,
23666 .probe_timing = TIMING_ZERO,
23667 .block_erasers =
23668 {
23669 {
23670 .eraseblocks = { {4 * 1024, 128} },
23671 .block_erase = spi_block_erase_20,
23672 }, {
23673 .eraseblocks = { {32 * 1024, 16} },
23674 .block_erase = spi_block_erase_52,
23675 }, {
23676 .eraseblocks = { {64 * 1024, 8} },
23677 .block_erase = spi_block_erase_d8,
23678 }, {
23679 .eraseblocks = { {512 * 1024, 1} },
23680 .block_erase = spi_block_erase_60,
23681 }, {
23682 .eraseblocks = { {512 * 1024, 1} },
23683 .block_erase = spi_block_erase_c7,
23684 }
23685 },
Nico Huber2133f592024-01-06 18:30:01 +010023686 .reg_bits =
23687 {
23688 .qe = {STATUS2, 1, RW},
23689 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100023690 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23691 .unlock = spi_disable_blockprotect,
23692 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber2133f592024-01-06 18:30:01 +010023693 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023694 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020023695 .prepare_access = spi_prepare_io,
23696 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023697 },
23698
23699 {
23700 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020023701 .name = "W25Q40BW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023702 .bustype = BUS_SPI,
23703 .manufacture_id = WINBOND_NEX_ID,
Nico Huber25683572018-03-30 13:50:13 +020023704 .model_id = WINBOND_NEX_W25Q40BW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023705 .total_size = 512,
23706 .page_size = 256,
23707 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023708 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Angel Pons3164a0c2018-09-30 20:26:06 +020023709 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023710 .probe = probe_spi_rdid,
23711 .probe_timing = TIMING_ZERO,
23712 .block_erasers =
23713 {
23714 {
23715 .eraseblocks = { {4 * 1024, 128} },
23716 .block_erase = spi_block_erase_20,
23717 }, {
23718 .eraseblocks = { {32 * 1024, 16} },
23719 .block_erase = spi_block_erase_52,
23720 }, {
23721 .eraseblocks = { {64 * 1024, 8} },
23722 .block_erase = spi_block_erase_d8,
23723 }, {
23724 .eraseblocks = { {512 * 1024, 1} },
23725 .block_erase = spi_block_erase_60,
23726 }, {
23727 .eraseblocks = { {512 * 1024, 1} },
23728 .block_erase = spi_block_erase_c7,
23729 }
23730 },
Nico Huber2133f592024-01-06 18:30:01 +010023731 .reg_bits =
23732 {
23733 .qe = {STATUS2, 1, RW},
23734 },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023735 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23736 .unlock = spi_disable_blockprotect,
23737 .write = spi_chip_write_256,
23738 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010023739 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020023740 .prepare_access = spi_prepare_io,
23741 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023742 },
23743
23744 {
23745 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020023746 .name = "W25Q40EW",
23747 .bustype = BUS_SPI,
23748 .manufacture_id = WINBOND_NEX_ID,
23749 .model_id = WINBOND_NEX_W25Q40EW,
23750 .total_size = 512,
23751 .page_size = 256,
23752 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023753 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
23754 FEATURE_OTP | FEATURE_QPI_SRP,
23755 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green07b8a172019-09-23 16:47:05 +100023756 .tested = TEST_OK_PREW,
Nico Huber25683572018-03-30 13:50:13 +020023757 .probe = probe_spi_rdid,
23758 .probe_timing = TIMING_ZERO,
23759 .block_erasers =
23760 {
23761 {
23762 .eraseblocks = { {4 * 1024, 128} },
23763 .block_erase = spi_block_erase_20,
23764 }, {
23765 .eraseblocks = { {32 * 1024, 16} },
23766 .block_erase = spi_block_erase_52,
23767 }, {
23768 .eraseblocks = { {64 * 1024, 8} },
23769 .block_erase = spi_block_erase_d8,
23770 }, {
23771 .eraseblocks = { {512 * 1024, 1} },
23772 .block_erase = spi_block_erase_60,
23773 }, {
23774 .eraseblocks = { {512 * 1024, 1} },
23775 .block_erase = spi_block_erase_c7,
23776 }
23777 },
Nico Huber2133f592024-01-06 18:30:01 +010023778 .reg_bits =
23779 {
23780 .qe = {STATUS2, 1, RW},
23781 },
Nico Huber25683572018-03-30 13:50:13 +020023782 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23783 .unlock = spi_disable_blockprotect,
23784 .write = spi_chip_write_256,
23785 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010023786 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020023787 .prepare_access = spi_prepare_io,
23788 .finish_access = spi_finish_io,
Nico Huber25683572018-03-30 13:50:13 +020023789 },
23790
Stanislav Sedovf5775442018-03-07 14:16:51 -080023791 {
23792 .vendor = "Winbond",
Joel Stanley55439612019-07-27 19:25:35 +093023793 .name = "W25Q512JV",
23794 .bustype = BUS_SPI,
23795 .manufacture_id = WINBOND_NEX_ID,
23796 .model_id = WINBOND_NEX_W25Q512JV,
23797 .total_size = 64 * 1024,
23798 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010023799 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
23800 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Joel Stanley55439612019-07-27 19:25:35 +093023801 .tested = TEST_OK_PREW,
23802 .probe = probe_spi_rdid,
23803 .probe_timing = TIMING_ZERO,
23804 .block_erasers =
23805 {
23806 {
23807 .eraseblocks = { {4 * 1024, 16384} },
23808 .block_erase = spi_block_erase_21,
23809 }, {
23810 .eraseblocks = { {4 * 1024, 16384} },
23811 .block_erase = spi_block_erase_20,
23812 }, {
23813 .eraseblocks = { {32 * 1024, 2048} },
23814 .block_erase = spi_block_erase_52,
23815 }, {
23816 .eraseblocks = { {64 * 1024, 1024} },
23817 .block_erase = spi_block_erase_dc,
23818 }, {
23819 .eraseblocks = { {64 * 1024, 1024} },
23820 .block_erase = spi_block_erase_d8,
23821 }, {
23822 .eraseblocks = { {64 * 1024 * 1024, 1} },
23823 .block_erase = spi_block_erase_60,
23824 }, {
23825 .eraseblocks = { {64 * 1024 * 1024, 1} },
23826 .block_erase = spi_block_erase_c7,
23827 }
23828 },
Nico Huber2133f592024-01-06 18:30:01 +010023829 .reg_bits =
23830 {
23831 .qe = {STATUS2, 1, RW},
23832 },
Joel Stanley55439612019-07-27 19:25:35 +093023833 .printlock = spi_prettyprint_status_register_plain,
23834 .unlock = spi_disable_blockprotect,
23835 .write = spi_chip_write_256,
23836 .read = spi_chip_read,
23837 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020023838 .prepare_access = spi_prepare_io,
23839 .finish_access = spi_finish_io,
Joel Stanley55439612019-07-27 19:25:35 +093023840 },
23841
23842 {
Alexandru M Stan6ce26a72024-10-11 22:47:24 -070023843 .vendor = "Winbond",
23844 .name = "W25R512NW/W74M51NW",
23845 .bustype = BUS_SPI,
23846 .manufacture_id = WINBOND_NEX_ID,
23847 .model_id = WINBOND_NEX_W25R512NW,
23848 .total_size = 65536,
23849 .page_size = 256,
23850 /* supports SFDP */
23851 /* OTP: 3X256B; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
23852 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
23853 .tested = TEST_OK_PREW,
23854 .probe = probe_spi_rdid,
23855 .probe_timing = TIMING_ZERO,
23856 .block_erasers =
23857 {
23858 {
23859 .eraseblocks = { {4 * 1024, 16384} },
23860 .block_erase = spi_block_erase_21,
23861 }, {
23862 .eraseblocks = { {4 * 1024, 16384} },
23863 .block_erase = spi_block_erase_20,
23864 }, {
23865 .eraseblocks = { {32 * 1024, 2048} },
23866 .block_erase = spi_block_erase_52,
23867 }, {
23868 .eraseblocks = { {64 * 1024, 1024} },
23869 .block_erase = spi_block_erase_dc,
23870 }, {
23871 .eraseblocks = { {64 * 1024, 1024} },
23872 .block_erase = spi_block_erase_d8,
23873 }, {
23874 .eraseblocks = { {64 * 1024 * 1024, 1} },
23875 .block_erase = spi_block_erase_60,
23876 }, {
23877 .eraseblocks = { {64 * 1024 * 1024, 1} },
23878 .block_erase = spi_block_erase_c7,
23879 }
23880 },
23881 .printlock = spi_prettyprint_status_register_bp3_srwd,
23882 .unlock = spi_disable_blockprotect,
23883 .write = spi_chip_write_256,
23884 .read = spi_chip_read,
23885 .voltage = {1700, 1950},
23886 .prepare_access = spi_prepare_io,
23887 .finish_access = spi_finish_io,
23888 },
23889
23890 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010023891 .vendor = "Winbond",
23892 .name = "W25Q512NW-IM",
23893 .bustype = BUS_SPI,
23894 .manufacture_id = WINBOND_NEX_ID,
23895 .model_id = WINBOND_NEX_W25Q512NW_IM,
23896 .total_size = 64 * 1024,
23897 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010023898 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
23899 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
23900 .dummy_cycles =
23901 {
23902 /* Actually has 3 parameter bits, but higher values only help with DTR. */
23903 .qpi_read_params = { 2, 4, 6, 8 },
23904 },
Subrata Banikf5bffd92022-12-14 12:30:43 +053023905 .tested = TEST_OK_PREWB,
Felix Singer3c9bdb92022-12-15 23:30:16 +010023906 .probe = probe_spi_rdid,
23907 .probe_timing = TIMING_ZERO,
23908 .block_erasers =
Atul Dhudase2502dbd2021-09-21 10:02:20 +053023909 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010023910 {
23911 .eraseblocks = { {4 * 1024, 16384} },
23912 .block_erase = spi_block_erase_21,
23913 }, {
23914 .eraseblocks = { {4 * 1024, 16384} },
23915 .block_erase = spi_block_erase_20,
23916 }, {
23917 .eraseblocks = { {32 * 1024, 2048} },
23918 .block_erase = spi_block_erase_52,
23919 }, {
23920 .eraseblocks = { {64 * 1024, 1024} },
23921 .block_erase = spi_block_erase_dc,
23922 }, {
23923 .eraseblocks = { {64 * 1024, 1024} },
23924 .block_erase = spi_block_erase_d8,
23925 }, {
23926 .eraseblocks = { {64 * 1024 * 1024, 1} },
23927 .block_erase = spi_block_erase_60,
23928 }, {
23929 .eraseblocks = { {64 * 1024 * 1024, 1} },
23930 .block_erase = spi_block_erase_c7,
23931 }
23932 },
23933 .unlock = spi_disable_blockprotect,
23934 .write = spi_chip_write_256,
23935 .read = spi_chip_read,
23936 .voltage = {1650, 1950},
Subrata Banikf5bffd92022-12-14 12:30:43 +053023937 .reg_bits =
23938 {
Nico Huber2133f592024-01-06 18:30:01 +010023939 .qe = {STATUS2, 1, RW},
Subrata Banikf5bffd92022-12-14 12:30:43 +053023940 .srp = {STATUS1, 7, RW},
23941 .srl = {STATUS2, 0, RW},
23942 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
23943 .tb = {STATUS1, 6, RW},
23944 .cmp = {STATUS2, 6, RW},
23945 .wps = {STATUS3, 2, RW},
23946 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023947 .wp_write_cfg = spi_wp_write_cfg,
23948 .wp_read_cfg = spi_wp_read_cfg,
23949 .wp_get_ranges = spi_wp_get_available_ranges,
Subrata Banikf5bffd92022-12-14 12:30:43 +053023950 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023951 .prepare_access = spi_prepare_io,
23952 .finish_access = spi_finish_io,
Atul Dhudase2502dbd2021-09-21 10:02:20 +053023953 },
23954
23955 {
Joel Stanley55439612019-07-27 19:25:35 +093023956 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020023957 .name = "W25Q64BV/W25Q64CV/W25Q64FV",
Stanislav Sedovf5775442018-03-07 14:16:51 -080023958 .bustype = BUS_SPI,
23959 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023960 .model_id = WINBOND_NEX_W25Q64_V,
23961 .total_size = 8192,
Stanislav Sedovf5775442018-03-07 14:16:51 -080023962 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023963 /* supports SFDP */
23964 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023965 /* QPI: only FV version */
23966 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030023967 .tested = TEST_OK_PREWB,
Stanislav Sedovf5775442018-03-07 14:16:51 -080023968 .probe = probe_spi_rdid,
23969 .probe_timing = TIMING_ZERO,
23970 .block_erasers =
23971 {
23972 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023973 .eraseblocks = { {4 * 1024, 2048} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023974 .block_erase = spi_block_erase_20,
23975 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023976 .eraseblocks = { {32 * 1024, 256} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023977 .block_erase = spi_block_erase_52,
23978 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023979 .eraseblocks = { {64 * 1024, 128} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023980 .block_erase = spi_block_erase_d8,
23981 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023982 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023983 .block_erase = spi_block_erase_60,
23984 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023985 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023986 .block_erase = spi_block_erase_c7,
23987 }
23988 },
23989 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23990 .unlock = spi_disable_blockprotect,
23991 .write = spi_chip_write_256,
23992 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023993 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020023994 .reg_bits =
23995 {
Nico Huber2133f592024-01-06 18:30:01 +010023996 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020023997 .srp = {STATUS1, 7, RW},
23998 .srl = {STATUS2, 0, RW},
23999 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24000 .tb = {STATUS1, 5, RW},
24001 .sec = {STATUS1, 6, RW},
24002 .cmp = {STATUS2, 6, RW},
24003 },
Nico Huberaabb3e02023-01-13 00:22:30 +010024004 .wp_write_cfg = spi_wp_write_cfg,
24005 .wp_read_cfg = spi_wp_read_cfg,
24006 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024007 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024008 .prepare_access = spi_prepare_io,
24009 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000024010 },
24011
24012 {
24013 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024014 .name = "W25Q64JV-.Q",
24015 .bustype = BUS_SPI,
24016 .manufacture_id = WINBOND_NEX_ID,
24017 .model_id = WINBOND_NEX_W25Q64_V,
24018 .total_size = 8192,
24019 .page_size = 256,
24020 /* supports SFDP */
24021 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010024022 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020024023 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024024 .tested = TEST_OK_PREW,
24025 .probe = probe_spi_rdid,
24026 .probe_timing = TIMING_ZERO,
24027 .block_erasers =
24028 {
24029 {
24030 .eraseblocks = { {4 * 1024, 2048} },
24031 .block_erase = spi_block_erase_20,
24032 }, {
24033 .eraseblocks = { {32 * 1024, 256} },
24034 .block_erase = spi_block_erase_52,
24035 }, {
24036 .eraseblocks = { {64 * 1024, 128} },
24037 .block_erase = spi_block_erase_d8,
24038 }, {
24039 .eraseblocks = { {8 * 1024 * 1024, 1} },
24040 .block_erase = spi_block_erase_60,
24041 }, {
24042 .eraseblocks = { {8 * 1024 * 1024, 1} },
24043 .block_erase = spi_block_erase_c7,
24044 }
24045 },
24046 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24047 .unlock = spi_disable_blockprotect,
24048 .write = spi_chip_write_256,
24049 .read = spi_chip_read,
24050 .voltage = {2700, 3600},
24051 .reg_bits =
24052 {
Nico Huber2133f592024-01-06 18:30:01 +010024053 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024054 .srp = {STATUS1, 7, RW},
24055 .srl = {STATUS2, 0, RW},
24056 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24057 .tb = {STATUS1, 5, RW},
24058 .sec = {STATUS1, 6, RW},
24059 .cmp = {STATUS2, 6, RW},
24060 .wps = {STATUS3, 2, RW},
24061 },
Nico Huberaabb3e02023-01-13 00:22:30 +010024062 .wp_write_cfg = spi_wp_write_cfg,
24063 .wp_read_cfg = spi_wp_read_cfg,
24064 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024065 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024066 .prepare_access = spi_prepare_io,
24067 .finish_access = spi_finish_io,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024068 },
24069
24070 {
24071 .vendor = "Winbond",
24072 .name = "W25Q64JV-.M",
Simon Buhrow236a38c2021-11-05 11:48:30 +010024073 .bustype = BUS_SPI,
24074 .manufacture_id = WINBOND_NEX_ID,
24075 .model_id = WINBOND_NEX_W25Q64JV,
24076 .total_size = 8192,
24077 .page_size = 256,
24078 /* supports SFDP */
Nico Huber2133f592024-01-06 18:30:01 +010024079 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
24080 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010024081 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Simon Buhrow236a38c2021-11-05 11:48:30 +010024082 .tested = TEST_OK_PREW,
24083 .probe = probe_spi_rdid,
24084 .probe_timing = TIMING_ZERO,
24085 .block_erasers =
24086 {
24087 {
24088 .eraseblocks = { {4 * 1024, 2048} },
24089 .block_erase = spi_block_erase_20,
24090 }, {
24091 .eraseblocks = { {32 * 1024, 256} },
24092 .block_erase = spi_block_erase_52,
24093 }, {
24094 .eraseblocks = { {64 * 1024, 128} },
24095 .block_erase = spi_block_erase_d8,
24096 }, {
24097 .eraseblocks = { {8 * 1024 * 1024, 1} },
24098 .block_erase = spi_block_erase_60,
24099 }, {
24100 .eraseblocks = { {8 * 1024 * 1024, 1} },
24101 .block_erase = spi_block_erase_c7,
24102 }
24103 },
Nico Huber2133f592024-01-06 18:30:01 +010024104 .reg_bits =
24105 {
24106 .qe = {STATUS2, 1, RW},
24107 },
Simon Buhrow236a38c2021-11-05 11:48:30 +010024108 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
24109 .unlock = spi_disable_blockprotect_bp2_srwd,
24110 .write = spi_chip_write_256,
24111 .read = spi_chip_read,
24112 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024113 .prepare_access = spi_prepare_io,
24114 .finish_access = spi_finish_io,
Simon Buhrow236a38c2021-11-05 11:48:30 +010024115 },
24116
24117 {
24118 .vendor = "Winbond",
Nico Hubera358b142024-04-14 18:29:06 +020024119 .name = "W25Q64DW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000024120 .bustype = BUS_SPI,
24121 .manufacture_id = WINBOND_NEX_ID,
24122 .model_id = WINBOND_NEX_W25Q64_W,
24123 .total_size = 8192,
24124 .page_size = 256,
24125 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010024126 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
24127 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nico Hubera358b142024-04-14 18:29:06 +020024128 .tested = TEST_OK_PREW,
24129 .probe = probe_spi_rdid,
24130 .probe_timing = TIMING_ZERO,
24131 .block_erasers =
24132 {
24133 {
24134 .eraseblocks = { {4 * 1024, 2048} },
24135 .block_erase = spi_block_erase_20,
24136 }, {
24137 .eraseblocks = { {32 * 1024, 256} },
24138 .block_erase = spi_block_erase_52,
24139 }, {
24140 .eraseblocks = { {64 * 1024, 128} },
24141 .block_erase = spi_block_erase_d8,
24142 }, {
24143 .eraseblocks = { {8 * 1024 * 1024, 1} },
24144 .block_erase = spi_block_erase_60,
24145 }, {
24146 .eraseblocks = { {8 * 1024 * 1024, 1} },
24147 .block_erase = spi_block_erase_c7,
24148 }
24149 },
24150 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24151 .unlock = spi_disable_blockprotect,
24152 .write = spi_chip_write_256,
24153 .read = spi_chip_read,
24154 .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
24155 .reg_bits =
24156 {
Nico Huber37e07a82025-02-26 23:26:59 +010024157 .qe = {STATUS2, 1, RW},
Nico Hubera358b142024-04-14 18:29:06 +020024158 .srp = {STATUS1, 7, RW},
24159 .srl = {STATUS2, 0, RW},
24160 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24161 .tb = {STATUS1, 5, RW},
24162 .sec = {STATUS1, 6, RW},
24163 .cmp = {STATUS2, 6, RW},
24164 },
24165 .wp_write_cfg = spi_wp_write_cfg,
24166 .wp_read_cfg = spi_wp_read_cfg,
24167 .wp_get_ranges = spi_wp_get_available_ranges,
24168 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024169 .prepare_access = spi_prepare_io,
24170 .finish_access = spi_finish_io,
Nico Hubera358b142024-04-14 18:29:06 +020024171 },
24172
24173 {
24174 .vendor = "Winbond",
24175 .name = "W25Q64FW/W25Q64JW...Q",
24176 .bustype = BUS_SPI,
24177 .manufacture_id = WINBOND_NEX_ID,
24178 .model_id = WINBOND_NEX_W25Q64_W,
24179 .total_size = 8192,
24180 .page_size = 256,
24181 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010024182 /* FEATURE_QPI_SRP (2, 4, 6, 8): only FW version */
Nico Hubera358b142024-04-14 18:29:06 +020024183 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber1412d9f2024-01-06 18:25:49 +010024184 FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030024185 .tested = TEST_OK_PREWB,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000024186 .probe = probe_spi_rdid,
24187 .probe_timing = TIMING_ZERO,
24188 .block_erasers =
24189 {
24190 {
24191 .eraseblocks = { {4 * 1024, 2048} },
24192 .block_erase = spi_block_erase_20,
24193 }, {
24194 .eraseblocks = { {32 * 1024, 256} },
24195 .block_erase = spi_block_erase_52,
24196 }, {
24197 .eraseblocks = { {64 * 1024, 128} },
24198 .block_erase = spi_block_erase_d8,
24199 }, {
24200 .eraseblocks = { {8 * 1024 * 1024, 1} },
24201 .block_erase = spi_block_erase_60,
24202 }, {
24203 .eraseblocks = { {8 * 1024 * 1024, 1} },
24204 .block_erase = spi_block_erase_c7,
24205 }
24206 },
24207 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24208 .unlock = spi_disable_blockprotect,
24209 .write = spi_chip_write_256,
24210 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010024211 .voltage = {1700, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110024212 .reg_bits =
24213 {
Nico Huber2133f592024-01-06 18:30:01 +010024214 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110024215 .srp = {STATUS1, 7, RW},
24216 .srl = {STATUS2, 0, RW},
24217 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24218 .tb = {STATUS1, 5, RW},
24219 .sec = {STATUS1, 6, RW},
24220 .cmp = {STATUS2, 6, RW},
24221 },
Nico Huberaabb3e02023-01-13 00:22:30 +010024222 .wp_write_cfg = spi_wp_write_cfg,
24223 .wp_read_cfg = spi_wp_read_cfg,
24224 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110024225 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024226 .prepare_access = spi_prepare_io,
24227 .finish_access = spi_finish_io,
Antony Rheneus0fbba982011-05-26 14:28:51 +000024228 },
24229
24230 {
24231 .vendor = "Winbond",
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100024232 .name = "W25Q64JW...M",
Scott Chao1bbc5012020-04-08 22:10:50 +080024233 .bustype = BUS_SPI,
24234 .manufacture_id = WINBOND_NEX_ID,
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100024235 .model_id = WINBOND_NEX_W25Q64JW_M,
Scott Chao1bbc5012020-04-08 22:10:50 +080024236 .total_size = 8192,
24237 .page_size = 256,
24238 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
24239 /* QPI enable 0x38, disable 0xFF */
Nico Huber1412d9f2024-01-06 18:25:49 +010024240 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
24241 FEATURE_OTP | FEATURE_QPI_SRP,
24242 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Scott Chao1bbc5012020-04-08 22:10:50 +080024243 .tested = TEST_OK_PREW,
24244 .probe = probe_spi_rdid,
24245 .probe_timing = TIMING_ZERO,
24246 .block_erasers =
24247 {
24248 {
24249 .eraseblocks = { {4 * 1024, 2048} },
24250 .block_erase = spi_block_erase_20,
24251 }, {
24252 .eraseblocks = { {32 * 1024, 256} },
24253 .block_erase = spi_block_erase_52,
24254 }, {
24255 .eraseblocks = { {64 * 1024, 128} },
24256 .block_erase = spi_block_erase_d8,
24257 }, {
24258 .eraseblocks = { {8 * 1024 * 1024, 1} },
24259 .block_erase = spi_block_erase_60,
24260 }, {
24261 .eraseblocks = { {8 * 1024 * 1024, 1} },
24262 .block_erase = spi_block_erase_c7,
24263 }
24264 },
24265 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24266 .unlock = spi_disable_blockprotect,
24267 .write = spi_chip_write_256,
24268 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010024269 .voltage = {1700, 1950},
Evan Benn29c8b5d2022-09-13 16:01:10 +100024270 .reg_bits =
24271 {
Nico Huber2133f592024-01-06 18:30:01 +010024272 .qe = {STATUS2, 1, RW},
Evan Benn29c8b5d2022-09-13 16:01:10 +100024273 .srp = {STATUS1, 7, RW},
24274 .srl = {STATUS2, 0, RW},
24275 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24276 .tb = {STATUS1, 5, RW},
24277 .sec = {STATUS1, 6, RW},
24278 .cmp = {STATUS2, 6, RW},
24279 .wps = {STATUS3, 2, RW},
24280 },
Nico Huberaabb3e02023-01-13 00:22:30 +010024281 .wp_write_cfg = spi_wp_write_cfg,
24282 .wp_read_cfg = spi_wp_read_cfg,
24283 .wp_get_ranges = spi_wp_get_available_ranges,
Evan Benn29c8b5d2022-09-13 16:01:10 +100024284 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024285 .prepare_access = spi_prepare_io,
24286 .finish_access = spi_finish_io,
Scott Chao1bbc5012020-04-08 22:10:50 +080024287 },
24288
24289 {
24290 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024291 .name = "W25Q80.V",
Nico Huber70eed9f2017-04-24 22:19:27 +020024292 .bustype = BUS_SPI,
24293 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024294 .model_id = WINBOND_NEX_W25Q80_V,
24295 .total_size = 1024,
Nico Huber70eed9f2017-04-24 22:19:27 +020024296 .page_size = 256,
24297 /* supports SFDP */
24298 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010024299 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
David Hendricks48729d32017-12-08 14:44:07 -080024300 .tested = TEST_OK_PREW,
Nico Huber70eed9f2017-04-24 22:19:27 +020024301 .probe = probe_spi_rdid,
24302 .probe_timing = TIMING_ZERO,
24303 .block_erasers =
24304 {
24305 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024306 .eraseblocks = { {4 * 1024, 256} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024307 .block_erase = spi_block_erase_20,
24308 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024309 .eraseblocks = { {32 * 1024, 32} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024310 .block_erase = spi_block_erase_52,
24311 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024312 .eraseblocks = { {64 * 1024, 16} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024313 .block_erase = spi_block_erase_d8,
24314 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024315 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024316 .block_erase = spi_block_erase_60,
24317 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024318 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024319 .block_erase = spi_block_erase_c7,
24320 }
24321 },
Nico Huber2133f592024-01-06 18:30:01 +010024322 .reg_bits =
24323 {
24324 .qe = {STATUS2, 1, RW},
24325 },
Nico Huber70eed9f2017-04-24 22:19:27 +020024326 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24327 .unlock = spi_disable_blockprotect,
24328 .write = spi_chip_write_256,
24329 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024330 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024331 .prepare_access = spi_prepare_io,
24332 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024333 },
24334
24335 {
24336 .vendor = "Winbond",
24337 .name = "W25Q80BW",
24338 .bustype = BUS_SPI,
24339 .manufacture_id = WINBOND_NEX_ID,
24340 .model_id = WINBOND_NEX_W25Q80BW,
24341 .total_size = 1024,
24342 .page_size = 256,
24343 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010024344 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024345 .tested = TEST_OK_PREW,
24346 .probe = probe_spi_rdid,
24347 .probe_timing = TIMING_ZERO,
24348 .block_erasers =
24349 {
24350 {
24351 .eraseblocks = { {4 * 1024, 256} },
24352 .block_erase = spi_block_erase_20,
24353 }, {
24354 .eraseblocks = { {32 * 1024, 32} },
24355 .block_erase = spi_block_erase_52,
24356 }, {
24357 .eraseblocks = { {64 * 1024, 16} },
24358 .block_erase = spi_block_erase_d8,
24359 }, {
24360 .eraseblocks = { {1 * 1024 * 1024, 1} },
24361 .block_erase = spi_block_erase_60,
24362 }, {
24363 .eraseblocks = { {1 * 1024 * 1024, 1} },
24364 .block_erase = spi_block_erase_c7,
24365 }
24366 },
Nico Huber2133f592024-01-06 18:30:01 +010024367 .reg_bits =
24368 {
24369 .qe = {STATUS2, 1, RW},
24370 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100024371 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24372 .unlock = spi_disable_blockprotect,
24373 .write = spi_chip_write_256,
24374 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010024375 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020024376 .prepare_access = spi_prepare_io,
24377 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024378 },
24379
24380 {
24381 .vendor = "Winbond",
24382 .name = "W25Q80EW",
24383 .bustype = BUS_SPI,
24384 .manufacture_id = WINBOND_NEX_ID,
24385 .model_id = WINBOND_NEX_W25Q80EW,
24386 .total_size = 1024,
24387 .page_size = 256,
24388 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010024389 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
24390 FEATURE_OTP | FEATURE_QPI_SRP,
24391 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green1f9cc7d2019-07-01 11:10:45 +100024392 .tested = TEST_OK_PREW,
24393 .probe = probe_spi_rdid,
24394 .probe_timing = TIMING_ZERO,
24395 .block_erasers =
24396 {
24397 {
24398 .eraseblocks = { {4 * 1024, 256} },
24399 .block_erase = spi_block_erase_20,
24400 }, {
24401 .eraseblocks = { {32 * 1024, 32} },
24402 .block_erase = spi_block_erase_52,
24403 }, {
24404 .eraseblocks = { {64 * 1024, 16} },
24405 .block_erase = spi_block_erase_d8,
24406 }, {
24407 .eraseblocks = { {1 * 1024 * 1024, 1} },
24408 .block_erase = spi_block_erase_60,
24409 }, {
24410 .eraseblocks = { {1 * 1024 * 1024, 1} },
24411 .block_erase = spi_block_erase_c7,
24412 }
24413 },
Nico Huber2133f592024-01-06 18:30:01 +010024414 .reg_bits =
24415 {
24416 .qe = {STATUS2, 1, RW},
24417 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100024418 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24419 .unlock = spi_disable_blockprotect,
24420 .write = spi_chip_write_256,
24421 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010024422 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020024423 .prepare_access = spi_prepare_io,
24424 .finish_access = spi_finish_io,
Nico Huber70eed9f2017-04-24 22:19:27 +020024425 },
24426
24427 {
24428 .vendor = "Winbond",
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040024429 .name = "W25X05",
24430 .bustype = BUS_SPI,
24431 .manufacture_id = WINBOND_NEX_ID,
24432 .model_id = WINBOND_NEX_W25X05,
24433 .total_size = 64,
24434 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024435 /* FEATURE_FAST_READ_DIO since W25X05B */
24436 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040024437 .tested = TEST_OK_PREW,
24438 .probe = probe_spi_rdid,
24439 .probe_timing = TIMING_ZERO,
24440 .block_erasers =
24441 {
24442 {
24443 .eraseblocks = { {4 * 1024, 16} },
24444 .block_erase = spi_block_erase_20,
24445 }, {
24446 .eraseblocks = { {32 * 1024, 2} },
24447 .block_erase = spi_block_erase_52,
24448 }, {
24449 .eraseblocks = { {64 * 1024, 1} },
24450 .block_erase = spi_block_erase_d8,
24451 }
24452 },
24453 .printlock = spi_prettyprint_status_register_plain,
24454 .unlock = spi_disable_blockprotect,
24455 .write = spi_chip_write_256,
24456 .read = spi_chip_read,
24457 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024458 .prepare_access = spi_prepare_io,
24459 .finish_access = spi_finish_io,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040024460 },
24461
24462 {
24463 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024464 .name = "W25X10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024465 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024466 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024467 .model_id = WINBOND_NEX_W25X10,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024468 .total_size = 128,
24469 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024470 /* FEATURE_FAST_READ_DIO since W25X10B */
24471 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunere34e3e82013-01-01 00:06:51 +000024472 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024473 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000024474 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024475 .block_erasers =
24476 {
24477 {
24478 .eraseblocks = { {4 * 1024, 32} },
24479 .block_erase = spi_block_erase_20,
24480 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024481 .eraseblocks = { {64 * 1024, 2} },
24482 .block_erase = spi_block_erase_d8,
24483 }, {
24484 .eraseblocks = { {128 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024485 .block_erase = spi_block_erase_c7,
24486 }
24487 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000024488 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000024489 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000024490 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024491 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024492 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024493 .prepare_access = spi_prepare_io,
24494 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000024495 },
24496
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024497 {
24498 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024499 .name = "W25X16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024500 .bustype = BUS_SPI,
Hector Martina721ae22009-07-11 19:39:11 +000024501 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024502 .model_id = WINBOND_NEX_W25X16,
Hector Martina721ae22009-07-11 19:39:11 +000024503 .total_size = 2048,
24504 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024505 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner8179be52011-06-04 13:13:34 +000024506 .tested = TEST_OK_PREW,
Hector Martina721ae22009-07-11 19:39:11 +000024507 .probe = probe_spi_rdid,
24508 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024509 .block_erasers =
24510 {
24511 {
24512 .eraseblocks = { {4 * 1024, 512} },
24513 .block_erase = spi_block_erase_20,
24514 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024515 .eraseblocks = { {64 * 1024, 32} },
24516 .block_erase = spi_block_erase_d8,
24517 }, {
24518 .eraseblocks = { {2 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024519 .block_erase = spi_block_erase_c7,
24520 }
24521 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000024522 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000024523 .unlock = spi_disable_blockprotect,
Hector Martina721ae22009-07-11 19:39:11 +000024524 .write = spi_chip_write_256,
24525 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024526 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024527 .prepare_access = spi_prepare_io,
24528 .finish_access = spi_finish_io,
Hector Martina721ae22009-07-11 19:39:11 +000024529 },
24530
24531 {
24532 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024533 .name = "W25X20",
24534 .bustype = BUS_SPI,
24535 .manufacture_id = WINBOND_NEX_ID,
24536 .model_id = WINBOND_NEX_W25X20,
24537 .total_size = 256,
24538 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024539 /* FEATURE_FAST_READ_DIO since W25X20B */
24540 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024541 .tested = TEST_OK_PREW,
24542 .probe = probe_spi_rdid,
24543 .probe_timing = TIMING_ZERO,
24544 .block_erasers =
24545 {
24546 {
24547 .eraseblocks = { {4 * 1024, 64} },
24548 .block_erase = spi_block_erase_20,
24549 }, {
24550 .eraseblocks = { {64 * 1024, 4} },
24551 .block_erase = spi_block_erase_d8,
24552 }, {
24553 .eraseblocks = { {256 * 1024, 1} },
24554 .block_erase = spi_block_erase_c7,
24555 }
24556 },
24557 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24558 .unlock = spi_disable_blockprotect,
24559 .write = spi_chip_write_256,
24560 .read = spi_chip_read,
24561 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024562 .prepare_access = spi_prepare_io,
24563 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024564 },
24565
24566 {
24567 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024568 .name = "W25X32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024569 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000024570 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024571 .model_id = WINBOND_NEX_W25X32,
Zheng Bao1db2b752009-11-26 11:05:01 +000024572 .total_size = 4096,
24573 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024574 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000024575 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000024576 .probe = probe_spi_rdid,
24577 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024578 .block_erasers =
24579 {
24580 {
24581 .eraseblocks = { {4 * 1024, 1024} },
24582 .block_erase = spi_block_erase_20,
24583 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024584 .eraseblocks = { {64 * 1024, 64} },
24585 .block_erase = spi_block_erase_d8,
24586 }, {
24587 .eraseblocks = { {4 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024588 .block_erase = spi_block_erase_c7,
24589 }
24590 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000024591 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000024592 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000024593 .write = spi_chip_write_256,
24594 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024595 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024596 .prepare_access = spi_prepare_io,
24597 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000024598 },
24599
24600 {
24601 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024602 .name = "W25X40",
24603 .bustype = BUS_SPI,
24604 .manufacture_id = WINBOND_NEX_ID,
24605 .model_id = WINBOND_NEX_W25X40,
24606 .total_size = 512,
24607 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024608 /* FEATURE_FAST_READ_DIO since W25X40B */
24609 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024610 .tested = TEST_OK_PREW,
24611 .probe = probe_spi_rdid,
24612 .probe_timing = TIMING_ZERO,
24613 .block_erasers =
24614 {
24615 {
24616 .eraseblocks = { {4 * 1024, 128} },
24617 .block_erase = spi_block_erase_20,
24618 }, {
24619 .eraseblocks = { {64 * 1024, 8} },
24620 .block_erase = spi_block_erase_d8,
24621 }, {
24622 .eraseblocks = { {512 * 1024, 1} },
24623 .block_erase = spi_block_erase_c7,
24624 }
24625 },
24626 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24627 .unlock = spi_disable_blockprotect,
24628 .write = spi_chip_write_256,
24629 .read = spi_chip_read,
24630 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024631 .prepare_access = spi_prepare_io,
24632 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024633 },
24634
24635 {
24636 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024637 .name = "W25X64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024638 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000024639 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024640 .model_id = WINBOND_NEX_W25X64,
Zheng Bao1db2b752009-11-26 11:05:01 +000024641 .total_size = 8192,
24642 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024643 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner23e10b82016-01-23 16:16:49 +000024644 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000024645 .probe = probe_spi_rdid,
24646 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024647 .block_erasers =
24648 {
24649 {
24650 .eraseblocks = { {4 * 1024, 2048} },
24651 .block_erase = spi_block_erase_20,
24652 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024653 .eraseblocks = { {64 * 1024, 128} },
24654 .block_erase = spi_block_erase_d8,
24655 }, {
24656 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024657 .block_erase = spi_block_erase_c7,
24658 }
24659 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000024660 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000024661 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000024662 .write = spi_chip_write_256,
24663 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024664 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024665 .prepare_access = spi_prepare_io,
24666 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000024667 },
24668
24669 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100024670 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024671 .name = "W25X80",
Alan Greenfa3fcd32019-06-27 15:41:50 +100024672 .bustype = BUS_SPI,
24673 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024674 .model_id = WINBOND_NEX_W25X80,
Alan Greenfa3fcd32019-06-27 15:41:50 +100024675 .total_size = 1024,
24676 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024677 /* FEATURE_FAST_READ_DIO since W25X80B */
24678 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024679 .tested = TEST_OK_PREW,
Alan Greenfa3fcd32019-06-27 15:41:50 +100024680 .probe = probe_spi_rdid,
24681 .probe_timing = TIMING_ZERO,
24682 .block_erasers =
David Hendricksc9ee0ed2018-02-11 17:40:53 -080024683 {
24684 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024685 .eraseblocks = { {4 * 1024, 256} },
24686 .block_erase = spi_block_erase_20,
24687 }, {
David Hendricksc9ee0ed2018-02-11 17:40:53 -080024688 .eraseblocks = { {64 * 1024, 16} },
24689 .block_erase = spi_block_erase_d8,
24690 }, {
24691 .eraseblocks = { {1024 * 1024, 1} },
24692 .block_erase = spi_block_erase_c7,
24693 }
24694 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100024695 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24696 .unlock = spi_disable_blockprotect,
24697 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024698 .read = spi_chip_read,
Alan Greenfa3fcd32019-06-27 15:41:50 +100024699 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024700 .prepare_access = spi_prepare_io,
24701 .finish_access = spi_finish_io,
David Hendricksc9ee0ed2018-02-11 17:40:53 -080024702 },
24703
Alan Greenf29ea362019-06-27 17:14:02 +100024704 /* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
24705 {
Carl-Daniel Hailfinger2e88a9f2011-07-26 14:18:52 +000024706 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000024707 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024708 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024709 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024710 .model_id = WINBOND_W29C010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024711 .total_size = 128,
24712 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000024713 .feature_bits = FEATURE_LONG_RESET,
David Hendricks567b7b82011-05-18 01:31:03 +000024714 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024715 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000024716 .probe_timing = 10, /* used datasheet for the W29C011A */
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024717 .block_erasers =
24718 {
24719 {
24720 .eraseblocks = { {128 * 1024, 1} },
24721 .block_erase = erase_chip_block_jedec,
24722 }
24723 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024724 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000024725 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010024726 .prepare_access = prepare_memory_access,
24727 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000024728 },
24729
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024730 {
24731 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024732 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012-old",
24733 .bustype = BUS_PARALLEL,
24734 .manufacture_id = WINBOND_ID,
24735 .model_id = WINBOND_W29C010,
24736 .total_size = 128,
24737 .page_size = 128,
24738 .feature_bits = FEATURE_LONG_RESET,
24739 .tested = TEST_OK_PREW,
24740 .probe = probe_w29ee011,
24741 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (w29ee011.c) */
24742 .block_erasers =
24743 {
24744 {
24745 .eraseblocks = { {128 * 1024, 1} },
24746 .block_erase = erase_chip_block_jedec,
24747 }
24748 },
24749 .write = write_jedec,
24750 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010024751 .prepare_access = prepare_memory_access,
24752 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024753 },
24754
24755 {
24756 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000024757 .name = "W29C020(C)/W29C022",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024758 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024759 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024760 .model_id = WINBOND_W29C020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024761 .total_size = 256,
24762 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000024763 .feature_bits = FEATURE_LONG_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024764 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024765 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024766 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024767 .block_erasers =
24768 {
24769 {
24770 .eraseblocks = { {256 * 1024, 1} },
24771 .block_erase = erase_chip_block_jedec,
24772 }
24773 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024774 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000024775 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024776 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010024777 .prepare_access = prepare_memory_access,
24778 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000024779 },
24780
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024781 {
24782 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000024783 .name = "W29C040/P",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024784 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024785 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024786 .model_id = WINBOND_W29C040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024787 .total_size = 512,
24788 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000024789 .feature_bits = FEATURE_LONG_RESET,
24790 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024791 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000024792 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024793 .block_erasers =
24794 {
24795 {
24796 .eraseblocks = { {512 * 1024, 1} },
24797 .block_erase = erase_chip_block_jedec,
24798 }
24799 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024800 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000024801 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024802 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010024803 .prepare_access = prepare_memory_access,
24804 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000024805 },
24806
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024807 {
24808 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024809 .name = "W29C512A/W29EE512",
24810 .bustype = BUS_PARALLEL,
24811 .manufacture_id = WINBOND_ID,
24812 .model_id = WINBOND_W29C512A,
24813 .total_size = 64,
24814 .page_size = 128,
24815 .feature_bits = FEATURE_LONG_RESET,
24816 .tested = TEST_OK_PREW,
24817 .probe = probe_jedec,
24818 .probe_timing = 10,
24819 .block_erasers =
24820 {
24821 {
24822 .eraseblocks = { {64 * 1024, 1} },
24823 .block_erase = erase_chip_block_jedec,
24824 }
24825 },
24826 .write = write_jedec,
24827 .read = read_memmapped,
24828 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010024829 .prepare_access = prepare_memory_access,
24830 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024831 },
24832
24833 {
24834 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024835 .name = "W29GL032CB",
24836 .bustype = BUS_PARALLEL,
24837 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24838 .model_id = WINBOND_W29GL032CB,
24839 .total_size = 4096,
24840 .page_size = 128 * 1024, /* actual page size is 16 */
24841 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24842 .tested = TEST_UNTESTED,
24843 .probe = probe_jedec_29gl,
24844 .probe_timing = TIMING_ZERO,
24845 .block_erasers =
24846 {
24847 {
24848 .eraseblocks = {
24849 {8 * 1024, 8},
24850 {64 * 1024, 63},
24851 },
24852 .block_erase = erase_sector_jedec,
24853 }, {
24854 .eraseblocks = { {4 * 1024 * 1024, 1} },
24855 .block_erase = erase_chip_block_jedec,
24856 },
24857 },
24858 .write = write_jedec_1,
24859 .read = read_memmapped,
24860 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024861 .prepare_access = prepare_memory_access,
24862 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024863 },
24864
24865 {
24866 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024867 .name = "W29GL032CH/L",
24868 .bustype = BUS_PARALLEL,
24869 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24870 .model_id = WINBOND_W29GL032CHL,
24871 .total_size = 4096,
24872 .page_size = 128 * 1024, /* actual page size is 16 */
24873 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24874 .tested = TEST_UNTESTED,
24875 .probe = probe_jedec_29gl,
24876 .probe_timing = TIMING_ZERO,
24877 .block_erasers =
24878 {
24879 {
24880 .eraseblocks = { {64 * 1024, 64} },
24881 .block_erase = erase_sector_jedec,
24882 }, {
24883 .eraseblocks = { {4 * 1024 * 1024, 1} },
24884 .block_erase = erase_chip_block_jedec,
24885 },
24886 },
24887 .write = write_jedec_1,
24888 .read = read_memmapped,
24889 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024890 .prepare_access = prepare_memory_access,
24891 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024892 },
24893
24894 {
24895 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024896 .name = "W29GL032CT",
24897 .bustype = BUS_PARALLEL,
24898 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24899 .model_id = WINBOND_W29GL032CT,
24900 .total_size = 4096,
24901 .page_size = 128 * 1024, /* actual page size is 16 */
24902 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24903 .tested = TEST_UNTESTED,
24904 .probe = probe_jedec_29gl,
24905 .probe_timing = TIMING_ZERO,
24906 .block_erasers =
24907 {
24908 {
24909 .eraseblocks = {
24910 {64 * 1024, 63},
24911 {8 * 1024, 8},
24912 },
24913 .block_erase = erase_sector_jedec,
24914 }, {
24915 .eraseblocks = { {4 * 1024 * 1024, 1} },
24916 .block_erase = erase_chip_block_jedec,
24917 },
24918 },
24919 .write = write_jedec_1,
24920 .read = read_memmapped,
24921 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024922 .prepare_access = prepare_memory_access,
24923 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024924 },
24925
24926 {
24927 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024928 .name = "W29GL064CB",
24929 .bustype = BUS_PARALLEL,
24930 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24931 .model_id = WINBOND_W29GL064CB,
24932 .total_size = 8192,
24933 .page_size = 128 * 1024, /* actual page size is 16 */
24934 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24935 .tested = TEST_UNTESTED,
24936 .probe = probe_jedec_29gl,
24937 .probe_timing = TIMING_ZERO,
24938 .block_erasers =
24939 {
24940 {
24941 .eraseblocks = {
24942 {8 * 1024, 8},
24943 {64 * 1024, 127},
24944 },
24945 .block_erase = erase_sector_jedec,
24946 }, {
24947 .eraseblocks = { {8 * 1024 * 1024, 1} },
24948 .block_erase = erase_chip_block_jedec,
24949 },
24950 },
24951 .write = write_jedec_1,
24952 .read = read_memmapped,
24953 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024954 .prepare_access = prepare_memory_access,
24955 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024956 },
24957
24958 {
24959 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024960 .name = "W29GL064CH/L",
24961 .bustype = BUS_PARALLEL,
24962 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24963 .model_id = WINBOND_W29GL064CHL,
24964 .total_size = 8192,
24965 .page_size = 128 * 1024, /* actual page size is 16 */
24966 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24967 .tested = TEST_UNTESTED,
24968 .probe = probe_jedec_29gl,
24969 .probe_timing = TIMING_ZERO,
24970 .block_erasers =
24971 {
24972 {
24973 .eraseblocks = { {64 * 1024, 128} },
24974 .block_erase = erase_sector_jedec,
24975 }, {
24976 .eraseblocks = { {8 * 1024 * 1024, 1} },
24977 .block_erase = erase_chip_block_jedec,
24978 },
24979 },
24980 .write = write_jedec_1,
24981 .read = read_memmapped,
24982 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024983 .prepare_access = prepare_memory_access,
24984 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024985 },
24986
24987 {
24988 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024989 .name = "W29GL064CT",
24990 .bustype = BUS_PARALLEL,
24991 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24992 .model_id = WINBOND_W29GL064CT,
24993 .total_size = 8192,
24994 .page_size = 128 * 1024, /* actual page size is 16 */
24995 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24996 .tested = TEST_UNTESTED,
24997 .probe = probe_jedec_29gl,
24998 .probe_timing = TIMING_ZERO,
24999 .block_erasers =
25000 {
25001 {
25002 .eraseblocks = {
25003 {64 * 1024, 127},
25004 {8 * 1024, 8},
25005 },
25006 .block_erase = erase_sector_jedec,
25007 }, {
25008 .eraseblocks = { {8 * 1024 * 1024, 1} },
25009 .block_erase = erase_chip_block_jedec,
25010 },
25011 },
25012 .write = write_jedec_1,
25013 .read = read_memmapped,
25014 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025015 .prepare_access = prepare_memory_access,
25016 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000025017 },
25018
25019 {
25020 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000025021 .name = "W29GL128C",
25022 .bustype = BUS_PARALLEL,
25023 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
25024 .model_id = WINBOND_W29GL128CHL,
25025 .total_size = 16384,
25026 .page_size = 128 * 1024, /* actual page size is 16 */
25027 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
25028 .tested = TEST_UNTESTED,
25029 .probe = probe_jedec_29gl,
25030 .probe_timing = TIMING_ZERO,
25031 .block_erasers =
25032 {
25033 {
25034 .eraseblocks = { {128 * 1024, 128} },
25035 .block_erase = erase_sector_jedec,
25036 }, {
25037 .eraseblocks = { {16 * 1024 * 1024, 1} },
25038 .block_erase = erase_chip_block_jedec,
25039 },
25040 },
25041 .write = write_jedec_1,
25042 .read = read_memmapped,
25043 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025044 .prepare_access = prepare_memory_access,
25045 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000025046 },
25047
25048 {
25049 .vendor = "Winbond",
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000025050 .name = "W39F010",
25051 .bustype = BUS_PARALLEL,
25052 .manufacture_id = WINBOND_ID,
25053 .model_id = WINBOND_W39F010,
25054 .total_size = 128,
25055 .page_size = 4 * 1024,
25056 .feature_bits = FEATURE_EITHER_RESET,
25057 .tested = TEST_OK_PREW,
25058 .probe = probe_jedec,
25059 .probe_timing = 10,
25060 .block_erasers =
25061 {
25062 {
25063 .eraseblocks = { {4 * 1024, 32} },
25064 .block_erase = erase_block_jedec,
25065 }, {
25066 .eraseblocks = { {128 * 1024, 1} },
25067 .block_erase = erase_chip_block_jedec,
25068 }
25069 },
25070 .printlock = printlock_w39f010,
25071 .write = write_jedec_1,
25072 .read = read_memmapped,
25073 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010025074 .prepare_access = prepare_memory_access,
25075 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000025076 },
25077
25078 {
25079 .vendor = "Winbond",
25080 .name = "W39L010",
25081 .bustype = BUS_PARALLEL,
25082 .manufacture_id = WINBOND_ID,
25083 .model_id = WINBOND_W39L010,
25084 .total_size = 128,
25085 .page_size = 4 * 1024,
25086 .feature_bits = FEATURE_EITHER_RESET,
25087 .tested = TEST_UNTESTED,
25088 .probe = probe_jedec,
25089 .probe_timing = 10,
25090 .block_erasers =
25091 {
25092 {
25093 .eraseblocks = { {4 * 1024, 32} },
25094 .block_erase = erase_block_jedec,
25095 }, {
25096 .eraseblocks = { {128 * 1024, 1} },
25097 .block_erase = erase_chip_block_jedec,
25098 }
25099 },
25100 .printlock = printlock_w39l010,
25101 .write = write_jedec_1,
25102 .read = read_memmapped,
25103 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025104 .prepare_access = prepare_memory_access,
25105 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000025106 },
25107
25108 {
25109 .vendor = "Winbond",
25110 .name = "W39L020",
25111 .bustype = BUS_PARALLEL,
25112 .manufacture_id = WINBOND_ID,
25113 .model_id = WINBOND_W39L020,
25114 .total_size = 256,
25115 .page_size = 4 * 1024,
25116 .feature_bits = FEATURE_EITHER_RESET,
25117 .tested = TEST_UNTESTED,
25118 .probe = probe_jedec,
25119 .probe_timing = 10,
25120 .block_erasers =
25121 {
25122 {
25123 .eraseblocks = { {4 * 1024, 64} },
25124 .block_erase = erase_block_jedec,
25125 }, {
25126 .eraseblocks = { {64 * 1024, 4} },
25127 .block_erase = erase_sector_jedec,
25128 }, {
25129 .eraseblocks = { {256 * 1024, 1} },
25130 .block_erase = erase_chip_block_jedec,
25131 }
25132 },
25133 .printlock = printlock_w39l020,
25134 .write = write_jedec_1,
25135 .read = read_memmapped,
25136 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025137 .prepare_access = prepare_memory_access,
25138 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000025139 },
25140
25141 {
25142 .vendor = "Winbond",
Michael Karcher19e0aac2011-03-06 17:58:05 +000025143 .name = "W39L040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025144 .bustype = BUS_PARALLEL,
Michael Karcher19e0aac2011-03-06 17:58:05 +000025145 .manufacture_id = WINBOND_ID,
25146 .model_id = WINBOND_W39L040,
25147 .total_size = 512,
25148 .page_size = 64 * 1024,
25149 .feature_bits = FEATURE_EITHER_RESET,
25150 .tested = TEST_OK_PR,
25151 .probe = probe_jedec,
25152 .probe_timing = 10,
25153 .block_erasers =
25154 {
25155 {
25156 .eraseblocks = { {4 * 1024, 128} },
25157 .block_erase = erase_block_jedec,
25158 }, {
25159 .eraseblocks = { {64 * 1024, 8} },
25160 .block_erase = erase_sector_jedec,
25161 }, {
25162 .eraseblocks = { {512 * 1024, 1} },
25163 .block_erase = erase_chip_block_jedec,
25164 }
25165 },
25166 .printlock = printlock_w39l040,
25167 .write = write_jedec_1,
25168 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000025169 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025170 .prepare_access = prepare_memory_access,
25171 .finish_access = finish_memory_access,
Michael Karcher19e0aac2011-03-06 17:58:05 +000025172 },
25173
25174 {
25175 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025176 .name = "W39V040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025177 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025178 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025179 .model_id = WINBOND_W39V040A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025180 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000025181 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000025182 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000025183 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025184 .probe = probe_jedec,
Stefan Tauner716e0982011-07-25 20:38:52 +000025185 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025186 .block_erasers =
25187 {
25188 {
25189 .eraseblocks = { {64 * 1024, 8} },
25190 .block_erase = erase_sector_jedec,
25191 }, {
25192 .eraseblocks = { {512 * 1024, 1} },
25193 .block_erase = erase_chip_block_jedec,
25194 }
25195 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025196 .printlock = printlock_w39v040a,
Sean Nelson35727f72010-01-28 23:55:12 +000025197 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025198 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025199 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025200 .prepare_access = prepare_memory_access,
25201 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025202 },
25203
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025204 {
25205 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025206 .name = "W39V040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025207 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025208 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025209 .model_id = WINBOND_W39V040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025210 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000025211 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000025212 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000025213 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025214 .probe = probe_jedec,
Paul Menzel018d4822011-10-21 12:33:07 +000025215 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025216 .block_erasers =
25217 {
25218 {
25219 .eraseblocks = { {64 * 1024, 8} },
25220 .block_erase = erase_sector_jedec,
25221 }, {
25222 .eraseblocks = { {512 * 1024, 1} },
25223 .block_erase = erase_chip_block_jedec,
25224 }
25225 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025226 .printlock = printlock_w39v040b,
Sean Nelson35727f72010-01-28 23:55:12 +000025227 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025228 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025229 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025230 .prepare_access = prepare_memory_access,
25231 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025232 },
25233
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025234 {
25235 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025236 .name = "W39V040C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025237 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025238 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025239 .model_id = WINBOND_W39V040C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025240 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000025241 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000025242 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000025243 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000025244 .probe = probe_jedec,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025245 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025246 .block_erasers =
25247 {
25248 {
25249 .eraseblocks = { {64 * 1024, 8} },
25250 .block_erase = erase_sector_jedec,
25251 }, {
25252 .eraseblocks = { {512 * 1024, 1} },
25253 .block_erase = erase_chip_block_jedec,
25254 }
25255 },
Sean Nelson6e0b9122010-02-19 00:52:10 +000025256 .printlock = printlock_w39v040c,
Sean Nelson35727f72010-01-28 23:55:12 +000025257 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025258 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025259 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025260 .prepare_access = prepare_memory_access,
25261 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025262 },
25263
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025264 {
25265 .vendor = "Winbond",
25266 .name = "W39V040FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025267 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025268 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025269 .model_id = WINBOND_W39V040FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025270 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000025271 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025272 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000025273 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025274 .probe = probe_jedec,
Antony Rheneus0fbba982011-05-26 14:28:51 +000025275 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025276 .block_erasers =
25277 {
25278 {
25279 .eraseblocks = { {4 * 1024, 128} },
25280 .block_erase = erase_block_jedec,
25281 }, {
25282 .eraseblocks = { {64 * 1024, 8} },
25283 .block_erase = erase_sector_jedec,
25284 }, {
25285 .eraseblocks = { {512 * 1024, 1} },
25286 .block_erase = erase_chip_block_jedec,
25287 }
25288 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025289 .printlock = printlock_w39v040fa,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000025290 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000025291 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025292 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025293 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010025294 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025295 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025296 },
25297
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025298 {
25299 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025300 .name = "W39V040FB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025301 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025302 .manufacture_id = WINBOND_ID,
25303 .model_id = WINBOND_W39V040B,
25304 .total_size = 512,
25305 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025306 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner0be072c2016-03-13 15:16:30 +000025307 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025308 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000025309 .probe_timing = 10,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025310 .block_erasers =
25311 {
25312 {
25313 .eraseblocks = { {64 * 1024, 8} },
25314 .block_erase = erase_sector_jedec,
25315 }, {
25316 .eraseblocks = { {512 * 1024, 1} },
25317 .block_erase = erase_chip_block_jedec,
25318 }
25319 },
25320 .printlock = printlock_w39v040fb,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000025321 .unlock = unlock_regspace2_uniform_64k,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025322 .write = write_jedec_1,
25323 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000025324 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010025325 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025326 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025327 },
25328
25329 {
25330 .vendor = "Winbond",
25331 .name = "W39V040FC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025332 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025333 .manufacture_id = WINBOND_ID,
25334 .model_id = WINBOND_W39V040C,
25335 .total_size = 512,
25336 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025337 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauneraf2db612011-12-02 21:48:17 +000025338 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025339 .probe = probe_jedec,
25340 .probe_timing = 10,
25341 .block_erasers =
25342 {
25343 {
25344 .eraseblocks = { {64 * 1024, 8} },
25345 .block_erase = erase_sector_jedec,
25346 }, {
25347 .eraseblocks = { {512 * 1024, 1} },
25348 .block_erase = erase_chip_block_jedec,
25349 }
25350 },
25351 .printlock = printlock_w39v040fc,
25352 .write = write_jedec_1,
25353 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000025354 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010025355 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025356 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025357 },
25358
25359 {
25360 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025361 .name = "W39V080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025362 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025363 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025364 .model_id = WINBOND_W39V080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025365 .total_size = 1024,
Sean Nelson72a9a022009-12-22 22:15:33 +000025366 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000025367 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzelac427b22012-02-16 21:07:07 +000025368 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025369 .probe = probe_jedec,
Paul Menzelac427b22012-02-16 21:07:07 +000025370 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025371 .block_erasers =
25372 {
25373 {
25374 .eraseblocks = { {64 * 1024, 16} },
25375 .block_erase = erase_sector_jedec,
25376 }, {
25377 .eraseblocks = { {1024 * 1024, 1} },
25378 .block_erase = erase_chip_block_jedec,
25379 }
25380 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025381 .printlock = printlock_w39v080a,
Sean Nelson35727f72010-01-28 23:55:12 +000025382 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025383 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025384 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025385 .prepare_access = prepare_memory_access,
25386 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025387 },
25388
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025389 {
25390 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100025391 .name = "W39V080FA",
25392 .bustype = BUS_FWH,
25393 .manufacture_id = WINBOND_ID,
25394 .model_id = WINBOND_W39V080FA,
25395 .total_size = 1024,
25396 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025397 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100025398 .tested = TEST_OK_PREW,
25399 .probe = probe_jedec,
25400 .probe_timing = 10,
25401 .block_erasers =
25402 {
25403 {
25404 .eraseblocks = { {64 * 1024, 16} },
25405 .block_erase = erase_sector_jedec,
25406 }, {
25407 .eraseblocks = { {1024 * 1024, 1} },
25408 .block_erase = erase_chip_block_jedec,
25409 }
25410 },
25411 .printlock = printlock_w39v080fa,
25412 .unlock = unlock_regspace2_uniform_64k,
25413 .write = write_jedec_1,
25414 .read = read_memmapped,
25415 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010025416 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025417 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100025418 },
25419
25420 {
25421 .vendor = "Winbond",
25422 .name = "W39V080FA (dual mode)",
25423 .bustype = BUS_FWH,
25424 .manufacture_id = WINBOND_ID,
25425 .model_id = WINBOND_W39V080FA_DM,
25426 .total_size = 512,
25427 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025428 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100025429 .tested = TEST_UNTESTED,
25430 .probe = probe_jedec,
25431 .probe_timing = 10,
25432 .block_erasers =
25433 {
25434 {
25435 .eraseblocks = { {64 * 1024, 8} },
25436 .block_erase = erase_sector_jedec,
25437 }, {
25438 .eraseblocks = { {512 * 1024, 1} },
25439 .block_erase = erase_chip_block_jedec,
25440 }
25441 },
25442 .printlock = printlock_w39v080fa_dual,
25443 .write = write_jedec_1,
25444 .read = read_memmapped,
25445 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010025446 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025447 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100025448 },
25449
25450 {
25451 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000025452 .name = "W49F002U/N",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025453 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025454 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025455 .model_id = WINBOND_W49F002U,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025456 .total_size = 256,
25457 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000025458 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000025459 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025460 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000025461 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025462 .block_erasers =
25463 {
25464 {
25465 .eraseblocks = {
25466 {128 * 1024, 1},
25467 {96 * 1024, 1},
25468 {8 * 1024, 2},
25469 {16 * 1024, 1},
25470 },
25471 .block_erase = erase_sector_jedec,
25472 }, {
25473 .eraseblocks = { {256 * 1024, 1} },
25474 .block_erase = erase_chip_block_jedec,
25475 }
25476 },
Sean Nelson35727f72010-01-28 23:55:12 +000025477 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025478 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025479 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010025480 .prepare_access = prepare_memory_access,
25481 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025482 },
25483
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025484 {
25485 .vendor = "Winbond",
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000025486 .name = "W49F020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025487 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000025488 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025489 .model_id = WINBOND_W49F020,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000025490 .total_size = 256,
25491 .page_size = 128,
25492 .feature_bits = FEATURE_EITHER_RESET,
25493 .tested = TEST_OK_PROBE,
25494 .probe = probe_jedec,
25495 .probe_timing = 10,
25496 .block_erasers =
25497 {
25498 {
25499 .eraseblocks = { {256 * 1024, 1} },
25500 .block_erase = erase_chip_block_jedec,
25501 }
25502 },
25503 .write = write_jedec_1,
25504 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025505 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010025506 .prepare_access = prepare_memory_access,
25507 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000025508 },
25509
25510 {
25511 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025512 .name = "W49V002A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025513 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025514 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025515 .model_id = WINBOND_W49V002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025516 .total_size = 256,
25517 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000025518 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000025519 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025520 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000025521 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025522 .block_erasers =
25523 {
25524 {
25525 .eraseblocks = {
25526 {64 * 1024, 3},
25527 {32 * 1024, 1},
25528 {8 * 1024, 2},
25529 {16 * 1024, 1},
25530 },
25531 .block_erase = erase_sector_jedec,
25532 }, {
25533 .eraseblocks = { {256 * 1024, 1} },
25534 .block_erase = erase_chip_block_jedec,
25535 }
25536 },
Sean Nelson35727f72010-01-28 23:55:12 +000025537 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025538 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025539 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025540 .prepare_access = prepare_memory_access,
25541 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025542 },
25543
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025544 {
25545 .vendor = "Winbond",
25546 .name = "W49V002FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025547 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025548 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025549 .model_id = WINBOND_W49V002FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025550 .total_size = 256,
25551 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000025552 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000025553 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025554 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000025555 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025556 .block_erasers =
25557 {
25558 {
25559 .eraseblocks = {
25560 {64 * 1024, 3},
25561 {32 * 1024, 1},
25562 {8 * 1024, 2},
25563 {16 * 1024, 1},
25564 },
25565 .block_erase = erase_sector_jedec,
25566 }, {
25567 .eraseblocks = { {256 * 1024, 1} },
25568 .block_erase = erase_chip_block_jedec,
25569 }
25570 },
Sean Nelson35727f72010-01-28 23:55:12 +000025571 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025572 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025573 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025574 .prepare_access = prepare_memory_access,
25575 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025576 },
25577
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025578 {
luke heef884232020-12-28 18:22:21 +080025579 .vendor = "XMC",
25580 .name = "XM25QH128C",
25581 .bustype = BUS_SPI,
25582 .manufacture_id = ST_ID,
25583 .model_id = XMC_XM25QH128C,
25584 .total_size = 16384,
25585 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010025586 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
25587 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025588 .tested = TEST_UNTESTED,
25589 .probe = probe_spi_rdid,
25590 .probe_timing = TIMING_ZERO,
25591 .block_erasers =
25592 {
25593 {
25594 .eraseblocks = { {4 * 1024, 4096} },
25595 .block_erase = spi_block_erase_20,
25596 }, {
25597 .eraseblocks = { {32 * 1024, 512} },
25598 .block_erase = spi_block_erase_52,
25599 }, {
25600 .eraseblocks = { {64 * 1024, 256} },
25601 .block_erase = spi_block_erase_d8,
25602 }, {
25603 .eraseblocks = { {16 * 1024 * 1024, 1} },
25604 .block_erase = spi_block_erase_60,
25605 }, {
25606 .eraseblocks = { {16 * 1024 * 1024, 1} },
25607 .block_erase = spi_block_erase_c7,
25608 }
25609 },
25610 .printlock = spi_prettyprint_status_register_plain,
25611 .unlock = spi_disable_blockprotect,
25612 .write = spi_chip_write_256,
25613 .read = spi_chip_read,
25614 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025615 .reg_bits =
25616 {
Nico Huber96786d02024-01-06 18:30:15 +010025617 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025618 .srp = {STATUS1, 7, RW},
25619 .srl = {STATUS2, 0, RW},
25620 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
25621 .tb = {STATUS1, 5, RW},
25622 .sec = {STATUS1, 6, RW},
25623 .cmp = {STATUS2, 6, RW},
25624 },
Nico Huberaabb3e02023-01-13 00:22:30 +010025625 .wp_write_cfg = spi_wp_write_cfg,
25626 .wp_read_cfg = spi_wp_read_cfg,
25627 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025628 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020025629 .prepare_access = spi_prepare_io,
25630 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025631 },
25632
25633 {
25634 .vendor = "XMC",
25635 .name = "XM25QH256C",
25636 .bustype = BUS_SPI,
25637 .manufacture_id = ST_ID,
25638 .model_id = XMC_XM25QH256C,
25639 .total_size = 32768,
25640 .page_size = 256,
25641 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010025642 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
25643 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
25644 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025645 .tested = TEST_UNTESTED,
25646 .probe = probe_spi_rdid,
25647 .probe_timing = TIMING_ZERO,
25648 .block_erasers =
25649 {
25650 {
25651 .eraseblocks = { {4 * 1024, 8192} },
25652 .block_erase = spi_block_erase_21,
25653 }, {
25654 .eraseblocks = { {4 * 1024, 8192} },
25655 .block_erase = spi_block_erase_20,
25656 }, {
25657 .eraseblocks = { {32 * 1024, 1024} },
25658 .block_erase = spi_block_erase_52,
25659 }, {
25660 .eraseblocks = { {64 * 1024, 512} },
25661 .block_erase = spi_block_erase_dc,
25662 }, {
25663 .eraseblocks = { {64 * 1024, 512} },
25664 .block_erase = spi_block_erase_d8,
25665 }, {
25666 .eraseblocks = { {32 * 1024 * 1024, 1} },
25667 .block_erase = spi_block_erase_60,
25668 }, {
25669 .eraseblocks = { {32 * 1024 * 1024, 1} },
25670 .block_erase = spi_block_erase_c7,
25671 }
25672 },
25673 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
25674 .unlock = spi_disable_blockprotect,
25675 .write = spi_chip_write_256,
25676 .read = spi_chip_read,
25677 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025678 .reg_bits =
25679 {
Nico Huber96786d02024-01-06 18:30:15 +010025680 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025681 .srp = {STATUS1, 7, RW},
25682 .srl = {STATUS2, 0, RW},
25683 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
25684 .tb = {STATUS1, 6, RW},
25685 },
Nico Huberaabb3e02023-01-13 00:22:30 +010025686 .wp_write_cfg = spi_wp_write_cfg,
25687 .wp_read_cfg = spi_wp_read_cfg,
25688 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025689 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020025690 .prepare_access = spi_prepare_io,
25691 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025692 },
25693
25694 {
25695 .vendor = "XMC",
25696 .name = "XM25QH64C",
25697 .bustype = BUS_SPI,
25698 .manufacture_id = ST_ID,
25699 .model_id = XMC_XM25QH64C,
25700 .total_size = 8192,
25701 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010025702 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010025703 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025704 .tested = TEST_UNTESTED,
25705 .probe = probe_spi_rdid,
25706 .probe_timing = TIMING_ZERO,
25707 .block_erasers =
25708 {
25709 {
25710 .eraseblocks = { {4 * 1024, 2048} },
25711 .block_erase = spi_block_erase_20,
25712 }, {
25713 .eraseblocks = { {32 * 1024, 256} },
25714 .block_erase = spi_block_erase_52,
25715 }, {
25716 .eraseblocks = { {64 * 1024, 128} },
25717 .block_erase = spi_block_erase_d8,
25718 }, {
25719 .eraseblocks = { {8 * 1024 * 1024, 1} },
25720 .block_erase = spi_block_erase_60,
25721 }, {
25722 .eraseblocks = { {8 * 1024 * 1024, 1} },
25723 .block_erase = spi_block_erase_c7,
25724 }
25725 },
Nico Huber96786d02024-01-06 18:30:15 +010025726 .reg_bits =
25727 {
25728 .qe = {STATUS2, 1, RW},
25729 },
luke heef884232020-12-28 18:22:21 +080025730 .printlock = spi_prettyprint_status_register_plain,
25731 .unlock = spi_disable_blockprotect,
25732 .write = spi_chip_write_256,
25733 .read = spi_chip_read,
25734 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020025735 .prepare_access = spi_prepare_io,
25736 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025737 },
25738
25739 {
25740 .vendor = "XMC",
25741 .name = "XM25QU128C",
25742 .bustype = BUS_SPI,
25743 .manufacture_id = ST_ID,
25744 .model_id = XMC_XM25QU128C,
25745 .total_size = 16384,
25746 .page_size = 256,
25747 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010025748 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010025749 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025750 .tested = TEST_UNTESTED,
25751 .probe = probe_spi_rdid,
25752 .probe_timing = TIMING_ZERO,
25753 .block_erasers =
25754 {
25755 {
25756 .eraseblocks = { {4 * 1024, 4096} },
25757 .block_erase = spi_block_erase_20,
25758 }, {
25759 .eraseblocks = { {32 * 1024, 512} },
25760 .block_erase = spi_block_erase_52,
25761 }, {
25762 .eraseblocks = { {64 * 1024, 256} },
25763 .block_erase = spi_block_erase_d8,
25764 }, {
25765 .eraseblocks = { {16 * 1024 * 1024, 1} },
25766 .block_erase = spi_block_erase_60,
25767 }, {
25768 .eraseblocks = { {16 * 1024 * 1024, 1} },
25769 .block_erase = spi_block_erase_c7,
25770 }
25771 },
Nico Huber96786d02024-01-06 18:30:15 +010025772 .reg_bits =
25773 {
25774 .qe = {STATUS2, 1, RW},
25775 },
luke heef884232020-12-28 18:22:21 +080025776 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
25777 .unlock = spi_disable_blockprotect,
25778 .write = spi_chip_write_256,
25779 .read = spi_chip_read,
25780 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020025781 .prepare_access = spi_prepare_io,
25782 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025783 },
25784
25785 {
25786 .vendor = "XMC",
25787 .name = "XM25QU256C",
25788 .bustype = BUS_SPI,
25789 .manufacture_id = ST_ID,
25790 .model_id = XMC_XM25QU256C,
25791 .total_size = 32768,
25792 .page_size = 256,
25793 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010025794 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
25795 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
25796 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025797 .tested = TEST_UNTESTED,
25798 .probe = probe_spi_rdid,
25799 .probe_timing = TIMING_ZERO,
25800 .block_erasers =
25801 {
25802 {
25803 .eraseblocks = { {4 * 1024, 8192} },
25804 .block_erase = spi_block_erase_21,
25805 }, {
25806 .eraseblocks = { {4 * 1024, 8192} },
25807 .block_erase = spi_block_erase_20,
25808 }, {
25809 .eraseblocks = { {32 * 1024, 1024} },
25810 .block_erase = spi_block_erase_52,
25811 }, {
25812 .eraseblocks = { {64 * 1024, 512} },
25813 .block_erase = spi_block_erase_dc,
25814 }, {
25815 .eraseblocks = { {64 * 1024, 512} },
25816 .block_erase = spi_block_erase_d8,
25817 }, {
25818 .eraseblocks = { {32 * 1024 * 1024, 1} },
25819 .block_erase = spi_block_erase_60,
25820 }, {
25821 .eraseblocks = { {32 * 1024 * 1024, 1} },
25822 .block_erase = spi_block_erase_c7,
25823 }
25824 },
Nico Huber96786d02024-01-06 18:30:15 +010025825 .reg_bits =
25826 {
25827 .qe = {STATUS2, 1, RW},
25828 },
luke heef884232020-12-28 18:22:21 +080025829 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
25830 .unlock = spi_disable_blockprotect,
25831 .write = spi_chip_write_256,
25832 .read = spi_chip_read,
25833 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020025834 .prepare_access = spi_prepare_io,
25835 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025836 },
25837
25838 {
25839 .vendor = "XMC",
25840 .name = "XM25QU64C",
25841 .bustype = BUS_SPI,
25842 .manufacture_id = ST_ID,
25843 .model_id = XMC_XM25QU64C,
25844 .total_size = 8192,
25845 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010025846 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010025847 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025848 .tested = TEST_UNTESTED,
25849 .probe = probe_spi_rdid,
25850 .probe_timing = TIMING_ZERO,
25851 .block_erasers =
25852 {
25853 {
25854 .eraseblocks = { {4 * 1024, 2048} },
25855 .block_erase = spi_block_erase_20,
25856 }, {
25857 .eraseblocks = { {32 * 1024, 256} },
25858 .block_erase = spi_block_erase_52,
25859 }, {
25860 .eraseblocks = { {64 * 1024, 128} },
25861 .block_erase = spi_block_erase_d8,
25862 }, {
25863 .eraseblocks = { {8 * 1024 * 1024, 1} },
25864 .block_erase = spi_block_erase_60,
25865 }, {
25866 .eraseblocks = { {8 * 1024 * 1024, 1} },
25867 .block_erase = spi_block_erase_c7,
25868 }
25869 },
Nico Huber96786d02024-01-06 18:30:15 +010025870 .reg_bits =
25871 {
25872 .qe = {STATUS2, 1, RW},
25873 },
luke heef884232020-12-28 18:22:21 +080025874 .printlock = spi_prettyprint_status_register_plain,
25875 .unlock = spi_disable_blockprotect,
25876 .write = spi_chip_write_256,
25877 .read = spi_chip_read,
25878 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020025879 .prepare_access = spi_prepare_io,
25880 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025881 },
25882
25883 {
Nico Huber46e42092024-10-20 18:21:43 +020025884 .vendor = "XTX Technology",
25885 .name = "XT25F02E",
25886 .bustype = BUS_SPI,
25887 .manufacture_id = XTX_ID,
25888 .model_id = XTX_XT25F02E,
25889 .total_size = 256,
25890 .page_size = 256,
25891 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_DIO,
25892 .tested = TEST_UNTESTED,
25893 .probe = probe_spi_rdid,
25894 .probe_timing = TIMING_ZERO,
25895 .block_erasers =
25896 {
25897 {
25898 .eraseblocks = { {4 * 1024, 64} },
25899 .block_erase = spi_block_erase_20,
25900 }, {
25901 .eraseblocks = { {64 * 1024, 4} },
25902 .block_erase = spi_block_erase_d8,
25903 }, {
25904 .eraseblocks = { {256 * 1024, 1} },
25905 .block_erase = spi_block_erase_60,
25906 }, {
25907 .eraseblocks = { {256 * 1024, 1} },
25908 .block_erase = spi_block_erase_c7,
25909 },
25910 },
25911 .printlock = spi_prettyprint_status_register_default_welwip,
25912 .unlock = spi_disable_blockprotect,
25913 .write = spi_chip_write_256,
25914 .read = spi_chip_read,
25915 .voltage = {2700, 3600},
25916 .prepare_access = spi_prepare_io,
25917 .finish_access = spi_finish_io,
25918 },
25919
25920 {
25921 .vendor = "XTX Technology",
25922 .name = "XT25F04D",
25923 .bustype = BUS_SPI,
25924 .manufacture_id = XTX_ID,
25925 .model_id = XTX_XT25F04D,
25926 .total_size = 512,
25927 .page_size = 256,
25928 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_DIO,
25929 .tested = TEST_UNTESTED,
25930 .probe = probe_spi_rdid,
25931 .probe_timing = TIMING_ZERO,
25932 .block_erasers =
25933 {
25934 {
25935 .eraseblocks = { {4 * 1024, 128} },
25936 .block_erase = spi_block_erase_20,
25937 }, {
25938 .eraseblocks = { {32 * 1024, 16} },
25939 .block_erase = spi_block_erase_52,
25940 }, {
25941 .eraseblocks = { {64 * 1024, 8} },
25942 .block_erase = spi_block_erase_d8,
25943 }, {
25944 .eraseblocks = { {512 * 1024, 1} },
25945 .block_erase = spi_block_erase_60,
25946 }, {
25947 .eraseblocks = { {512 * 1024, 1} },
25948 .block_erase = spi_block_erase_c7,
25949 },
25950 },
25951 .printlock = spi_prettyprint_status_register_bp2_srwd,
25952 .unlock = spi_disable_blockprotect_bp2_srwd,
25953 .write = spi_chip_write_256,
25954 .read = spi_chip_read,
25955 .voltage = {2700, 3600},
25956 .prepare_access = spi_prepare_io,
25957 .finish_access = spi_finish_io,
25958 },
25959
25960 {
25961 .vendor = "XTX Technology",
25962 .name = "XT25F08B",
25963 .bustype = BUS_SPI,
25964 .manufacture_id = XTX_ID,
25965 .model_id = XTX_XT25F08B,
25966 .total_size = 1024,
25967 .page_size = 256,
Nico Huber37e07a82025-02-26 23:26:59 +010025968 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Nico Huber46e42092024-10-20 18:21:43 +020025969 .tested = TEST_UNTESTED,
25970 .probe = probe_spi_rdid,
25971 .probe_timing = TIMING_ZERO,
25972 .block_erasers =
25973 {
25974 {
25975 .eraseblocks = { {4 * 1024, 256} },
25976 .block_erase = spi_block_erase_20,
25977 }, {
25978 .eraseblocks = { {32 * 1024, 32} },
25979 .block_erase = spi_block_erase_52,
25980 }, {
25981 .eraseblocks = { {64 * 1024, 16} },
25982 .block_erase = spi_block_erase_d8,
25983 }, {
25984 .eraseblocks = { {1024 * 1024, 1} },
25985 .block_erase = spi_block_erase_60,
25986 }, {
25987 .eraseblocks = { {1024 * 1024, 1} },
25988 .block_erase = spi_block_erase_c7,
25989 },
25990 },
Nico Huber37e07a82025-02-26 23:26:59 +010025991 .reg_bits =
25992 {
25993 .qe = {STATUS2, 1, RW},
25994 },
Nico Huber46e42092024-10-20 18:21:43 +020025995 .printlock = spi_prettyprint_status_register_bp3_srwd,
25996 .unlock = spi_disable_blockprotect_bp3_srwd,
25997 .write = spi_chip_write_256,
25998 .read = spi_chip_read,
25999 .voltage = {2700, 3600},
26000 .prepare_access = spi_prepare_io,
26001 .finish_access = spi_finish_io,
26002 },
26003
26004 {
Nico Huberc64a8032024-10-20 19:14:19 +020026005 .vendor = "XTX Technology",
26006 .name = "XT25F16B",
26007 .bustype = BUS_SPI,
26008 .manufacture_id = XTX_ID,
26009 .model_id = XTX_XT25F16B,
26010 .total_size = 2048,
26011 .page_size = 256,
26012 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26013 FEATURE_OTP | FEATURE_QIO,
26014 .tested = TEST_UNTESTED,
26015 .probe = probe_spi_rdid,
26016 .probe_timing = TIMING_ZERO,
26017 .block_erasers =
26018 {
26019 {
26020 .eraseblocks = { {4 * 1024, 512} },
26021 .block_erase = spi_block_erase_20,
26022 }, {
26023 .eraseblocks = { {32 * 1024, 64} },
26024 .block_erase = spi_block_erase_52,
26025 }, {
26026 .eraseblocks = { {64 * 1024, 32} },
26027 .block_erase = spi_block_erase_d8,
26028 }, {
26029 .eraseblocks = { {2048 * 1024, 1} },
26030 .block_erase = spi_block_erase_60,
26031 }, {
26032 .eraseblocks = { {2048 * 1024, 1} },
26033 .block_erase = spi_block_erase_c7,
26034 },
26035 },
26036 .reg_bits =
26037 {
26038 .qe = {STATUS2, 1, RW},
26039 .srp = {STATUS1, 7, RW},
26040 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26041 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26042 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26043 .cmp = {STATUS2, 6, RW},
26044 },
26045 .wp_write_cfg = spi_wp_write_cfg,
26046 .wp_read_cfg = spi_wp_read_cfg,
26047 .wp_get_ranges = spi_wp_get_available_ranges,
26048 .decode_range = decode_range_spi25,
26049 .printlock = spi_prettyprint_status_register_bp4_srwd,
26050 .unlock = spi_disable_blockprotect_bp4_srwd,
26051 .write = spi_chip_write_256,
26052 .read = spi_chip_read,
26053 .voltage = {2700, 3600},
26054 .prepare_access = spi_prepare_io,
26055 .finish_access = spi_finish_io,
26056 },
26057
26058 {
26059 .vendor = "XTX Technology",
26060 .name = "XT25F32B",
26061 .bustype = BUS_SPI,
26062 .manufacture_id = XTX_ID,
26063 .model_id = XTX_XT25F32B,
26064 .total_size = 4096,
26065 .page_size = 256,
26066 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26067 FEATURE_OTP | FEATURE_QPI_SRP,
26068 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26069 .tested = TEST_UNTESTED,
26070 .probe = probe_spi_rdid,
26071 .probe_timing = TIMING_ZERO,
26072 .block_erasers =
26073 {
26074 {
26075 .eraseblocks = { {4 * 1024, 1024} },
26076 .block_erase = spi_block_erase_20,
26077 }, {
26078 .eraseblocks = { {32 * 1024, 128} },
26079 .block_erase = spi_block_erase_52,
26080 }, {
26081 .eraseblocks = { {64 * 1024, 64} },
26082 .block_erase = spi_block_erase_d8,
26083 }, {
26084 .eraseblocks = { {4096 * 1024, 1} },
26085 .block_erase = spi_block_erase_60,
26086 }, {
26087 .eraseblocks = { {4096 * 1024, 1} },
26088 .block_erase = spi_block_erase_c7,
26089 },
26090 },
26091 .reg_bits =
26092 {
26093 .qe = {STATUS2, 1, RW},
26094 .srp = {STATUS1, 7, RW},
26095 .srl = {STATUS2, 0, RW},
26096 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26097 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26098 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26099 .cmp = {STATUS2, 6, RW},
26100 },
26101 .wp_write_cfg = spi_wp_write_cfg,
26102 .wp_read_cfg = spi_wp_read_cfg,
26103 .wp_get_ranges = spi_wp_get_available_ranges,
26104 .decode_range = decode_range_spi25,
26105 .printlock = spi_prettyprint_status_register_bp4_srwd,
26106 .unlock = spi_disable_blockprotect_bp4_srwd,
26107 .write = spi_chip_write_256,
26108 .read = spi_chip_read,
26109 .voltage = {2700, 3600},
26110 .prepare_access = spi_prepare_io,
26111 .finish_access = spi_finish_io,
26112 },
26113
26114 {
26115 .vendor = "XTX Technology",
26116 .name = "XT25F64B",
26117 .bustype = BUS_SPI,
26118 .manufacture_id = XTX_ID,
26119 .model_id = XTX_XT25F64B,
26120 .total_size = 8192,
26121 .page_size = 256,
26122 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
26123 FEATURE_OTP | FEATURE_QPI_SRP,
26124 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26125 .tested = TEST_UNTESTED,
26126 .probe = probe_spi_rdid,
26127 .probe_timing = TIMING_ZERO,
26128 .block_erasers =
26129 {
26130 {
26131 .eraseblocks = { {4 * 1024, 2048} },
26132 .block_erase = spi_block_erase_20,
26133 }, {
26134 .eraseblocks = { {32 * 1024, 256} },
26135 .block_erase = spi_block_erase_52,
26136 }, {
26137 .eraseblocks = { {64 * 1024, 128} },
26138 .block_erase = spi_block_erase_d8,
26139 }, {
26140 .eraseblocks = { {8192 * 1024, 1} },
26141 .block_erase = spi_block_erase_60,
26142 }, {
26143 .eraseblocks = { {8192 * 1024, 1} },
26144 .block_erase = spi_block_erase_c7,
26145 },
26146 },
26147 .reg_bits =
26148 {
26149 .qe = {STATUS2, 1, RW},
26150 .srp = {STATUS1, 7, RW},
26151 .srl = {STATUS2, 0, RW},
26152 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26153 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26154 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26155 .cmp = {STATUS2, 6, RW},
26156 },
26157 .wp_write_cfg = spi_wp_write_cfg,
26158 .wp_read_cfg = spi_wp_read_cfg,
26159 .wp_get_ranges = spi_wp_get_available_ranges,
26160 .decode_range = decode_range_spi25,
26161 .printlock = spi_prettyprint_status_register_bp4_srwd,
26162 .unlock = spi_disable_blockprotect_bp4_srwd,
26163 .write = spi_chip_write_256,
26164 .read = spi_chip_read,
26165 .voltage = {2700, 3600},
26166 .prepare_access = spi_prepare_io,
26167 .finish_access = spi_finish_io,
26168 },
26169
26170 {
26171 .vendor = "XTX Technology",
26172 .name = "XT25F128B",
26173 .bustype = BUS_SPI,
26174 .manufacture_id = XTX_ID,
26175 .model_id = XTX_XT25F128B,
26176 .total_size = 16384,
26177 .page_size = 256,
26178 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
26179 FEATURE_OTP | FEATURE_QPI_SRP,
26180 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26181 .tested = TEST_UNTESTED,
26182 .probe = probe_spi_rdid,
26183 .probe_timing = TIMING_ZERO,
26184 .block_erasers =
26185 {
26186 {
26187 .eraseblocks = { {4 * 1024, 4096} },
26188 .block_erase = spi_block_erase_20,
26189 }, {
26190 .eraseblocks = { {32 * 1024, 512} },
26191 .block_erase = spi_block_erase_52,
26192 }, {
26193 .eraseblocks = { {64 * 1024, 256} },
26194 .block_erase = spi_block_erase_d8,
26195 }, {
26196 .eraseblocks = { {16384 * 1024, 1} },
26197 .block_erase = spi_block_erase_60,
26198 }, {
26199 .eraseblocks = { {16384 * 1024, 1} },
26200 .block_erase = spi_block_erase_c7,
26201 },
26202 },
26203 .reg_bits =
26204 {
26205 .qe = {STATUS2, 1, RW},
26206 .srp = {STATUS1, 7, RW},
26207 .srl = {STATUS2, 0, RW},
26208 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26209 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26210 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26211 .cmp = {STATUS2, 6, RW},
26212 .wps = {STATUS2, 4, RW},
26213 },
26214 .wp_write_cfg = spi_wp_write_cfg,
26215 .wp_read_cfg = spi_wp_read_cfg,
26216 .wp_get_ranges = spi_wp_get_available_ranges,
26217 .decode_range = decode_range_spi25,
26218 .printlock = spi_prettyprint_status_register_bp4_srwd,
26219 .unlock = spi_disable_blockprotect_bp4_srwd,
26220 .write = spi_chip_write_256,
26221 .read = spi_chip_read,
26222 .voltage = {2700, 3600},
26223 .prepare_access = spi_prepare_io,
26224 .finish_access = spi_finish_io,
26225 },
26226
26227 {
Nico Huber56d727e2024-10-20 22:46:12 +020026228 .vendor = "XTX Technology",
26229 .name = "XT25F16F",
26230 .bustype = BUS_SPI,
26231 .manufacture_id = XTX_ID,
26232 .model_id = XTX_XT25F16B,
26233 .total_size = 2048,
26234 .page_size = 256,
26235 /* Supports full QIO but has a non-volatile DC bit. */
26236 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26237 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
26238 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
26239 .tested = TEST_UNTESTED,
26240 .probe = probe_spi_rdid,
26241 .probe_timing = TIMING_ZERO,
26242 .block_erasers =
26243 {
26244 {
26245 .eraseblocks = { {4 * 1024, 512} },
26246 .block_erase = spi_block_erase_20,
26247 }, {
26248 .eraseblocks = { {32 * 1024, 64} },
26249 .block_erase = spi_block_erase_52,
26250 }, {
26251 .eraseblocks = { {64 * 1024, 32} },
26252 .block_erase = spi_block_erase_d8,
26253 }, {
26254 .eraseblocks = { {2048 * 1024, 1} },
26255 .block_erase = spi_block_erase_60,
26256 }, {
26257 .eraseblocks = { {2048 * 1024, 1} },
26258 .block_erase = spi_block_erase_c7,
26259 },
26260 },
26261 .reg_bits =
26262 {
26263 .qe = {STATUS2, 1, RW},
26264 .dc = {{STATUS3, 0, RW}},
26265 .srp = {STATUS1, 7, RW},
26266 .srl = {STATUS2, 0, RW},
26267 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26268 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26269 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26270 .cmp = {STATUS2, 6, RW},
26271 },
26272 .wp_write_cfg = spi_wp_write_cfg,
26273 .wp_read_cfg = spi_wp_read_cfg,
26274 .wp_get_ranges = spi_wp_get_available_ranges,
26275 .decode_range = decode_range_spi25,
26276 .printlock = spi_prettyprint_status_register_bp4_srwd,
26277 .unlock = spi_disable_blockprotect_bp4_srwd,
26278 .write = spi_chip_write_256,
26279 .read = spi_chip_read,
26280 .voltage = {2700, 3600},
26281 .prepare_access = spi_prepare_io,
26282 .finish_access = spi_finish_io,
26283 },
26284
26285 {
26286 .vendor = "XTX Technology",
26287 .name = "XT25F32F",
26288 .bustype = BUS_SPI,
26289 .manufacture_id = XTX_ID,
26290 .model_id = XTX_XT25F32B,
26291 .total_size = 4096,
26292 .page_size = 256,
26293 /* Supports full QIO but has a non-volatile DC bit. */
26294 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26295 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
26296 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
26297 .tested = TEST_UNTESTED,
26298 .probe = probe_spi_rdid,
26299 .probe_timing = TIMING_ZERO,
26300 .block_erasers =
26301 {
26302 {
26303 .eraseblocks = { {4 * 1024, 1024} },
26304 .block_erase = spi_block_erase_20,
26305 }, {
26306 .eraseblocks = { {32 * 1024, 128} },
26307 .block_erase = spi_block_erase_52,
26308 }, {
26309 .eraseblocks = { {64 * 1024, 64} },
26310 .block_erase = spi_block_erase_d8,
26311 }, {
26312 .eraseblocks = { {4096 * 1024, 1} },
26313 .block_erase = spi_block_erase_60,
26314 }, {
26315 .eraseblocks = { {4096 * 1024, 1} },
26316 .block_erase = spi_block_erase_c7,
26317 },
26318 },
26319 .reg_bits =
26320 {
26321 .qe = {STATUS2, 1, RW},
26322 .dc = {{STATUS3, 0, RW}},
26323 .srp = {STATUS1, 7, RW},
26324 .srl = {STATUS2, 0, RW},
26325 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26326 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26327 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26328 .cmp = {STATUS2, 6, RW},
26329 },
26330 .wp_write_cfg = spi_wp_write_cfg,
26331 .wp_read_cfg = spi_wp_read_cfg,
26332 .wp_get_ranges = spi_wp_get_available_ranges,
26333 .decode_range = decode_range_spi25,
26334 .printlock = spi_prettyprint_status_register_bp4_srwd,
26335 .unlock = spi_disable_blockprotect_bp4_srwd,
26336 .write = spi_chip_write_256,
26337 .read = spi_chip_read,
26338 .voltage = {2700, 3600},
26339 .prepare_access = spi_prepare_io,
26340 .finish_access = spi_finish_io,
26341 },
26342
26343 {
26344 .vendor = "XTX Technology",
26345 .name = "XT25F64F",
26346 .bustype = BUS_SPI,
26347 .manufacture_id = XTX_ID,
26348 .model_id = XTX_XT25F64B,
26349 .total_size = 8192,
26350 .page_size = 256,
26351 /* Supports full QIO but has a non-volatile DC bit. */
26352 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26353 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
26354 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
26355 .tested = TEST_UNTESTED,
26356 .probe = probe_spi_rdid,
26357 .probe_timing = TIMING_ZERO,
26358 .block_erasers =
26359 {
26360 {
26361 .eraseblocks = { {4 * 1024, 2048} },
26362 .block_erase = spi_block_erase_20,
26363 }, {
26364 .eraseblocks = { {32 * 1024, 256} },
26365 .block_erase = spi_block_erase_52,
26366 }, {
26367 .eraseblocks = { {64 * 1024, 128} },
26368 .block_erase = spi_block_erase_d8,
26369 }, {
26370 .eraseblocks = { {8192 * 1024, 1} },
26371 .block_erase = spi_block_erase_60,
26372 }, {
26373 .eraseblocks = { {8192 * 1024, 1} },
26374 .block_erase = spi_block_erase_c7,
26375 },
26376 },
26377 .reg_bits =
26378 {
26379 .qe = {STATUS2, 1, RW},
26380 .dc = {{STATUS3, 0, RW}},
26381 .srp = {STATUS1, 7, RW},
26382 .srl = {STATUS2, 0, RW},
26383 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26384 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26385 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26386 .cmp = {STATUS2, 6, RW},
26387 },
26388 .wp_write_cfg = spi_wp_write_cfg,
26389 .wp_read_cfg = spi_wp_read_cfg,
26390 .wp_get_ranges = spi_wp_get_available_ranges,
26391 .decode_range = decode_range_spi25,
26392 .printlock = spi_prettyprint_status_register_bp4_srwd,
26393 .unlock = spi_disable_blockprotect_bp4_srwd,
26394 .write = spi_chip_write_256,
26395 .read = spi_chip_read,
26396 .voltage = {2700, 3600},
26397 .prepare_access = spi_prepare_io,
26398 .finish_access = spi_finish_io,
26399 },
26400
26401 {
26402 .vendor = "XTX Technology",
26403 .name = "XT25F128F/XT25BF128F",
26404 .bustype = BUS_SPI,
26405 .manufacture_id = XTX_ID,
26406 .model_id = XTX_XT25F128B,
26407 .total_size = 16384,
26408 .page_size = 256,
26409 /* Supports full QIO but has a non-volatile DC bit. */
26410 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26411 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
26412 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
26413 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26414 .tested = TEST_UNTESTED,
26415 .probe = probe_spi_rdid,
26416 .probe_timing = TIMING_ZERO,
26417 .block_erasers =
26418 {
26419 {
26420 .eraseblocks = { {4 * 1024, 4096} },
26421 .block_erase = spi_block_erase_20,
26422 }, {
26423 .eraseblocks = { {32 * 1024, 512} },
26424 .block_erase = spi_block_erase_52,
26425 }, {
26426 .eraseblocks = { {64 * 1024, 256} },
26427 .block_erase = spi_block_erase_d8,
26428 }, {
26429 .eraseblocks = { {16384 * 1024, 1} },
26430 .block_erase = spi_block_erase_60,
26431 }, {
26432 .eraseblocks = { {16384 * 1024, 1} },
26433 .block_erase = spi_block_erase_c7,
26434 },
26435 },
26436 .reg_bits =
26437 {
26438 .qe = {STATUS2, 1, RW},
26439 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
26440 .srp = {STATUS1, 7, RW},
26441 .srl = {STATUS2, 0, RW},
26442 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26443 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26444 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26445 .cmp = {STATUS2, 6, RW},
26446 .wps = {STATUS3, 2, RW},
26447 },
26448 .wp_write_cfg = spi_wp_write_cfg,
26449 .wp_read_cfg = spi_wp_read_cfg,
26450 .wp_get_ranges = spi_wp_get_available_ranges,
26451 .decode_range = decode_range_spi25,
26452 .printlock = spi_prettyprint_status_register_bp4_srwd,
26453 .unlock = spi_disable_blockprotect_bp4_srwd,
26454 .write = spi_chip_write_256,
26455 .read = spi_chip_read,
26456 .voltage = {2700, 3600},
26457 .prepare_access = spi_prepare_io,
26458 .finish_access = spi_finish_io,
26459 },
26460
26461 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100026462 .vendor = "Zetta Device",
26463 .name = "ZD25D20",
26464 .bustype = BUS_SPI,
26465 .manufacture_id = ZETTADEVICE_ID,
26466 .model_id = ZETTADEVICE_ZD25D20,
26467 .total_size = 256,
26468 .page_size = 256,
26469 .feature_bits = FEATURE_WRSR_WREN,
26470 .tested = TEST_UNTESTED,
26471 .probe = probe_spi_rdid,
26472 .probe_timing = TIMING_ZERO,
26473 .block_erasers =
David Hendricksa72d5a92018-02-11 17:58:44 -080026474 {
26475 {
26476 .eraseblocks = { {4 * 1024, 64} },
26477 .block_erase = spi_block_erase_20,
26478 }, {
26479 .eraseblocks = { {32 * 1024, 8} },
26480 .block_erase = spi_block_erase_52,
26481 }, {
26482 .eraseblocks = { {64 * 1024, 4} },
26483 .block_erase = spi_block_erase_d8,
26484 }, {
26485 .eraseblocks = { {256 * 1024, 1} },
26486 .block_erase = spi_block_erase_60,
26487 }, {
26488 .eraseblocks = { {256 * 1024, 1} },
26489 .block_erase = spi_block_erase_c7,
26490 }
26491 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100026492 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
26493 .unlock = spi_disable_blockprotect,
26494 .write = spi_chip_write_256,
26495 .read = spi_chip_read,
26496 .voltage = {2700, 3600},
David Hendricksa72d5a92018-02-11 17:58:44 -080026497 },
26498
26499 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100026500 .vendor = "Zetta Device",
26501 .name = "ZD25D40",
26502 .bustype = BUS_SPI,
26503 .manufacture_id = ZETTADEVICE_ID,
26504 .model_id = ZETTADEVICE_ZD25D40,
26505 .total_size = 512,
26506 .page_size = 256,
26507 .feature_bits = FEATURE_WRSR_WREN,
26508 .tested = TEST_UNTESTED,
26509 .probe = probe_spi_rdid,
26510 .probe_timing = TIMING_ZERO,
26511 .block_erasers =
nybashcbb46e22018-02-11 17:53:49 -080026512 {
26513 {
26514 .eraseblocks = { {4 * 1024, 128} },
26515 .block_erase = spi_block_erase_20,
26516 }, {
26517 .eraseblocks = { {32 * 1024, 16} },
26518 .block_erase = spi_block_erase_52,
26519 }, {
26520 .eraseblocks = { {64 * 1024, 8} },
26521 .block_erase = spi_block_erase_d8,
26522 }, {
26523 .eraseblocks = { {512 * 1024, 1} },
26524 .block_erase = spi_block_erase_60,
26525 }, {
26526 .eraseblocks = { {512 * 1024, 1} },
26527 .block_erase = spi_block_erase_c7,
26528 }
26529 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100026530 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
26531 .unlock = spi_disable_blockprotect,
26532 .write = spi_chip_write_256,
26533 .read = spi_chip_read,
26534 .voltage = {2700, 3600},
nybashcbb46e22018-02-11 17:53:49 -080026535 },
26536
Stefan Taunerac1b4c82012-02-17 14:51:04 +000026537 {
Nico Huber34e3de62024-10-20 13:00:12 +020026538 .vendor = "Zetta Device",
26539 .name = "ZD25LQ64",
26540 .bustype = BUS_SPI,
26541 .manufacture_id = ZETTADEVICE_ID,
26542 .model_id = ZETTADEVICE_ZD25LQ64,
26543 .total_size = 8192,
26544 .page_size = 256,
26545 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR_EXT2 |
26546 FEATURE_OTP | FEATURE_QPI_SRP,
26547 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26548 .tested = TEST_UNTESTED,
26549 .probe = probe_spi_rdid,
26550 .probe_timing = TIMING_ZERO,
26551 .block_erasers =
26552 {
26553 {
26554 .eraseblocks = { {4 * 1024, 2048} },
26555 .block_erase = spi_block_erase_20,
26556 }, {
26557 .eraseblocks = { {32 * 1024, 256} },
26558 .block_erase = spi_block_erase_52,
26559 }, {
26560 .eraseblocks = { {64 * 1024, 128} },
26561 .block_erase = spi_block_erase_d8,
26562 }, {
26563 .eraseblocks = { {8192 * 1024, 1} },
26564 .block_erase = spi_block_erase_60,
26565 }, {
26566 .eraseblocks = { {8192 * 1024, 1} },
26567 .block_erase = spi_block_erase_c7,
26568 },
26569 },
26570 .reg_bits =
26571 {
26572 .qe = {STATUS2, 1, RW},
26573 .srp = {STATUS1, 7, RW},
26574 .srl = {STATUS2, 0, RW},
26575 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26576 .tb = {STATUS1, 5, RW},
26577 .sec = {STATUS1, 6, RW},
26578 .cmp = {STATUS2, 6, RW},
26579 },
26580 .wp_write_cfg = spi_wp_write_cfg,
26581 .wp_read_cfg = spi_wp_read_cfg,
26582 .wp_get_ranges = spi_wp_get_available_ranges,
26583 .decode_range = decode_range_spi25,
26584 .printlock = spi_prettyprint_status_register_bp2_srwd,
26585 .unlock = spi_disable_blockprotect_bp2_srwd,
26586 .write = spi_chip_write_256,
26587 .read = spi_chip_read,
26588 .voltage = {1650, 1950},
26589 .prepare_access = spi_prepare_io,
26590 .finish_access = spi_finish_io,
26591 },
26592
26593 {
26594 .vendor = "Zetta Device",
26595 .name = "ZD25LQ128",
26596 .bustype = BUS_SPI,
26597 .manufacture_id = ZETTADEVICE_ID,
26598 .model_id = ZETTADEVICE_ZD25LQ128,
26599 .total_size = 16384,
26600 .page_size = 256,
26601 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR_EXT2 |
26602 FEATURE_OTP | FEATURE_QPI_SRP,
26603 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26604 .tested = TEST_UNTESTED,
26605 .probe = probe_spi_rdid,
26606 .probe_timing = TIMING_ZERO,
26607 .block_erasers =
26608 {
26609 {
26610 .eraseblocks = { {4 * 1024, 4096} },
26611 .block_erase = spi_block_erase_20,
26612 }, {
26613 .eraseblocks = { {32 * 1024, 512} },
26614 .block_erase = spi_block_erase_52,
26615 }, {
26616 .eraseblocks = { {64 * 1024, 256} },
26617 .block_erase = spi_block_erase_d8,
26618 }, {
26619 .eraseblocks = { {16384 * 1024, 1} },
26620 .block_erase = spi_block_erase_60,
26621 }, {
26622 .eraseblocks = { {16384 * 1024, 1} },
26623 .block_erase = spi_block_erase_c7,
26624 },
26625 },
26626 .reg_bits =
26627 {
26628 .qe = {STATUS2, 1, RW},
26629 .srp = {STATUS1, 7, RW},
26630 .srl = {STATUS2, 0, RW},
26631 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26632 .tb = {STATUS1, 5, RW},
26633 .sec = {STATUS1, 6, RW},
26634 .cmp = {STATUS2, 6, RW},
26635 },
26636 .wp_write_cfg = spi_wp_write_cfg,
26637 .wp_read_cfg = spi_wp_read_cfg,
26638 .wp_get_ranges = spi_wp_get_available_ranges,
26639 .decode_range = decode_range_spi25,
26640 .printlock = spi_prettyprint_status_register_bp2_srwd,
26641 .unlock = spi_disable_blockprotect_bp2_srwd,
26642 .write = spi_chip_write_256,
26643 .read = spi_chip_read,
26644 .voltage = {1650, 1950},
26645 .prepare_access = spi_prepare_io,
26646 .finish_access = spi_finish_io,
26647 },
26648
26649 {
Alan Greendd592202019-08-23 10:11:37 +100026650 .vendor = "Unknown",
26651 .name = "SFDP-capable chip",
26652 .bustype = BUS_SPI,
26653 .manufacture_id = GENERIC_MANUF_ID,
26654 .model_id = SFDP_DEVICE_ID,
26655 .total_size = 0, /* set by probing function */
26656 .page_size = 0, /* set by probing function */
26657 .feature_bits = 0, /* set by probing function */
26658 /* We present our own "report this" text hence we do not */
26659 /* want the default "This flash part has status UNTESTED..." */
26660 /* text to be printed. */
26661 .tested = TEST_OK_PREW,
26662 .probe = probe_spi_sfdp,
26663 .block_erasers = {}, /* set by probing function */
26664 .unlock = spi_disable_blockprotect, /* is this safe? */
26665 .write = NULL, /* set by probing function */
26666 .read = spi_chip_read,
26667 /* FIXME: some vendor extensions define this */
26668 .voltage = {0},
26669 },
26670
26671 {
Carl-Daniel Hailfinger532c7172011-11-04 21:35:26 +000026672 .vendor = "Programmer",
26673 .name = "Opaque flash chip",
26674 .bustype = BUS_PROG,
26675 .manufacture_id = PROGMANUF_ID,
26676 .model_id = PROGDEV_ID,
26677 .total_size = 0,
26678 .page_size = 256,
26679 /* probe is assumed to work, rest will be filled in by probe */
26680 .tested = TEST_OK_PROBE,
26681 .probe = probe_opaque,
26682 /* eraseblock sizes will be set by the probing function */
26683 .block_erasers =
26684 {
26685 {
26686 .block_erase = erase_opaque,
26687 }
26688 },
26689 .write = write_opaque,
26690 .read = read_opaque,
26691 },
26692
26693 {
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000026694 .vendor = "AMIC",
26695 .name = "unknown AMIC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026696 .bustype = BUS_SPI,
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000026697 .manufacture_id = AMIC_ID,
26698 .model_id = GENERIC_DEVICE_ID,
26699 .total_size = 0,
26700 .page_size = 256,
26701 .tested = TEST_BAD_PREW,
26702 .probe = probe_spi_rdid4,
26703 .probe_timing = TIMING_ZERO,
26704 .write = NULL,
26705 .read = NULL,
26706 },
26707
26708 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026709 .vendor = "Atmel",
26710 .name = "unknown Atmel SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026711 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026712 .manufacture_id = ATMEL_ID,
26713 .model_id = GENERIC_DEVICE_ID,
26714 .total_size = 0,
26715 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026716 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026717 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026718 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026719 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026720 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026721 },
26722
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026723 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +000026724 .vendor = "Eon",
26725 .name = "unknown Eon SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026726 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026727 .manufacture_id = EON_ID_NOPREFIX,
26728 .model_id = GENERIC_DEVICE_ID,
26729 .total_size = 0,
26730 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026731 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026732 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026733 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026734 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026735 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026736 },
26737
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026738 {
26739 .vendor = "Macronix",
26740 .name = "unknown Macronix SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026741 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000026742 .manufacture_id = MACRONIX_ID,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026743 .model_id = GENERIC_DEVICE_ID,
26744 .total_size = 0,
26745 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026746 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026747 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026748 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026749 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026750 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026751 },
26752
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026753 {
26754 .vendor = "PMC",
26755 .name = "unknown PMC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026756 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026757 .manufacture_id = PMC_ID,
26758 .model_id = GENERIC_DEVICE_ID,
26759 .total_size = 0,
26760 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026761 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026762 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026763 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026764 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026765 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026766 },
26767
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026768 {
26769 .vendor = "SST",
26770 .name = "unknown SST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026771 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026772 .manufacture_id = SST_ID,
26773 .model_id = GENERIC_DEVICE_ID,
26774 .total_size = 0,
26775 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026776 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026777 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026778 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026779 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026780 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026781 },
26782
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026783 {
26784 .vendor = "ST",
26785 .name = "unknown ST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026786 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026787 .manufacture_id = ST_ID,
26788 .model_id = GENERIC_DEVICE_ID,
26789 .total_size = 0,
26790 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026791 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026792 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026793 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026794 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026795 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026796 },
Uwe Hermannfc425e82008-03-16 02:06:25 +000026797
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026798 {
Sean Nelson118e1d62009-11-24 02:08:11 +000026799 .vendor = "Sanyo",
26800 .name = "unknown Sanyo SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026801 .bustype = BUS_SPI,
Sean Nelson118e1d62009-11-24 02:08:11 +000026802 .manufacture_id = SANYO_ID,
26803 .model_id = GENERIC_DEVICE_ID,
26804 .total_size = 0,
26805 .page_size = 256,
26806 .tested = TEST_BAD_PREW,
26807 .probe = probe_spi_rdid,
26808 .probe_timing = TIMING_ZERO,
Sean Nelson118e1d62009-11-24 02:08:11 +000026809 .write = NULL,
26810 .read = NULL,
26811 },
26812
26813 {
Stefan Taunereb582572012-09-21 12:52:50 +000026814 .vendor = "Winbond",
26815 .name = "unknown Winbond (ex Nexcom) SPI chip",
26816 .bustype = BUS_SPI,
26817 .manufacture_id = WINBOND_NEX_ID,
26818 .model_id = GENERIC_DEVICE_ID,
26819 .total_size = 0,
26820 .page_size = 256,
26821 .tested = TEST_BAD_PREW,
26822 .probe = probe_spi_rdid,
26823 .probe_timing = TIMING_ZERO,
26824 .write = NULL,
26825 .read = NULL,
26826 },
26827
26828 {
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026829 .vendor = "Generic",
26830 .name = "unknown SPI chip (RDID)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026831 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026832 .manufacture_id = GENERIC_MANUF_ID,
26833 .model_id = GENERIC_DEVICE_ID,
26834 .total_size = 0,
26835 .page_size = 256,
26836 .tested = TEST_BAD_PREW,
26837 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026838 .write = NULL,
26839 },
Stefan Tauneraf2db612011-12-02 21:48:17 +000026840
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026841 {
26842 .vendor = "Generic",
26843 .name = "unknown SPI chip (REMS)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026844 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026845 .manufacture_id = GENERIC_MANUF_ID,
26846 .model_id = GENERIC_DEVICE_ID,
26847 .total_size = 0,
26848 .page_size = 256,
26849 .tested = TEST_BAD_PREW,
26850 .probe = probe_spi_rems,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026851 .write = NULL,
26852 },
26853
Stefan Tauner96658be2014-05-26 22:05:31 +000026854 {0}
Stephan Guilloux72cf5652009-04-21 01:46:07 +000026855};
Stefan Tauner96658be2014-05-26 22:05:31 +000026856
26857const unsigned int flashchips_size = ARRAY_SIZE(flashchips);