blob: 4cf7d22a5dd6a2d052dd775cb54614ae88694566 [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
Nico Huberf3113ac2026-02-21 12:50:19 +010021#include "ene.h"
Ollie Lho184a4042005-11-26 21:55:36 +000022#include "flash.h"
Carl-Daniel Hailfinger08454642009-06-15 14:14:48 +000023#include "flashchips.h"
Nico Huber6bd4f102026-02-22 23:28:13 +010024#include "chipdrivers/edi.h"
Nico Huberfbc41d22026-02-22 23:04:01 +010025#include "chipdrivers/spi.h"
Nico Huber05790292026-03-09 17:24:08 +010026#include "chipdrivers/opaque.h"
Nico Huber10337f72026-03-04 19:57:27 +010027#include "chipdrivers/memory_bus.h"
Nico Huberaabb3e02023-01-13 00:22:30 +010028#include "writeprotect.h"
Ollie Lho184a4042005-11-26 21:55:36 +000029
Uwe Hermannfc425e82008-03-16 02:06:25 +000030/**
Uwe Hermanna9720402009-05-21 15:55:46 +000031 * List of supported flash chips.
Uwe Hermannfc425e82008-03-16 02:06:25 +000032 *
Alan Green1f9cc7d2019-07-01 11:10:45 +100033 * Temporarily, this file is sorted alphabetically by vendor and name to
Nico Huberc3b02dc2023-08-12 01:13:45 +020034 * assist with merging the Chromium fork of flashprog.
Alan Green1f9cc7d2019-07-01 11:10:45 +100035 *
36 * The usual intention is that that this list is sorted by vendor, then chip
Nico Huberc3b02dc2023-08-12 01:13:45 +020037 * family and chip density, which is useful for the output of 'flashprog -L'.
Uwe Hermannfc425e82008-03-16 02:06:25 +000038 */
Carl-Daniel Hailfinger4c823182011-05-04 00:39:50 +000039const struct flashchip flashchips[] = {
Uwe Hermannfc425e82008-03-16 02:06:25 +000040
Carl-Daniel Hailfinger21eedec2009-07-23 12:42:01 +000041 /*
42 * .vendor = Vendor name
43 * .name = Chip name
44 * .bustype = Supported flash bus types (Parallel, LPC...)
Nico Huber11136c22023-05-01 12:00:09 +020045 * .id.type = Type of the ID information (used to match probing method etc.)
46 * .id.manufacture = Manufacturer chip ID
47 * .id.model = Model chip ID
Carl-Daniel Hailfinger21eedec2009-07-23 12:42:01 +000048 * .total_size = Total size in (binary) kbytes
49 * .page_size = Page or eraseblock(?) size in bytes
50 * .tested = Test status
Carl-Daniel Hailfinger21eedec2009-07-23 12:42:01 +000051 * .probe_timing = Probe function delay
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000052 * .block_erasers[] = Array of erase layouts and erase functions
53 * {
54 * .eraseblocks[] = Array of { blocksize, blockcount }
55 * .block_erase = Block erase function
56 * }
Sean Nelson6e0b9122010-02-19 00:52:10 +000057 * .printlock = Chip lock status function
58 * .unlock = Chip unlock function
Carl-Daniel Hailfinger21eedec2009-07-23 12:42:01 +000059 * .write = Chip write function
60 * .read = Chip read function
Steven Zakuleccbe370e2011-06-03 07:26:31 +000061 * .voltage = Voltage range in millivolt
FENG yu ningff692fb2008-12-08 18:15:10 +000062 */
63
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000064 {
65 .vendor = "AMD",
66 .name = "Am29F002(N)BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000067 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +020068 .id.type = ID_JEDEC,
69 .id.manufacture = AMD_ID,
70 .id.model = AMD_AM29F002BB,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000071 .total_size = 256,
72 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000073 .feature_bits = FEATURE_SHORT_RESET | FEATURE_ADDR_2AA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000074 .tested = TEST_UNTESTED,
Udu Ogahc04ee222009-09-05 01:31:32 +000075 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +000076 .block_erasers =
77 {
78 {
79 .eraseblocks = {
80 {16 * 1024, 1},
81 {8 * 1024, 2},
82 {32 * 1024, 1},
83 {64 * 1024, 3},
84 },
85 .block_erase = erase_sector_jedec,
86 }, {
87 .eraseblocks = { {256 * 1024, 1} },
88 .block_erase = erase_chip_block_jedec,
89 },
90 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000091 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000092 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000093 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010094 .prepare_access = prepare_memory_access,
95 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000096 },
97
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000098 {
99 .vendor = "AMD",
100 .name = "Am29F002(N)BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000101 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200102 .id.type = ID_JEDEC,
103 .id.manufacture = AMD_ID,
104 .id.model = AMD_AM29F002BT,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000105 .total_size = 256,
106 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +0000107 .feature_bits = FEATURE_EITHER_RESET | FEATURE_ADDR_2AA,
108 .tested = TEST_UNTESTED,
Udu Ogahc04ee222009-09-05 01:31:32 +0000109 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000110 .block_erasers =
111 {
112 {
113 .eraseblocks = {
114 {64 * 1024, 3},
115 {32 * 1024, 1},
116 {8 * 1024, 2},
117 {16 * 1024, 1},
118 },
119 .block_erase = erase_sector_jedec,
120 }, {
121 .eraseblocks = { {256 * 1024, 1} },
122 .block_erase = erase_chip_block_jedec,
123 },
124 },
Michael Karcher1c296ca2009-11-27 17:49:42 +0000125 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000126 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000127 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +0100128 .prepare_access = prepare_memory_access,
129 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +0000130 },
131
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000132 {
133 .vendor = "AMD",
Alan Green1f9cc7d2019-07-01 11:10:45 +1000134 .name = "Am29F010",
135 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200136 .id.type = ID_JEDEC,
137 .id.manufacture = AMD_ID,
138 .id.model = AMD_AM29F010,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000139 .total_size = 128,
140 .page_size = 16 * 1024,
141 .feature_bits = FEATURE_SHORT_RESET,
142 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000143 .probe_timing = TIMING_ZERO,
144 .block_erasers =
145 {
146 {
147 .eraseblocks = { {16 * 1024, 8} },
148 .block_erase = erase_sector_jedec,
149 }, {
150 .eraseblocks = { {128 * 1024, 1} },
151 .block_erase = erase_chip_block_jedec,
152 },
153 },
154 .write = write_jedec_1,
155 .read = read_memmapped,
156 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100157 .prepare_access = prepare_memory_access,
158 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000159 },
160
161 {
162 .vendor = "AMD",
Nico Huber533ea712026-07-19 15:52:21 +0200163 .name = "Am29F010(A/B)",
Alan Green1f9cc7d2019-07-01 11:10:45 +1000164 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200165 .id.type = ID_JEDEC,
166 .id.manufacture = AMD_ID,
167 .id.model = AMD_AM29F010,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000168 .total_size = 128,
169 .page_size = 16 * 1024,
170 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Alan Greena4e579f2019-07-24 14:18:39 +1000171 .tested = TEST_OK_PRE,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000172 .probe_timing = TIMING_ZERO,
173 .block_erasers =
174 {
175 {
176 .eraseblocks = { {16 * 1024, 8} },
177 .block_erase = erase_sector_jedec,
178 }, {
179 .eraseblocks = { {128 * 1024, 1} },
180 .block_erase = erase_chip_block_jedec,
181 },
182 },
183 .write = write_jedec_1,
184 .read = read_memmapped,
185 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100186 .prepare_access = prepare_memory_access,
187 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000188 },
189
190 {
191 .vendor = "AMD",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000192 .name = "Am29F016D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000193 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200194 .id.type = ID_JEDEC,
195 .id.manufacture = AMD_ID,
196 .id.model = AMD_AM29F016D,
Sean Nelson72a9a022009-12-22 22:15:33 +0000197 .total_size = 2 * 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000198 .page_size = 64 * 1024,
Nico Huber0c39ddb2026-03-06 22:17:33 +0100199 .feature_bits = FEATURE_SHORT_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000200 .tested = TEST_UNTESTED,
David Borg204f4652010-12-04 03:26:40 +0000201 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000202 .block_erasers =
203 {
204 {
205 .eraseblocks = { {64 * 1024, 32} },
Sean Nelson35727f72010-01-28 23:55:12 +0000206 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000207 }, {
208 .eraseblocks = { {2048 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000209 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000210 },
211 },
Sean Nelson35727f72010-01-28 23:55:12 +0000212 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000213 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000214 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100215 .prepare_access = prepare_memory_access,
216 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +0000217 },
218
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000219 {
220 .vendor = "AMD",
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000221 .name = "Am29F040",
222 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200223 .id.type = ID_JEDEC,
224 .id.manufacture = AMD_ID,
225 .id.model = AMD_AM29F040,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000226 .total_size = 512,
227 .page_size = 64 * 1024,
228 .feature_bits = FEATURE_EITHER_RESET,
229 .tested = TEST_UNTESTED,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000230 .probe_timing = TIMING_ZERO,
231 .block_erasers =
232 {
233 {
234 .eraseblocks = { {64 * 1024, 8} },
235 .block_erase = erase_sector_jedec,
236 }, {
237 .eraseblocks = { {512 * 1024, 1} },
238 .block_erase = erase_chip_block_jedec,
239 },
240 },
241 .write = write_jedec_1,
242 .read = read_memmapped,
243 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100244 .prepare_access = prepare_memory_access,
245 .finish_access = finish_memory_access,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000246 },
247
248 {
249 .vendor = "AMD",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000250 .name = "Am29F040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000251 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200252 .id.type = ID_JEDEC,
253 .id.manufacture = AMD_ID,
254 .id.model = AMD_AM29F040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000255 .total_size = 512,
256 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +0000257 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
258 .tested = TEST_UNTESTED,
David Borg204f4652010-12-04 03:26:40 +0000259 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000260 .block_erasers =
261 {
262 {
263 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +0000264 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000265 }, {
266 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000267 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000268 },
269 },
Sean Nelson35727f72010-01-28 23:55:12 +0000270 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000271 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000272 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100273 .prepare_access = prepare_memory_access,
274 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +0000275 },
276
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000277 {
278 .vendor = "AMD",
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000279 .name = "Am29F080",
280 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200281 .id.type = ID_JEDEC,
282 .id.manufacture = AMD_ID,
283 .id.model = AMD_AM29F080,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000284 .total_size = 1024,
285 .page_size = 64 * 1024,
286 .feature_bits = FEATURE_EITHER_RESET,
287 .tested = TEST_UNTESTED,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000288 .probe_timing = TIMING_ZERO,
289 .block_erasers =
290 {
291 {
292 .eraseblocks = { {64 * 1024, 16} },
293 .block_erase = erase_sector_jedec,
294 }, {
295 .eraseblocks = { {1024 * 1024, 1} },
296 .block_erase = erase_chip_block_jedec,
297 },
298 },
299 .write = write_jedec_1,
300 .read = read_memmapped,
301 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100302 .prepare_access = prepare_memory_access,
303 .finish_access = finish_memory_access,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000304 },
305
306 {
307 .vendor = "AMD",
Peter Stuge8440cc02009-01-25 23:55:12 +0000308 .name = "Am29F080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000309 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200310 .id.type = ID_JEDEC,
311 .id.manufacture = AMD_ID,
312 .id.model = AMD_AM29F080,
Peter Stuge8440cc02009-01-25 23:55:12 +0000313 .total_size = 1024,
314 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +0000315 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Peter Stuge8440cc02009-01-25 23:55:12 +0000316 .tested = TEST_UNTESTED,
Udu Ogahc04ee222009-09-05 01:31:32 +0000317 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000318 .block_erasers =
319 {
320 {
321 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson35727f72010-01-28 23:55:12 +0000322 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000323 }, {
324 .eraseblocks = { {1024 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000325 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000326 },
327 },
Sean Nelson35727f72010-01-28 23:55:12 +0000328 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000329 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000330 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100331 .prepare_access = prepare_memory_access,
332 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +0000333 },
334
335 {
336 .vendor = "AMD",
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000337 .name = "Am29LV001BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000338 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200339 .id.type = ID_JEDEC,
340 .id.manufacture = AMD_ID,
341 .id.model = AMD_AM29LV001BB,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000342 .total_size = 128,
343 .page_size = 64 * 1024, /* unused */
344 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
345 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000346 .probe_timing = TIMING_ZERO,
347 .block_erasers =
348 {
349 {
350 .eraseblocks = {
351 {8 * 1024, 1},
352 {4 * 1024, 2},
353 {16 * 1024, 7},
354 },
355 .block_erase = erase_sector_jedec,
356 }, {
357 .eraseblocks = { {128 * 1024, 1} },
358 .block_erase = erase_chip_block_jedec,
359 },
360 },
361 .write = write_jedec_1,
362 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000363 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100364 .prepare_access = prepare_memory_access,
365 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000366 },
367
368 {
369 .vendor = "AMD",
370 .name = "Am29LV001BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000371 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200372 .id.type = ID_JEDEC,
373 .id.manufacture = AMD_ID,
374 .id.model = AMD_AM29LV001BT,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000375 .total_size = 128,
376 .page_size = 64 * 1024, /* unused */
377 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
378 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000379 .probe_timing = TIMING_ZERO,
380 .block_erasers =
381 {
382 {
383 .eraseblocks = {
384 {16 * 1024, 7},
385 {4 * 1024, 2},
386 {8 * 1024, 1},
387 },
388 .block_erase = erase_sector_jedec,
389 }, {
390 .eraseblocks = { {128 * 1024, 1} },
391 .block_erase = erase_chip_block_jedec,
392 },
393 },
394 .write = write_jedec_1,
395 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000396 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100397 .prepare_access = prepare_memory_access,
398 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000399 },
400
401 {
402 .vendor = "AMD",
403 .name = "Am29LV002BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000404 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200405 .id.type = ID_JEDEC,
406 .id.manufacture = AMD_ID,
407 .id.model = AMD_AM29LV002BB,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000408 .total_size = 256,
409 .page_size = 64 * 1024, /* unused */
410 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
411 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000412 .probe_timing = TIMING_ZERO,
413 .block_erasers =
414 {
415 {
416 .eraseblocks = {
417 {16 * 1024, 1},
418 {8 * 1024, 2},
419 {32 * 1024, 1},
420 {64 * 1024, 3},
421 },
422 .block_erase = erase_sector_jedec,
423 }, {
424 .eraseblocks = { {256 * 1024, 1} },
425 .block_erase = erase_chip_block_jedec,
426 },
427 },
428 .write = write_jedec_1,
429 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000430 .voltage = {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100431 .prepare_access = prepare_memory_access,
432 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000433 },
434
435 {
436 .vendor = "AMD",
437 .name = "Am29LV002BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000438 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200439 .id.type = ID_JEDEC,
440 .id.manufacture = AMD_ID,
441 .id.model = AMD_AM29LV002BT,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000442 .total_size = 256,
443 .page_size = 64 * 1024, /* unused */
444 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
445 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000446 .probe_timing = TIMING_ZERO,
447 .block_erasers =
448 {
449 {
450 .eraseblocks = {
451 {64 * 1024, 3},
452 {32 * 1024, 1},
453 {8 * 1024, 2},
454 {16 * 1024, 1},
455 },
456 .block_erase = erase_sector_jedec,
457 }, {
458 .eraseblocks = { {256 * 1024, 1} },
459 .block_erase = erase_chip_block_jedec,
460 },
461 },
462 .write = write_jedec_1,
463 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000464 .voltage = {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100465 .prepare_access = prepare_memory_access,
466 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000467 },
468
469 {
470 .vendor = "AMD",
471 .name = "Am29LV004BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000472 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200473 .id.type = ID_JEDEC,
474 .id.manufacture = AMD_ID,
475 .id.model = AMD_AM29LV004BB,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000476 .total_size = 512,
477 .page_size = 64 * 1024, /* unused */
478 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
479 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000480 .probe_timing = TIMING_ZERO,
481 .block_erasers =
482 {
483 {
484 .eraseblocks = {
485 {16 * 1024, 1},
486 {8 * 1024, 2},
487 {32 * 1024, 1},
488 {64 * 1024, 7},
489 },
490 .block_erase = erase_sector_jedec,
491 }, {
492 .eraseblocks = { {512 * 1024, 1} },
493 .block_erase = erase_chip_block_jedec,
494 },
495 },
496 .write = write_jedec_1,
497 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000498 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +0100499 .prepare_access = prepare_memory_access,
500 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000501 },
502
503 {
504 .vendor = "AMD",
505 .name = "Am29LV004BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000506 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200507 .id.type = ID_JEDEC,
508 .id.manufacture = AMD_ID,
509 .id.model = AMD_AM29LV004BT,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000510 .total_size = 512,
511 .page_size = 64 * 1024, /* unused */
512 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
513 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000514 .probe_timing = TIMING_ZERO,
515 .block_erasers =
516 {
517 {
518 .eraseblocks = {
519 {64 * 1024, 7},
520 {32 * 1024, 1},
521 {8 * 1024, 2},
522 {16 * 1024, 1},
523 },
524 .block_erase = erase_sector_jedec,
525 }, {
526 .eraseblocks = { {512 * 1024, 1} },
527 .block_erase = erase_chip_block_jedec,
528 },
529 },
530 .write = write_jedec_1,
531 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000532 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +0100533 .prepare_access = prepare_memory_access,
534 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000535 },
536
537 {
538 .vendor = "AMD",
539 .name = "Am29LV008BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000540 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200541 .id.type = ID_JEDEC,
542 .id.manufacture = AMD_ID,
543 .id.model = AMD_AM29LV008BB,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000544 .total_size = 1024,
545 .page_size = 64 * 1024, /* unused */
546 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Uwe Hermann09ebd522011-08-25 22:54:23 +0000547 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000548 .probe_timing = TIMING_ZERO,
549 .block_erasers =
550 {
551 {
552 .eraseblocks = {
553 {16 * 1024, 1},
554 {8 * 1024, 2},
555 {32 * 1024, 1},
556 {64 * 1024, 15},
557 },
558 .block_erase = erase_sector_jedec,
559 }, {
560 .eraseblocks = { {1024 * 1024, 1} },
561 .block_erase = erase_chip_block_jedec,
562 },
563 },
564 .write = write_jedec_1,
565 .read = read_memmapped,
Alan Greenf5ad6882019-06-27 12:09:13 +1000566 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100567 .prepare_access = prepare_memory_access,
568 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000569 },
570
571 {
572 .vendor = "AMD",
573 .name = "Am29LV008BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000574 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200575 .id.type = ID_JEDEC,
576 .id.manufacture = AMD_ID,
577 .id.model = AMD_AM29LV008BT,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000578 .total_size = 1024,
579 .page_size = 64 * 1024, /* unused */
580 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
581 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000582 .probe_timing = TIMING_ZERO,
583 .block_erasers =
584 {
585 {
586 .eraseblocks = {
587 {64 * 1024, 15},
588 {32 * 1024, 1},
589 {8 * 1024, 2},
590 {16 * 1024, 1},
591 },
592 .block_erase = erase_sector_jedec,
593 }, {
594 .eraseblocks = { {1024 * 1024, 1} },
595 .block_erase = erase_chip_block_jedec,
596 },
597 },
598 .write = write_jedec_1,
599 .read = read_memmapped,
Alan Greenf5ad6882019-06-27 12:09:13 +1000600 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100601 .prepare_access = prepare_memory_access,
602 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000603 },
604
605 {
606 .vendor = "AMD",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000607 .name = "Am29LV040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000608 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200609 .id.type = ID_JEDEC,
610 .id.manufacture = AMD_ID,
611 .id.model = AMD_AM29LV040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000612 .total_size = 512,
613 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +0000614 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +0000615 .tested = TEST_OK_PRE,
David Borg204f4652010-12-04 03:26:40 +0000616 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000617 .block_erasers =
618 {
619 {
620 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +0000621 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000622 }, {
623 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000624 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000625 },
626 },
Sean Nelson35727f72010-01-28 23:55:12 +0000627 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000628 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000629 .voltage = {3000, 3600}, /* 3.0-3.6V for type -60R, others 2.7-3.6V*/
Nico Huber9eec4072023-01-12 01:17:30 +0100630 .prepare_access = prepare_memory_access,
631 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +0000632 },
633
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000634 {
Peter Stuge8440cc02009-01-25 23:55:12 +0000635 .vendor = "AMD",
636 .name = "Am29LV081B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000637 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +0200638 .id.type = ID_JEDEC,
639 .id.manufacture = AMD_ID,
640 .id.model = AMD_AM29LV080B,
Peter Stuge8440cc02009-01-25 23:55:12 +0000641 .total_size = 1024,
642 .page_size = 64 * 1024,
David Borg204f4652010-12-04 03:26:40 +0000643 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, /* datasheet specifies address as don't care */
Peter Stuge8440cc02009-01-25 23:55:12 +0000644 .tested = TEST_UNTESTED,
David Borg204f4652010-12-04 03:26:40 +0000645 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000646 .block_erasers =
647 {
648 {
649 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson35727f72010-01-28 23:55:12 +0000650 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000651 }, {
652 .eraseblocks = { {1024 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000653 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000654 },
655 },
Sean Nelson35727f72010-01-28 23:55:12 +0000656 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000657 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000658 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100659 .prepare_access = prepare_memory_access,
660 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +0000661 },
662
663 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000664 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +1000665 .name = "A25L010",
666 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +0200667 .id.type = ID_SPI_RDID,
668 .id.manufacture = AMIC_ID_NOPREFIX,
669 .id.model = AMIC_A25L010,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000670 .total_size = 128,
671 .page_size = 256,
672 .feature_bits = FEATURE_WRSR_WREN,
673 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000674 .probe_timing = TIMING_ZERO,
675 .block_erasers =
676 {
677 {
678 .eraseblocks = { { 4 * 1024, 32 } },
679 .block_erase = spi_block_erase_20,
680 }, {
681 .eraseblocks = { { 64 * 1024, 2 } },
682 .block_erase = spi_block_erase_d8,
683 }, {
684 .eraseblocks = { { 128 * 1024, 1 } },
685 .block_erase = spi_block_erase_c7,
686 }
687 },
688 .printlock = spi_prettyprint_status_register_bp2_srwd,
689 .unlock = spi_disable_blockprotect,
690 .write = spi_chip_write_256,
691 .read = spi_chip_read,
692 .voltage = {2700, 3600},
693 },
694
695 {
696 .vendor = "AMIC",
697 .name = "A25L016",
698 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +0200699 .id.type = ID_SPI_RDID,
700 .id.manufacture = AMIC_ID_NOPREFIX,
701 .id.model = AMIC_A25L016,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000702 .total_size = 2048,
703 .page_size = 256,
704 .feature_bits = FEATURE_WRSR_WREN,
705 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000706 .probe_timing = TIMING_ZERO,
707 .block_erasers =
708 {
709 {
710 .eraseblocks = { { 4 * 1024, 512 } },
711 .block_erase = spi_block_erase_20,
712 }, {
713 .eraseblocks = { { 64 * 1024, 32 } },
714 .block_erase = spi_block_erase_d8,
715 }, {
716 .eraseblocks = { { 2048 * 1024, 1 } },
717 .block_erase = spi_block_erase_c7,
718 }
719 },
720 .printlock = spi_prettyprint_status_register_bp2_srwd,
721 .unlock = spi_disable_blockprotect,
722 .write = spi_chip_write_256,
723 .read = spi_chip_read,
724 .voltage = {2700, 3600},
725 },
726
727 {
728 .vendor = "AMIC",
729 .name = "A25L020",
730 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +0200731 .id.type = ID_SPI_RDID,
732 .id.manufacture = AMIC_ID_NOPREFIX,
733 .id.model = AMIC_A25L020,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000734 .total_size = 256,
735 .page_size = 256,
736 .feature_bits = FEATURE_WRSR_WREN,
737 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000738 .probe_timing = TIMING_ZERO,
739 .block_erasers =
740 {
741 {
742 .eraseblocks = { { 4 * 1024, 64 } },
743 .block_erase = spi_block_erase_20,
744 }, {
745 .eraseblocks = { { 64 * 1024, 4 } },
746 .block_erase = spi_block_erase_d8,
747 }, {
748 .eraseblocks = { { 256 * 1024, 1 } },
749 .block_erase = spi_block_erase_c7,
750 }
751 },
752 .printlock = spi_prettyprint_status_register_bp2_srwd,
753 .unlock = spi_disable_blockprotect,
754 .write = spi_chip_write_256,
755 .read = spi_chip_read,
756 .voltage = {2700, 3600},
757 },
758
759 {
760 .vendor = "AMIC",
761 .name = "A25L032",
762 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +0200763 .id.type = ID_SPI_RDID,
764 .id.manufacture = AMIC_ID_NOPREFIX,
765 .id.model = AMIC_A25L032,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000766 .total_size = 4096,
767 .page_size = 256,
768 /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
769 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
770 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000771 .probe_timing = TIMING_ZERO,
772 .block_erasers =
773 {
774 {
775 .eraseblocks = { { 4 * 1024, 1024 } },
776 .block_erase = spi_block_erase_20,
777 }, {
778 .eraseblocks = { { 64 * 1024, 64 } },
779 .block_erase = spi_block_erase_52,
780 }, {
781 .eraseblocks = { { 64 * 1024, 64 } },
782 .block_erase = spi_block_erase_d8,
783 }, {
784 .eraseblocks = { { 4096 * 1024, 1 } },
785 .block_erase = spi_block_erase_60,
786 }, {
787 .eraseblocks = { { 4096 * 1024, 1 } },
788 .block_erase = spi_block_erase_c7,
789 }
790 },
791 .printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
792 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
793 .write = spi_chip_write_256,
794 .read = spi_chip_read,
795 .voltage = {2700, 3600},
796 },
797
798 {
799 .vendor = "AMIC",
800 .name = "A25L040",
801 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +0200802 .id.type = ID_SPI_RDID,
803 .id.manufacture = AMIC_ID_NOPREFIX,
804 .id.model = AMIC_A25L040,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000805 .total_size = 512,
806 .page_size = 256,
807 .feature_bits = FEATURE_WRSR_WREN,
808 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000809 .probe_timing = TIMING_ZERO,
810 .block_erasers =
811 {
812 {
813 .eraseblocks = { { 4 * 1024, 128 } },
814 .block_erase = spi_block_erase_20,
815 }, {
816 .eraseblocks = { { 64 * 1024, 8 } },
817 .block_erase = spi_block_erase_d8,
818 }, {
819 .eraseblocks = { { 512 * 1024, 1 } },
820 .block_erase = spi_block_erase_c7,
821 }
822 },
823 .printlock = spi_prettyprint_status_register_bp2_srwd,
824 .unlock = spi_disable_blockprotect,
825 .write = spi_chip_write_256,
826 .read = spi_chip_read,
827 .voltage = {2700, 3600},
828 },
829
830 {
831 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000832 .name = "A25L05PT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000833 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +0200834 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +0200835 .id.manufacture = AMIC_ID,
836 .id.model = AMIC_A25L05PT,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000837 .total_size = 64,
838 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +0000839 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000840 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000841 .probe_timing = TIMING_ZERO,
842 .block_erasers =
843 {
844 {
845 .eraseblocks = {
846 {32 * 1024, 1},
847 {16 * 1024, 1},
848 {8 * 1024, 1},
849 {4 * 1024, 2},
850 },
851 .block_erase = spi_block_erase_d8,
852 }, {
853 .eraseblocks = { {64 * 1024, 1} },
854 .block_erase = spi_block_erase_c7,
855 }
856 },
Stefan Tauner12f3d512014-05-27 21:27:27 +0000857 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000858 .unlock = spi_disable_blockprotect,
859 .write = spi_chip_write_256,
860 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000861 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000862 },
863
864 {
865 .vendor = "AMIC",
866 .name = "A25L05PU",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000867 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +0200868 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +0200869 .id.manufacture = AMIC_ID,
870 .id.model = AMIC_A25L05PU,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000871 .total_size = 64,
872 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +0000873 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000874 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000875 .probe_timing = TIMING_ZERO,
876 .block_erasers =
877 {
878 {
879 .eraseblocks = {
880 {4 * 1024, 2},
881 {8 * 1024, 1},
882 {16 * 1024, 1},
883 {32 * 1024, 1},
884 },
885 .block_erase = spi_block_erase_d8,
886 }, {
887 .eraseblocks = { {64 * 1024, 1} },
888 .block_erase = spi_block_erase_c7,
889 }
890 },
Stefan Tauner12f3d512014-05-27 21:27:27 +0000891 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000892 .unlock = spi_disable_blockprotect,
893 .write = spi_chip_write_256,
894 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000895 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000896 },
897
898 {
899 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +1000900 .name = "A25L080",
901 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +0200902 .id.type = ID_SPI_RDID,
903 .id.manufacture = AMIC_ID_NOPREFIX,
904 .id.model = AMIC_A25L080,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000905 .total_size = 1024,
906 .page_size = 256,
907 .feature_bits = FEATURE_WRSR_WREN,
908 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000909 .probe_timing = TIMING_ZERO,
910 .block_erasers =
911 {
912 {
913 .eraseblocks = { { 4 * 1024, 256 } },
914 .block_erase = spi_block_erase_20,
915 }, {
916 .eraseblocks = { { 64 * 1024, 16 } },
917 .block_erase = spi_block_erase_d8,
918 }, {
919 .eraseblocks = { { 1024 * 1024, 1 } },
920 .block_erase = spi_block_erase_c7,
921 }
922 },
923 .printlock = spi_prettyprint_status_register_bp2_srwd,
924 .unlock = spi_disable_blockprotect,
925 .write = spi_chip_write_256,
926 .read = spi_chip_read,
927 .voltage = {2700, 3600},
928 },
929
930 {
931 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000932 .name = "A25L10PT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000933 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +0200934 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +0200935 .id.manufacture = AMIC_ID,
936 .id.model = AMIC_A25L10PT,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000937 .total_size = 128,
938 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +0000939 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000940 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000941 .probe_timing = TIMING_ZERO,
942 .block_erasers =
943 {
944 {
945 .eraseblocks = {
946 {64 * 1024, 1},
947 {32 * 1024, 1},
948 {16 * 1024, 1},
949 {8 * 1024, 1},
950 {4 * 1024, 2},
951 },
952 .block_erase = spi_block_erase_d8,
953 }, {
954 .eraseblocks = { {128 * 1024, 1} },
955 .block_erase = spi_block_erase_c7,
956 }
957 },
Stefan Tauner12f3d512014-05-27 21:27:27 +0000958 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000959 .unlock = spi_disable_blockprotect,
960 .write = spi_chip_write_256,
961 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000962 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000963 },
964
965 {
966 .vendor = "AMIC",
967 .name = "A25L10PU",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000968 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +0200969 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +0200970 .id.manufacture = AMIC_ID,
971 .id.model = AMIC_A25L10PU,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000972 .total_size = 128,
973 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +0000974 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000975 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000976 .probe_timing = TIMING_ZERO,
977 .block_erasers =
978 {
979 {
980 .eraseblocks = {
981 {4 * 1024, 2},
982 {8 * 1024, 1},
983 {16 * 1024, 1},
984 {32 * 1024, 1},
985 {64 * 1024, 1},
986 },
987 .block_erase = spi_block_erase_d8,
988 }, {
989 .eraseblocks = { {128 * 1024, 1} },
990 .block_erase = spi_block_erase_c7,
991 }
992 },
Stefan Tauner12f3d512014-05-27 21:27:27 +0000993 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000994 .unlock = spi_disable_blockprotect,
995 .write = spi_chip_write_256,
996 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000997 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000998 },
999
1000 {
1001 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +10001002 .name = "A25L16PT",
1003 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +02001004 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +02001005 .id.manufacture = AMIC_ID,
1006 .id.model = AMIC_A25L16PT,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001007 .total_size = 2048,
1008 .page_size = 256,
1009 .feature_bits = FEATURE_WRSR_WREN,
1010 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001011 .probe_timing = TIMING_ZERO,
1012 .block_erasers =
1013 {
1014 {
1015 .eraseblocks = {
1016 {64 * 1024, 31},
1017 {32 * 1024, 1},
1018 {16 * 1024, 1},
1019 {8 * 1024, 1},
1020 {4 * 1024, 2},
1021 },
1022 .block_erase = spi_block_erase_d8,
1023 }, {
1024 .eraseblocks = { {2048 * 1024, 1} },
1025 .block_erase = spi_block_erase_60,
1026 }, {
1027 .eraseblocks = { {2048 * 1024, 1} },
1028 .block_erase = spi_block_erase_c7,
1029 }
1030 },
1031 .printlock = spi_prettyprint_status_register_bp2_srwd,
1032 .unlock = spi_disable_blockprotect,
1033 .write = spi_chip_write_256,
1034 .read = spi_chip_read,
1035 .voltage = {2700, 3600},
1036 },
1037
1038 {
1039 .vendor = "AMIC",
1040 .name = "A25L16PU",
1041 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +02001042 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +02001043 .id.manufacture = AMIC_ID,
1044 .id.model = AMIC_A25L16PU,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001045 .total_size = 2048,
1046 .page_size = 256,
1047 .feature_bits = FEATURE_WRSR_WREN,
1048 .tested = TEST_OK_PR,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001049 .probe_timing = TIMING_ZERO,
1050 .block_erasers =
1051 {
1052 {
1053 .eraseblocks = {
1054 {4 * 1024, 2},
1055 {8 * 1024, 1},
1056 {16 * 1024, 1},
1057 {32 * 1024, 1},
1058 {64 * 1024, 31},
1059 },
1060 .block_erase = spi_block_erase_d8,
1061 }, {
1062 .eraseblocks = { {2048 * 1024, 1} },
1063 .block_erase = spi_block_erase_60,
1064 }, {
1065 .eraseblocks = { {2048 * 1024, 1} },
1066 .block_erase = spi_block_erase_c7,
1067 }
1068 },
1069 .printlock = spi_prettyprint_status_register_bp2_srwd,
1070 .unlock = spi_disable_blockprotect,
1071 .write = spi_chip_write_256,
1072 .read = spi_chip_read,
1073 .voltage = {2700, 3600},
1074 },
1075
1076 {
1077 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001078 .name = "A25L20PT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001079 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +02001080 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +02001081 .id.manufacture = AMIC_ID,
1082 .id.model = AMIC_A25L20PT,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001083 .total_size = 256,
1084 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001085 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001086 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001087 .probe_timing = TIMING_ZERO,
1088 .block_erasers =
1089 {
1090 {
1091 .eraseblocks = {
1092 {64 * 1024, 3},
1093 {32 * 1024, 1},
1094 {16 * 1024, 1},
1095 {8 * 1024, 1},
1096 {4 * 1024, 2},
1097 },
1098 .block_erase = spi_block_erase_d8,
1099 }, {
1100 .eraseblocks = { {256 * 1024, 1} },
1101 .block_erase = spi_block_erase_c7,
1102 }
1103 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001104 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001105 .unlock = spi_disable_blockprotect,
1106 .write = spi_chip_write_256,
1107 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001108 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001109 },
1110
1111 {
1112 .vendor = "AMIC",
1113 .name = "A25L20PU",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001114 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +02001115 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +02001116 .id.manufacture = AMIC_ID,
1117 .id.model = AMIC_A25L20PU,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001118 .total_size = 256,
1119 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001120 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001121 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001122 .probe_timing = TIMING_ZERO,
1123 .block_erasers =
1124 {
1125 {
1126 .eraseblocks = {
1127 {4 * 1024, 2},
1128 {8 * 1024, 1},
1129 {16 * 1024, 1},
1130 {32 * 1024, 1},
1131 {64 * 1024, 3},
1132 },
1133 .block_erase = spi_block_erase_d8,
1134 }, {
1135 .eraseblocks = { {256 * 1024, 1} },
1136 .block_erase = spi_block_erase_c7,
1137 }
1138 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001139 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001140 .unlock = spi_disable_blockprotect,
1141 .write = spi_chip_write_256,
1142 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001143 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001144 },
1145
1146 /* The A25L40P{T,U} chips are distinguished by their
1147 * erase block layouts, but without any distinction in RDID.
1148 * This inexplicable quirk was verified by Rudolf Marek
Nico Huberc3b02dc2023-08-12 01:13:45 +02001149 * and discussed on the flashprog mailing list on 2010-07-12.
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001150 */
1151 {
1152 .vendor = "AMIC",
1153 .name = "A25L40PT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001154 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +02001155 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +02001156 .id.manufacture = AMIC_ID,
1157 .id.model = AMIC_A25L40PT,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001158 .total_size = 512,
1159 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001160 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00001161 .tested = TEST_OK_PR,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001162 .probe_timing = TIMING_ZERO,
1163 .block_erasers =
1164 {
1165 {
1166 .eraseblocks = {
1167 {64 * 1024, 7},
1168 {32 * 1024, 1},
1169 {16 * 1024, 1},
1170 {8 * 1024, 1},
1171 {4 * 1024, 2},
1172 },
1173 .block_erase = spi_block_erase_d8,
1174 }, {
1175 .eraseblocks = { {512 * 1024, 1} },
1176 .block_erase = spi_block_erase_c7,
1177 }
1178 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001179 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001180 .unlock = spi_disable_blockprotect,
1181 .write = spi_chip_write_256,
1182 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001183 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001184 },
1185
1186 {
1187 .vendor = "AMIC",
1188 .name = "A25L40PU",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001189 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +02001190 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +02001191 .id.manufacture = AMIC_ID,
1192 .id.model = AMIC_A25L40PU,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001193 .total_size = 512,
1194 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001195 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons6f088352018-09-30 19:59:42 +02001196 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001197 .probe_timing = TIMING_ZERO,
1198 .block_erasers =
1199 {
1200 {
1201 .eraseblocks = {
1202 {4 * 1024, 2},
1203 {8 * 1024, 1},
1204 {16 * 1024, 1},
1205 {32 * 1024, 1},
1206 {64 * 1024, 7},
1207 },
1208 .block_erase = spi_block_erase_d8,
1209 }, {
1210 .eraseblocks = { {512 * 1024, 1} },
1211 .block_erase = spi_block_erase_c7,
1212 }
1213 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001214 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001215 .unlock = spi_disable_blockprotect,
1216 .write = spi_chip_write_256,
1217 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001218 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001219 },
1220
1221 {
1222 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +10001223 .name = "A25L512",
1224 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001225 .id.type = ID_SPI_RDID,
1226 .id.manufacture = AMIC_ID_NOPREFIX,
1227 .id.model = AMIC_A25L512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001228 .total_size = 64,
1229 .page_size = 256,
1230 .feature_bits = FEATURE_WRSR_WREN,
1231 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001232 .probe_timing = TIMING_ZERO,
1233 .block_erasers =
1234 {
1235 {
1236 .eraseblocks = { { 4 * 1024, 16 } },
1237 .block_erase = spi_block_erase_20,
1238 }, {
1239 .eraseblocks = { { 64 * 1024, 1 } },
1240 .block_erase = spi_block_erase_d8,
1241 }, {
1242 .eraseblocks = { { 64 * 1024, 1 } },
1243 .block_erase = spi_block_erase_c7,
1244 }
1245 },
1246 .printlock = spi_prettyprint_status_register_bp2_srwd,
1247 .unlock = spi_disable_blockprotect,
1248 .write = spi_chip_write_256,
1249 .read = spi_chip_read,
1250 .voltage = {2700, 3600},
1251 },
1252
1253 {
1254 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001255 .name = "A25L80P",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001256 .bustype = BUS_SPI,
Nico Huber43125762023-05-01 15:56:16 +02001257 .id.type = ID_SPI_RDID,
Nico Huber11136c22023-05-01 12:00:09 +02001258 .id.manufacture = AMIC_ID,
1259 .id.model = AMIC_A25L80P,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001260 .total_size = 1024,
1261 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001262 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00001263 .tested = TEST_OK_PRE,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001264 .probe_timing = TIMING_ZERO,
1265 .block_erasers =
1266 {
1267 {
1268 .eraseblocks = {
1269 {4 * 1024, 2},
1270 {8 * 1024, 1},
1271 {16 * 1024, 1},
1272 {32 * 1024, 1},
1273 {64 * 1024, 15},
1274 },
1275 .block_erase = spi_block_erase_d8,
1276 }, {
1277 .eraseblocks = { {1024 * 1024, 1} },
1278 .block_erase = spi_block_erase_c7,
1279 }
1280 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001281 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001282 .unlock = spi_disable_blockprotect,
1283 .write = spi_chip_write_256,
1284 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001285 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001286 },
1287
1288 {
1289 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +10001290 .name = "A25LQ032/A25LQ32A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001291 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001292 .id.type = ID_SPI_RDID,
1293 .id.manufacture = AMIC_ID_NOPREFIX,
1294 .id.model = AMIC_A25LQ032,
Dan Lenski11617122010-07-29 15:00:40 +00001295 .total_size = 4096,
1296 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001297 /* A25LQ32A supports SFDP */
Daniel Lenski65922a32012-02-15 23:40:23 +00001298 /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
1299 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001300 .tested = TEST_UNTESTED,
Dan Lenski11617122010-07-29 15:00:40 +00001301 .probe_timing = TIMING_ZERO,
1302 .block_erasers =
1303 {
1304 {
1305 .eraseblocks = { { 4 * 1024, 1024 } },
1306 .block_erase = spi_block_erase_20,
1307 }, {
1308 .eraseblocks = { { 64 * 1024, 64 } },
1309 .block_erase = spi_block_erase_52,
1310 }, {
1311 .eraseblocks = { { 64 * 1024, 64 } },
1312 .block_erase = spi_block_erase_d8,
1313 }, {
1314 .eraseblocks = { { 4096 * 1024, 1 } },
1315 .block_erase = spi_block_erase_60,
1316 }, {
1317 .eraseblocks = { { 4096 * 1024, 1 } },
1318 .block_erase = spi_block_erase_c7,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00001319 }
Dan Lenski11617122010-07-29 15:00:40 +00001320 },
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001321 .printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
1322 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
Dan Lenski11617122010-07-29 15:00:40 +00001323 .write = spi_chip_write_256,
1324 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001325 .voltage = {2700, 3600},
Dan Lenski11617122010-07-29 15:00:40 +00001326 },
1327
1328 {
1329 .vendor = "AMIC",
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001330 .name = "A25LQ16",
1331 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001332 .id.type = ID_SPI_RDID,
1333 .id.manufacture = AMIC_ID_NOPREFIX,
1334 .id.model = AMIC_A25LQ16,
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001335 .total_size = 2048,
1336 .page_size = 256,
1337 /* supports SFDP */
1338 /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
1339 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
1340 .tested = TEST_UNTESTED,
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001341 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10001342 .block_erasers =
1343 {
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001344 {
1345 .eraseblocks = { { 4 * 1024, 512 } },
1346 .block_erase = spi_block_erase_20,
1347 }, {
1348 .eraseblocks = { { 64 * 1024, 32 } },
1349 .block_erase = spi_block_erase_52,
1350 }, {
1351 .eraseblocks = { { 64 * 1024, 32 } },
1352 .block_erase = spi_block_erase_d8,
1353 }, {
1354 .eraseblocks = { { 2048 * 1024, 1 } },
1355 .block_erase = spi_block_erase_60,
1356 }, {
1357 .eraseblocks = { { 2048 * 1024, 1 } },
1358 .block_erase = spi_block_erase_c7,
1359 }
1360 },
1361 .printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
1362 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
1363 .write = spi_chip_write_256,
1364 .read = spi_chip_read,
1365 .voltage = {2700, 3600},
1366 },
1367
1368 {
1369 .vendor = "AMIC",
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001370 .name = "A25LQ64",
1371 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001372 .id.type = ID_SPI_RDID,
1373 .id.manufacture = AMIC_ID_NOPREFIX,
1374 .id.model = AMIC_A25LQ64,
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001375 .total_size = 8192,
1376 .page_size = 256,
1377 /* supports SFDP */
1378 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +01001379 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
1380 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT |
1381 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO |
1382 FEATURE_QPI_35_F5,
1383 .dummy_cycles =
1384 {
1385 .qpi_fast_read = 4,
1386 .qpi_fast_read_qio = 6,
1387 },
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001388 .tested = TEST_UNTESTED,
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001389 .probe_timing = TIMING_ZERO,
1390 .block_erasers =
1391 {
1392 {
1393 .eraseblocks = { { 4 * 1024, 2048 } },
1394 .block_erase = spi_block_erase_20,
1395 }, {
1396 .eraseblocks = { { 32 * 1024, 256 } },
1397 .block_erase = spi_block_erase_52,
1398 }, {
1399 .eraseblocks = { { 64 * 1024, 128 } },
1400 .block_erase = spi_block_erase_d8,
1401 }, {
1402 .eraseblocks = { { 8192 * 1024, 1 } },
1403 .block_erase = spi_block_erase_60,
1404 }, {
1405 .eraseblocks = { { 8192 * 1024, 1 } },
1406 .block_erase = spi_block_erase_c7,
1407 }
1408 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001409 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enhance (sic!) */
Stefan Tauner5c316f92015-02-08 21:57:52 +00001410 .unlock = spi_disable_blockprotect_bp3_srwd,
Dan Lenski11617122010-07-29 15:00:40 +00001411 .write = spi_chip_write_256,
1412 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001413 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02001414 .prepare_access = spi_prepare_io,
1415 .finish_access = spi_finish_io,
Dan Lenski11617122010-07-29 15:00:40 +00001416 },
1417
1418 {
1419 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001420 .name = "A29002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001421 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02001422 .id.type = ID_JEDEC,
1423 .id.manufacture = AMIC_ID_NOPREFIX,
1424 .id.model = AMIC_A29002B,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001425 .total_size = 256,
1426 .page_size = 64 * 1024,
1427 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
1428 .tested = TEST_UNTESTED,
David Borg204f4652010-12-04 03:26:40 +00001429 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001430 .block_erasers =
1431 {
1432 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00001433 .eraseblocks = {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001434 {16 * 1024, 1},
1435 {8 * 1024, 2},
1436 {32 * 1024, 1},
1437 {64 * 1024, 3},
1438 },
1439 .block_erase = erase_sector_jedec,
1440 }, {
1441 .eraseblocks = { {256 * 1024, 1} },
1442 .block_erase = erase_chip_block_jedec,
1443 },
1444 },
1445 .write = write_jedec_1,
1446 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001447 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01001448 .prepare_access = prepare_memory_access,
1449 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001450 },
1451
1452 {
1453 .vendor = "AMIC",
1454 .name = "A29002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001455 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02001456 .id.type = ID_JEDEC,
1457 .id.manufacture = AMIC_ID_NOPREFIX,
1458 .id.model = AMIC_A29002T,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001459 .total_size = 256,
1460 .page_size = 64 * 1024,
1461 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +00001462 .tested = TEST_OK_PREW,
David Borg204f4652010-12-04 03:26:40 +00001463 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001464 .block_erasers =
1465 {
1466 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00001467 .eraseblocks = {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001468 {64 * 1024, 3},
1469 {32 * 1024, 1},
1470 {8 * 1024, 2},
1471 {16 * 1024, 1},
1472 },
1473 .block_erase = erase_sector_jedec,
1474 }, {
1475 .eraseblocks = { {256 * 1024, 1} },
1476 .block_erase = erase_chip_block_jedec,
1477 },
1478 },
1479 .write = write_jedec_1,
1480 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001481 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01001482 .prepare_access = prepare_memory_access,
1483 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001484 },
1485
1486 {
1487 .vendor = "AMIC",
1488 .name = "A29040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001489 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02001490 .id.type = ID_JEDEC,
1491 .id.manufacture = AMIC_ID_NOPREFIX,
1492 .id.model = AMIC_A29040B,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001493 .total_size = 512,
1494 .page_size = 64 * 1024,
1495 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Corey Osgoodcbd56652013-09-10 10:42:48 +00001496 .tested = TEST_OK_PREW,
David Borg204f4652010-12-04 03:26:40 +00001497 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001498 .block_erasers =
1499 {
1500 {
1501 .eraseblocks = { {64 * 1024, 8} },
1502 .block_erase = erase_sector_jedec,
1503 }, {
1504 .eraseblocks = { {512 * 1024, 1} },
1505 .block_erase = erase_chip_block_jedec,
1506 },
1507 },
1508 .write = write_jedec_1,
1509 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001510 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01001511 .prepare_access = prepare_memory_access,
1512 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001513 },
1514
1515 {
1516 .vendor = "AMIC",
1517 .name = "A49LF040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001518 .bustype = BUS_LPC,
Nico Huber11136c22023-05-01 12:00:09 +02001519 .id.type = ID_JEDEC,
1520 .id.manufacture = AMIC_ID_NOPREFIX,
1521 .id.model = AMIC_A49LF040A,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001522 .total_size = 512,
1523 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +01001524 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +00001525 .tested = TEST_OK_PR,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001526 .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */
1527 .block_erasers =
1528 {
1529 {
1530 .eraseblocks = { {64 * 1024, 8} },
1531 .block_erase = erase_block_jedec,
1532 }, {
1533 .eraseblocks = { {512 * 1024, 1} },
1534 .block_erase = erase_chip_block_jedec,
1535 }
1536 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +00001537 .unlock = unlock_regspace2_uniform_64k,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001538 .write = write_jedec_1,
1539 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001540 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01001541 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01001542 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001543 },
1544
1545 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001546 .vendor = "Atmel",
1547 .name = "AT25DF021",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001548 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001549 .id.type = ID_SPI_RDID,
1550 .id.manufacture = ATMEL_ID,
1551 .id.model = ATMEL_AT25DF021,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001552 .total_size = 256,
1553 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00001554 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1555 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001556 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001557 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001558 .block_erasers =
1559 {
1560 {
1561 .eraseblocks = { {4 * 1024, 64} },
1562 .block_erase = spi_block_erase_20,
1563 }, {
1564 .eraseblocks = { {32 * 1024, 8} },
1565 .block_erase = spi_block_erase_52,
1566 }, {
1567 .eraseblocks = { {64 * 1024, 4} },
1568 .block_erase = spi_block_erase_d8,
1569 }, {
1570 .eraseblocks = { {256 * 1024, 1} },
1571 .block_erase = spi_block_erase_60,
1572 }, {
1573 .eraseblocks = { {256 * 1024, 1} },
1574 .block_erase = spi_block_erase_c7,
1575 }
1576 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001577 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001578 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001579 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001580 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00001581 .voltage = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models available */
FENG yu ningff692fb2008-12-08 18:15:10 +00001582 },
1583
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001584 {
1585 .vendor = "Atmel",
Steffen Mauch0b59b0d2018-06-02 23:46:03 +02001586 .name = "AT25DF021A",
1587 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001588 .id.type = ID_SPI_RDID,
1589 .id.manufacture = ATMEL_ID,
1590 .id.model = ATMEL_AT25DF021A,
Steffen Mauch0b59b0d2018-06-02 23:46:03 +02001591 .total_size = 256,
1592 .page_size = 256,
1593 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1594 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
1595 .tested = TEST_OK_PREW,
Steffen Mauch0b59b0d2018-06-02 23:46:03 +02001596 .probe_timing = TIMING_ZERO,
1597 .block_erasers =
1598 {
1599 {
1600 .eraseblocks = { {4 * 1024, 64} },
1601 .block_erase = spi_block_erase_20,
1602 }, {
1603 .eraseblocks = { {32 * 1024, 8} },
1604 .block_erase = spi_block_erase_52,
1605 }, {
1606 .eraseblocks = { {64 * 1024, 4} },
1607 .block_erase = spi_block_erase_d8,
1608 }, {
1609 .eraseblocks = { {256 * 1024, 1} },
1610 .block_erase = spi_block_erase_60,
1611 }, {
1612 .eraseblocks = { {256 * 1024, 1} },
1613 .block_erase = spi_block_erase_c7,
1614 }
1615 },
1616 .printlock = spi_prettyprint_status_register_at25df,
1617 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
1618 .write = spi_chip_write_256,
1619 .read = spi_chip_read,
1620 .voltage = {1650, 3600},
1621 },
1622
1623 {
1624 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001625 .name = "AT25DF041A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001626 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001627 .id.type = ID_SPI_RDID,
1628 .id.manufacture = ATMEL_ID,
1629 .id.model = ATMEL_AT25DF041A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001630 .total_size = 512,
1631 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001632 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00001633 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001634 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001635 .block_erasers =
1636 {
1637 {
1638 .eraseblocks = { {4 * 1024, 128} },
1639 .block_erase = spi_block_erase_20,
1640 }, {
1641 .eraseblocks = { {32 * 1024, 16} },
1642 .block_erase = spi_block_erase_52,
1643 }, {
1644 .eraseblocks = { {64 * 1024, 8} },
1645 .block_erase = spi_block_erase_d8,
1646 }, {
1647 .eraseblocks = { {512 * 1024, 1} },
1648 .block_erase = spi_block_erase_60,
1649 }, {
1650 .eraseblocks = { {512 * 1024, 1} },
1651 .block_erase = spi_block_erase_c7,
1652 }
1653 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001654 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001655 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001656 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001657 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00001658 .voltage = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models available */
FENG yu ningff692fb2008-12-08 18:15:10 +00001659 },
1660
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001661 {
1662 .vendor = "Atmel",
1663 .name = "AT25DF081",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001664 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001665 .id.type = ID_SPI_RDID,
1666 .id.manufacture = ATMEL_ID,
1667 .id.model = ATMEL_AT25DF081,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001668 .total_size = 1024,
1669 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001670 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001671 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001672 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001673 .block_erasers =
1674 {
1675 {
1676 .eraseblocks = { {4 * 1024, 256} },
1677 .block_erase = spi_block_erase_20,
1678 }, {
1679 .eraseblocks = { {32 * 1024, 32} },
1680 .block_erase = spi_block_erase_52,
1681 }, {
1682 .eraseblocks = { {64 * 1024, 16} },
1683 .block_erase = spi_block_erase_d8,
1684 }, {
1685 .eraseblocks = { {1024 * 1024, 1} },
1686 .block_erase = spi_block_erase_60,
1687 }, {
1688 .eraseblocks = { {1024 * 1024, 1} },
1689 .block_erase = spi_block_erase_c7,
1690 }
1691 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001692 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001693 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001694 .write = spi_chip_write_256,
1695 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001696 .voltage = {1600, 2000}, /* Datasheet says range is 1.65-1.95 V */
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001697 },
1698
1699 {
1700 .vendor = "Atmel",
1701 .name = "AT25DF081A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001702 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001703 .id.type = ID_SPI_RDID,
1704 .id.manufacture = ATMEL_ID,
1705 .id.model = ATMEL_AT25DF081A,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001706 .total_size = 1024,
1707 .page_size = 256,
1708 .feature_bits = FEATURE_WRSR_WREN,
1709 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001710 .probe_timing = TIMING_ZERO,
1711 .block_erasers =
1712 {
1713 {
1714 .eraseblocks = { {4 * 1024, 256} },
1715 .block_erase = spi_block_erase_20,
1716 }, {
1717 .eraseblocks = { {32 * 1024, 32} },
1718 .block_erase = spi_block_erase_52,
1719 }, {
1720 .eraseblocks = { {64 * 1024, 16} },
1721 .block_erase = spi_block_erase_d8,
1722 }, {
1723 .eraseblocks = { {1024 * 1024, 1} },
1724 .block_erase = spi_block_erase_60,
1725 }, {
1726 .eraseblocks = { {1024 * 1024, 1} },
1727 .block_erase = spi_block_erase_c7,
1728 }
1729 },
1730 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001731 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001732 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001733 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00001734 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00001735 },
1736
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001737 {
1738 .vendor = "Atmel",
1739 .name = "AT25DF161",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001740 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001741 .id.type = ID_SPI_RDID,
1742 .id.manufacture = ATMEL_ID,
1743 .id.model = ATMEL_AT25DF161,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001744 .total_size = 2048,
1745 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001746 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons8b5b9622018-09-30 19:13:15 +02001747 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001748 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001749 .block_erasers =
1750 {
1751 {
1752 .eraseblocks = { {4 * 1024, 512} },
1753 .block_erase = spi_block_erase_20,
1754 }, {
1755 .eraseblocks = { {32 * 1024, 64} },
1756 .block_erase = spi_block_erase_52,
1757 }, {
1758 .eraseblocks = { {64 * 1024, 32} },
1759 .block_erase = spi_block_erase_d8,
1760 }, {
1761 .eraseblocks = { {2 * 1024 * 1024, 1} },
1762 .block_erase = spi_block_erase_60,
1763 }, {
1764 .eraseblocks = { {2 * 1024 * 1024, 1} },
1765 .block_erase = spi_block_erase_c7,
1766 }
1767 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001768 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001769 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001770 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001771 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001772 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00001773 },
1774
Alan Green86bf6ab2019-06-27 16:58:20 +10001775 /*The AT26DF321 has the same ID as the AT25DF321. */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001776 {
1777 .vendor = "Atmel",
1778 .name = "AT25DF321",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001779 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001780 .id.type = ID_SPI_RDID,
1781 .id.manufacture = ATMEL_ID,
1782 .id.model = ATMEL_AT25DF321,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001783 .total_size = 4096,
1784 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001785 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerd06d9412011-06-12 19:47:55 +00001786 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001787 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001788 .block_erasers =
1789 {
1790 {
1791 .eraseblocks = { {4 * 1024, 1024} },
1792 .block_erase = spi_block_erase_20,
1793 }, {
1794 .eraseblocks = { {32 * 1024, 128} },
1795 .block_erase = spi_block_erase_52,
1796 }, {
1797 .eraseblocks = { {64 * 1024, 64} },
1798 .block_erase = spi_block_erase_d8,
1799 }, {
1800 .eraseblocks = { {4 * 1024 * 1024, 1} },
1801 .block_erase = spi_block_erase_60,
1802 }, {
1803 .eraseblocks = { {4 * 1024 * 1024, 1} },
1804 .block_erase = spi_block_erase_c7,
1805 }
1806 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001807 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001808 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001809 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001810 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001811 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00001812 },
1813
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001814 {
1815 .vendor = "Atmel",
1816 .name = "AT25DF321A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001817 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001818 .id.type = ID_SPI_RDID,
1819 .id.manufacture = ATMEL_ID,
1820 .id.model = ATMEL_AT25DF321A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001821 .total_size = 4096,
1822 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00001823 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1824 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerd94d25d2012-07-28 03:17:15 +00001825 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001826 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001827 .block_erasers =
1828 {
1829 {
1830 .eraseblocks = { {4 * 1024, 1024} },
1831 .block_erase = spi_block_erase_20,
1832 }, {
1833 .eraseblocks = { {32 * 1024, 128} },
1834 .block_erase = spi_block_erase_52,
1835 }, {
1836 .eraseblocks = { {64 * 1024, 64} },
1837 .block_erase = spi_block_erase_d8,
1838 }, {
1839 .eraseblocks = { {4 * 1024 * 1024, 1} },
1840 .block_erase = spi_block_erase_60,
1841 }, {
1842 .eraseblocks = { {4 * 1024 * 1024, 1} },
1843 .block_erase = spi_block_erase_c7,
1844 }
1845 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001846 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001847 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001848 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001849 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001850 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00001851 },
1852
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001853 {
1854 .vendor = "Atmel",
Paul Menzelac427b22012-02-16 21:07:07 +00001855 .name = "AT25DF641(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001856 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001857 .id.type = ID_SPI_RDID,
1858 .id.manufacture = ATMEL_ID,
1859 .id.model = ATMEL_AT25DF641,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001860 .total_size = 8192,
1861 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001862 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00001863 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001864 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001865 .block_erasers =
1866 {
1867 {
1868 .eraseblocks = { {4 * 1024, 2048} },
1869 .block_erase = spi_block_erase_20,
1870 }, {
1871 .eraseblocks = { {32 * 1024, 256} },
1872 .block_erase = spi_block_erase_52,
1873 }, {
1874 .eraseblocks = { {64 * 1024, 128} },
1875 .block_erase = spi_block_erase_d8,
1876 }, {
1877 .eraseblocks = { {8 * 1024 * 1024, 1} },
1878 .block_erase = spi_block_erase_60,
1879 }, {
1880 .eraseblocks = { {8 * 1024 * 1024, 1} },
1881 .block_erase = spi_block_erase_c7,
1882 }
1883 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001884 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001885 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001886 .write = spi_chip_write_256,
1887 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001888 .voltage = {2700, 3600},
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001889 },
1890
1891 {
1892 .vendor = "Atmel",
Stefan Taunerc9d8b272014-06-01 13:22:35 +00001893 .name = "AT25DL081",
1894 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001895 .id.type = ID_SPI_RDID,
1896 .id.manufacture = ATMEL_ID,
1897 .id.model = ATMEL_AT25DF081,
Stefan Taunerc9d8b272014-06-01 13:22:35 +00001898 .total_size = 1024,
1899 .page_size = 256,
1900 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1901 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
1902 .tested = TEST_UNTESTED,
Stefan Taunerc9d8b272014-06-01 13:22:35 +00001903 .probe_timing = TIMING_ZERO,
1904 .block_erasers =
1905 {
1906 {
1907 .eraseblocks = { {4 * 1024, 256} },
1908 .block_erase = spi_block_erase_20,
1909 }, {
1910 .eraseblocks = { {32 * 1024, 32} },
1911 .block_erase = spi_block_erase_52,
1912 }, {
1913 .eraseblocks = { {64 * 1024, 16} },
1914 .block_erase = spi_block_erase_d8,
1915 }, {
1916 .eraseblocks = { {1 * 1024 * 1024, 1} },
1917 .block_erase = spi_block_erase_60,
1918 }, {
1919 .eraseblocks = { {1 * 1024 * 1024, 1} },
1920 .block_erase = spi_block_erase_c7,
1921 }
1922 },
1923 .printlock = spi_prettyprint_status_register_at25df_sec,
1924 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
1925 .write = spi_chip_write_256, /* Dual I/O (0xA2) supported */
1926 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
1927 .voltage = {1650, 1950},
1928 },
1929
1930 {
1931 .vendor = "Atmel",
1932 .name = "AT25DL161",
1933 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001934 .id.type = ID_SPI_RDID,
1935 .id.manufacture = ATMEL_ID,
1936 .id.model = ATMEL_AT25DL161,
Stefan Taunerc9d8b272014-06-01 13:22:35 +00001937 .total_size = 2048,
1938 .page_size = 256,
1939 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1940 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
1941 .tested = TEST_UNTESTED,
Stefan Taunerc9d8b272014-06-01 13:22:35 +00001942 .probe_timing = TIMING_ZERO,
1943 .block_erasers =
1944 {
1945 {
1946 .eraseblocks = { {4 * 1024, 512} },
1947 .block_erase = spi_block_erase_20,
1948 }, {
1949 .eraseblocks = { {32 * 1024, 64} },
1950 .block_erase = spi_block_erase_52,
1951 }, {
1952 .eraseblocks = { {64 * 1024, 32} },
1953 .block_erase = spi_block_erase_d8,
1954 }, {
1955 .eraseblocks = { {2 * 1024 * 1024, 1} },
1956 .block_erase = spi_block_erase_60,
1957 }, {
1958 .eraseblocks = { {2 * 1024 * 1024, 1} },
1959 .block_erase = spi_block_erase_c7,
1960 }
1961 },
1962 .printlock = spi_prettyprint_status_register_at25df_sec,
1963 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
1964 .write = spi_chip_write_256, /* Dual I/O (0xA2) supported */
1965 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
1966 .voltage = {1650, 1950},
1967 },
1968
1969 {
1970 .vendor = "Atmel",
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001971 .name = "AT25DQ161",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001972 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02001973 .id.type = ID_SPI_RDID,
1974 .id.manufacture = ATMEL_ID,
1975 .id.model = ATMEL_AT25DQ161,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001976 .total_size = 2048,
1977 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00001978 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1979 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001980 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001981 .probe_timing = TIMING_ZERO,
1982 .block_erasers =
1983 {
1984 {
1985 .eraseblocks = { {4 * 1024, 512} },
1986 .block_erase = spi_block_erase_20,
1987 }, {
1988 .eraseblocks = { {32 * 1024, 64} },
1989 .block_erase = spi_block_erase_52,
1990 }, {
1991 .eraseblocks = { {64 * 1024, 32} },
1992 .block_erase = spi_block_erase_d8,
1993 }, {
1994 .eraseblocks = { {2 * 1024 * 1024, 1} },
1995 .block_erase = spi_block_erase_60,
1996 }, {
1997 .eraseblocks = { {2 * 1024 * 1024, 1} },
1998 .block_erase = spi_block_erase_c7,
1999 }
2000 },
2001 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002002 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002003 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002004 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002005 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002006 },
2007
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002008 {
2009 .vendor = "Atmel",
Alan Green1f9cc7d2019-07-01 11:10:45 +10002010 /* The A suffix indicates 33MHz instead of 20MHz clock rate.
2011 * All other properties seem to be the same.*/
2012 .name = "AT25F1024(A)",
2013 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002014 .id.type = ID_SPI_AT25F,
2015 .id.manufacture = ATMEL_ID,
2016 .id.model = ATMEL_AT25F1024,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002017 .total_size = 128,
2018 .page_size = 256,
2019 .feature_bits = FEATURE_WRSR_WREN,
2020 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002021 .probe_timing = TIMING_ZERO,
2022 .block_erasers =
2023 {
2024 {
2025 .eraseblocks = { {32 * 1024, 4} },
2026 .block_erase = spi_block_erase_52,
2027 }, {
2028 .eraseblocks = { {128 * 1024, 1} },
2029 .block_erase = spi_block_erase_62,
2030 }
2031 },
2032 .printlock = spi_prettyprint_status_register_at25f,
2033 .unlock = spi_disable_blockprotect_at25f,
2034 .write = spi_chip_write_256,
2035 .read = spi_chip_read,
2036 .voltage = {2700, 3600},
2037 },
2038
2039 {
2040 .vendor = "Atmel",
2041 .name = "AT25F2048",
2042 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002043 .id.type = ID_SPI_AT25F,
2044 .id.manufacture = ATMEL_ID,
2045 .id.model = ATMEL_AT25F2048,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002046 .total_size = 256,
2047 .page_size = 256,
2048 .feature_bits = FEATURE_WRSR_WREN,
2049 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002050 .probe_timing = TIMING_ZERO,
2051 .block_erasers =
2052 {
2053 {
2054 .eraseblocks = { {64 * 1024, 4} },
2055 .block_erase = spi_block_erase_52,
2056 }, {
2057 .eraseblocks = { {256 * 1024, 1} },
2058 .block_erase = spi_block_erase_62,
2059 }
2060 },
2061 .printlock = spi_prettyprint_status_register_at25f,
2062 .unlock = spi_disable_blockprotect_at25f,
2063 .write = spi_chip_write_256,
2064 .read = spi_chip_read,
2065 .voltage = {2700, 3600},
2066 },
2067
2068 {
2069 .vendor = "Atmel",
2070 .name = "AT25F4096",
2071 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002072 .id.type = ID_SPI_AT25F,
2073 .id.manufacture = ATMEL_ID,
2074 .id.model = ATMEL_AT25F4096,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002075 .total_size = 512,
2076 .page_size = 256,
2077 .feature_bits = FEATURE_WRSR_WREN,
2078 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002079 .probe_timing = TIMING_ZERO,
2080 .block_erasers =
2081 {
2082 {
2083 .eraseblocks = { {64 * 1024, 8} },
2084 .block_erase = spi_block_erase_52,
2085 }, {
2086 .eraseblocks = { {512 * 1024, 1} },
2087 .block_erase = spi_block_erase_62,
2088 }
2089 },
2090 .printlock = spi_prettyprint_status_register_at25f4096,
2091 /* "Bits 5-6 are 0s when device is not in an internal write cycle." Better leave them alone: */
2092 .unlock = spi_disable_blockprotect_bp2_srwd,
2093 .write = spi_chip_write_256,
2094 .read = spi_chip_read,
2095 .voltage = {2700, 3600},
2096 },
2097
2098 {
2099 .vendor = "Atmel",
Stefan Tauner57794ac2012-12-29 15:04:20 +00002100 .name = "AT25F512",
2101 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002102 .id.type = ID_SPI_AT25F,
2103 .id.manufacture = ATMEL_ID,
2104 .id.model = ATMEL_AT25F512,
Stefan Tauner57794ac2012-12-29 15:04:20 +00002105 .total_size = 64,
2106 .page_size = 256,
2107 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00002108 .tested = TEST_OK_PREW,
Stefan Tauner57794ac2012-12-29 15:04:20 +00002109 .probe_timing = TIMING_ZERO,
2110 .block_erasers =
2111 {
2112 {
2113 .eraseblocks = { {32 * 1024, 2} },
2114 .block_erase = spi_block_erase_52,
2115 }, {
2116 .eraseblocks = { {64 * 1024, 1} },
2117 .block_erase = spi_block_erase_62,
2118 }
2119 },
2120 .printlock = spi_prettyprint_status_register_at25f,
2121 .unlock = spi_disable_blockprotect_at25f,
2122 .write = spi_chip_write_256,
2123 .read = spi_chip_read,
2124 .voltage = {2700, 3600},
2125 },
2126
2127 {
2128 .vendor = "Atmel",
2129 .name = "AT25F512A",
2130 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002131 .id.type = ID_SPI_AT25F,
2132 .id.manufacture = ATMEL_ID,
2133 .id.model = ATMEL_AT25F512A,
Stefan Tauner57794ac2012-12-29 15:04:20 +00002134 .total_size = 64,
2135 .page_size = 128,
2136 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00002137 .tested = TEST_OK_PREW,
Stefan Tauner57794ac2012-12-29 15:04:20 +00002138 .probe_timing = TIMING_ZERO,
2139 .block_erasers =
2140 {
2141 {
2142 .eraseblocks = { {32 * 1024, 2} },
2143 .block_erase = spi_block_erase_52,
2144 }, {
2145 .eraseblocks = { {64 * 1024, 1} },
2146 .block_erase = spi_block_erase_62,
2147 }
2148 },
2149 .printlock = spi_prettyprint_status_register_at25f512a,
2150 /* FIXME: It is not correct to use this one, because the BP1 bit is N/A. */
2151 .unlock = spi_disable_blockprotect_at25f512a,
2152 .write = spi_chip_write_256,
2153 .read = spi_chip_read,
2154 .voltage = {2700, 3600},
2155 },
2156
2157 {
2158 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002159 .name = "AT25F512B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002160 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002161 .id.type = ID_SPI_RDID,
2162 .id.manufacture = ATMEL_ID,
2163 .id.model = ATMEL_AT25F512B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002164 .total_size = 64,
2165 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00002166 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2167 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002168 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002169 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002170 .block_erasers =
2171 {
2172 {
2173 .eraseblocks = { {4 * 1024, 16} },
2174 .block_erase = spi_block_erase_20,
2175 }, {
2176 .eraseblocks = { {32 * 1024, 2} },
2177 .block_erase = spi_block_erase_52,
2178 }, {
2179 .eraseblocks = { {32 * 1024, 2} },
2180 .block_erase = spi_block_erase_d8,
2181 }, {
2182 .eraseblocks = { {64 * 1024, 1} },
2183 .block_erase = spi_block_erase_60,
2184 }, {
2185 .eraseblocks = { {64 * 1024, 1} },
2186 .block_erase = spi_block_erase_c7,
Stefan Tauner3c0fcd02012-09-21 12:46:56 +00002187 }, {
2188 .eraseblocks = { {64 * 1024, 1} },
2189 .block_erase = spi_block_erase_62,
Sean Nelson89187292009-12-23 12:02:55 +00002190 }
2191 },
Stefan Tauner7bf4ed92012-08-26 21:04:27 +00002192 .printlock = spi_prettyprint_status_register_at25f512b,
2193 .unlock = spi_disable_blockprotect_at25f512b,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002194 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002195 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002196 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002197 },
2198
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002199 {
2200 .vendor = "Atmel",
2201 .name = "AT25FS010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002202 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002203 .id.type = ID_SPI_RDID,
2204 .id.manufacture = ATMEL_ID,
2205 .id.model = ATMEL_AT25FS010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002206 .total_size = 128,
2207 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002208 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunere34e3e82013-01-01 00:06:51 +00002209 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002210 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002211 .block_erasers =
2212 {
2213 {
2214 .eraseblocks = { {4 * 1024, 32} },
2215 .block_erase = spi_block_erase_20,
2216 }, {
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00002217 .eraseblocks = { {4 * 1024, 32} },
2218 .block_erase = spi_block_erase_d7,
2219 }, {
Sean Nelson89187292009-12-23 12:02:55 +00002220 .eraseblocks = { {32 * 1024, 4} },
2221 .block_erase = spi_block_erase_52,
2222 }, {
2223 .eraseblocks = { {32 * 1024, 4} },
2224 .block_erase = spi_block_erase_d8,
2225 }, {
2226 .eraseblocks = { {128 * 1024, 1} },
2227 .block_erase = spi_block_erase_60,
2228 }, {
2229 .eraseblocks = { {128 * 1024, 1} },
2230 .block_erase = spi_block_erase_c7,
2231 }
2232 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00002233 .printlock = spi_prettyprint_status_register_at25fs010,
2234 .unlock = spi_disable_blockprotect_at25fs010,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002235 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002236 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002237 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002238 },
2239
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002240 {
2241 .vendor = "Atmel",
2242 .name = "AT25FS040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002243 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002244 .id.type = ID_SPI_RDID,
2245 .id.manufacture = ATMEL_ID,
2246 .id.model = ATMEL_AT25FS040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002247 .total_size = 512,
2248 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002249 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002250 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002251 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002252 .block_erasers =
2253 {
2254 {
2255 .eraseblocks = { {4 * 1024, 128} },
2256 .block_erase = spi_block_erase_20,
2257 }, {
2258 .eraseblocks = { {64 * 1024, 8} },
2259 .block_erase = spi_block_erase_52,
2260 }, {
2261 .eraseblocks = { {64 * 1024, 8} },
2262 .block_erase = spi_block_erase_d8,
2263 }, {
2264 .eraseblocks = { {512 * 1024, 1} },
2265 .block_erase = spi_block_erase_60,
2266 }, {
2267 .eraseblocks = { {512 * 1024, 1} },
2268 .block_erase = spi_block_erase_c7,
2269 }
2270 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00002271 .printlock = spi_prettyprint_status_register_at25fs040,
2272 .unlock = spi_disable_blockprotect_at25fs040,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002273 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002274 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002275 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002276 },
2277
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002278 {
2279 .vendor = "Atmel",
jvma3ab6c62018-03-08 15:43:20 +01002280 .name = "AT25SF041",
2281 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002282 .id.type = ID_SPI_RDID,
2283 .id.manufacture = ATMEL_ID,
2284 .id.model = ATMEL_AT25SF041,
jvma3ab6c62018-03-08 15:43:20 +01002285 .total_size = 512,
2286 .page_size = 256,
2287 .feature_bits = FEATURE_WRSR_WREN,
2288 .tested = TEST_OK_PREW,
jvma3ab6c62018-03-08 15:43:20 +01002289 .probe_timing = TIMING_ZERO,
2290 .block_erasers =
2291 {
2292 {
2293 .eraseblocks = { {4 * 1024, 128} },
2294 .block_erase = spi_block_erase_20,
2295 }, {
2296 .eraseblocks = { {32 * 1024, 16} },
2297 .block_erase = spi_block_erase_52,
2298 }, {
2299 .eraseblocks = { {64 * 1024, 8} },
2300 .block_erase = spi_block_erase_d8,
2301 }, {
2302 .eraseblocks = { {512 * 1024, 1} },
2303 .block_erase = spi_block_erase_60,
2304 }, {
2305 .eraseblocks = { {512 * 1024, 1} },
2306 .block_erase = spi_block_erase_c7,
2307 }
2308 },
2309 .printlock = spi_prettyprint_status_register_plain,
2310 .unlock = spi_disable_blockprotect,
2311 .write = spi_chip_write_256,
2312 .read = spi_chip_read,
2313 .voltage = {2500, 3600},
2314 },
2315
2316 {
2317 .vendor = "Atmel",
Evan Jensen291c1012018-05-17 14:30:19 -07002318 .name = "AT25SF081",
2319 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002320 .id.type = ID_SPI_RDID,
2321 .id.manufacture = ATMEL_ID,
2322 .id.model = ATMEL_AT25SF081,
Evan Jensen291c1012018-05-17 14:30:19 -07002323 .total_size = 1024,
2324 .page_size = 256,
2325 .feature_bits = FEATURE_WRSR_WREN,
2326 .tested = TEST_OK_PREW,
Evan Jensen291c1012018-05-17 14:30:19 -07002327 .probe_timing = TIMING_ZERO,
2328 .block_erasers =
2329 {
2330 {
2331 .eraseblocks = { {4 * 1024, 256} },
2332 .block_erase = spi_block_erase_20,
2333 }, {
2334 .eraseblocks = { {32 * 1024, 32} },
2335 .block_erase = spi_block_erase_52,
2336 }, {
2337 .eraseblocks = { {64 * 1024, 16} },
2338 .block_erase = spi_block_erase_d8,
2339 }, {
2340 .eraseblocks = { {1024 * 1024, 1} },
2341 .block_erase = spi_block_erase_60,
2342 }, {
2343 .eraseblocks = { {1024 * 1024, 1} },
2344 .block_erase = spi_block_erase_c7,
2345 }
2346 },
2347 .printlock = spi_prettyprint_status_register_plain,
2348 .unlock = spi_disable_blockprotect,
2349 .write = spi_chip_write_256,
2350 .read = spi_chip_read,
2351 .voltage = {2300, 3600},
2352 },
2353
2354 {
2355 .vendor = "Atmel",
Stanislav Sedovf5775442018-03-07 14:16:51 -08002356 .name = "AT25SF161",
2357 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002358 .id.type = ID_SPI_RDID,
2359 .id.manufacture = ATMEL_ID,
2360 .id.model = ATMEL_AT25SF161,
Stanislav Sedovf5775442018-03-07 14:16:51 -08002361 .total_size = 2048,
2362 .page_size = 256,
2363 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
2364 .tested = TEST_OK_PREW,
Stanislav Sedovf5775442018-03-07 14:16:51 -08002365 .probe_timing = TIMING_ZERO,
2366 .block_erasers =
2367 {
2368 {
2369 .eraseblocks = { {4 * 1024, 512} },
2370 .block_erase = spi_block_erase_20,
2371 }, {
2372 .eraseblocks = { {32 * 1024, 64} },
2373 .block_erase = spi_block_erase_52,
2374 }, {
2375 .eraseblocks = { {64 * 1024, 32} },
2376 .block_erase = spi_block_erase_d8,
2377 }, {
2378 .eraseblocks = { {2048 * 1024, 1} },
2379 .block_erase = spi_block_erase_60,
2380 }, {
2381 .eraseblocks = { {2048 * 1024, 1} },
2382 .block_erase = spi_block_erase_c7,
2383 }
2384 },
2385 .printlock = spi_prettyprint_status_register_plain,
2386 .unlock = spi_disable_blockprotect,
2387 .write = spi_chip_write_256,
2388 .read = spi_chip_read,
2389 .voltage = {2500, 3600},
2390 },
2391
2392 {
Alan Green57938f82019-06-27 15:06:43 +10002393 .vendor = "Atmel",
darkarnium41394382019-11-04 20:06:48 +00002394 .name = "AT25SF321",
2395 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002396 .id.type = ID_SPI_RDID,
2397 .id.manufacture = ATMEL_ID,
2398 .id.model = ATMEL_AT25SF321,
darkarnium41394382019-11-04 20:06:48 +00002399 .total_size = 4096,
2400 .page_size = 256,
2401 .feature_bits = FEATURE_WRSR_WREN,
2402 .tested = TEST_OK_PR,
darkarnium41394382019-11-04 20:06:48 +00002403 .probe_timing = TIMING_ZERO,
2404 .block_erasers =
2405 {
2406 {
2407 .eraseblocks = { {4 * 1024, 1024} },
2408 .block_erase = spi_block_erase_20,
2409 }, {
2410 .eraseblocks = { {32 * 1024, 128} },
2411 .block_erase = spi_block_erase_52,
2412 }, {
2413 .eraseblocks = { {64 * 1024, 64} },
2414 .block_erase = spi_block_erase_d8,
2415 }, {
2416 .eraseblocks = { {4096 * 1024, 1} },
2417 .block_erase = spi_block_erase_60,
2418 }, {
2419 .eraseblocks = { {4096 * 1024, 1} },
2420 .block_erase = spi_block_erase_c7,
2421 }
2422 },
2423 .printlock = spi_prettyprint_status_register_plain,
2424 .unlock = spi_disable_blockprotect,
2425 .write = spi_chip_write_256,
2426 .read = spi_chip_read,
2427 .voltage = {2500, 3600},
2428 },
2429
2430 {
2431 .vendor = "Atmel",
Hal Martin49e23d22018-05-27 14:18:43 +02002432 .name = "AT25SL128A",
2433 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002434 .id.type = ID_SPI_RDID,
2435 .id.manufacture = ATMEL_ID,
2436 .id.model = ATMEL_AT25SL128A,
Hal Martin49e23d22018-05-27 14:18:43 +02002437 .total_size = 16384,
2438 .page_size = 256,
2439 /* supports SFDP */
Nico Huber1412d9f2024-01-06 18:25:49 +01002440 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
2441 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Hal Martin49e23d22018-05-27 14:18:43 +02002442 .tested = TEST_OK_PREW,
Hal Martin49e23d22018-05-27 14:18:43 +02002443 .probe_timing = TIMING_ZERO,
2444 .block_erasers =
2445 {
2446 {
2447 .eraseblocks = { {4 * 1024, 4096} },
2448 .block_erase = spi_block_erase_20,
2449 }, {
2450 .eraseblocks = { {32 * 1024, 512} },
2451 .block_erase = spi_block_erase_52,
2452 }, {
2453 .eraseblocks = { {64 * 1024, 256} },
2454 .block_erase = spi_block_erase_d8,
2455 }, {
2456 .eraseblocks = { {16 * 1024 * 1024, 1} },
2457 .block_erase = spi_block_erase_60,
2458 }, {
2459 .eraseblocks = { {16 * 1024 * 1024, 1} },
2460 .block_erase = spi_block_erase_c7,
2461 }
2462 },
2463 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
2464 .unlock = spi_disable_blockprotect,
2465 .write = spi_chip_write_256,
2466 .read = spi_chip_read,
2467 .voltage = {1700, 2000},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11002468 .reg_bits =
2469 {
Nico Huber226bb872024-04-09 23:30:34 +02002470 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11002471 .srp = {STATUS1, 7, RW},
2472 .srl = {STATUS2, 0, RW},
2473 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
2474 .tb = {STATUS1, 5, RW},
2475 .sec = {STATUS1, 6, RW},
2476 .cmp = {STATUS2, 6, RW},
2477 },
Nico Huberaabb3e02023-01-13 00:22:30 +01002478 .wp_write_cfg = spi_wp_write_cfg,
2479 .wp_read_cfg = spi_wp_read_cfg,
2480 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11002481 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02002482 .prepare_access = spi_prepare_io,
2483 .finish_access = spi_finish_io,
Hal Martin49e23d22018-05-27 14:18:43 +02002484 },
2485
2486 {
Stanislav Sedovf5775442018-03-07 14:16:51 -08002487 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002488 .name = "AT26DF041",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002489 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002490 .id.type = ID_SPI_RDID,
2491 .id.manufacture = ATMEL_ID,
2492 .id.model = ATMEL_AT26DF041,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002493 .total_size = 512,
2494 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002495 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Stefan Tauner94b39b42012-10-27 00:06:02 +00002496 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002497 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002498 .block_erasers =
2499 {
2500 {
Stefan Tauner94b39b42012-10-27 00:06:02 +00002501 .eraseblocks = { {256, 2048} },
2502 .block_erase = spi_block_erase_81,
2503 }, {
2504 .eraseblocks = { {2 * 1024, 256} },
2505 .block_erase = spi_block_erase_50,
2506 }, {
Sean Nelson89187292009-12-23 12:02:55 +00002507 .eraseblocks = { {4 * 1024, 128} },
2508 .block_erase = spi_block_erase_20,
2509 }
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002510 },
Stefan Taunercecb2c52013-06-20 22:55:41 +00002511 .printlock = spi_prettyprint_status_register_plain,
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002512 /* Supports also an incompatible page write (of exactly 256 B) and an auto-erasing write. */
Stefan Tauner94b39b42012-10-27 00:06:02 +00002513 .write = spi_chip_write_1,
2514 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +00002515 .voltage = {2700, 3600}, /* 3.0-3.6V for higher speed, 2.7-3.6V normal */
FENG yu ningff692fb2008-12-08 18:15:10 +00002516 },
2517
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002518 {
2519 .vendor = "Atmel",
2520 .name = "AT26DF081A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002521 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002522 .id.type = ID_SPI_RDID,
2523 .id.manufacture = ATMEL_ID,
2524 .id.model = ATMEL_AT26DF081A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002525 .total_size = 1024,
2526 .page_size = 256,
Mathias Krause2c3afa32011-01-17 07:45:54 +00002527 .feature_bits = FEATURE_WRSR_WREN,
2528 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002529 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002530 .block_erasers =
2531 {
2532 {
2533 .eraseblocks = { {4 * 1024, 256} },
2534 .block_erase = spi_block_erase_20,
2535 }, {
2536 .eraseblocks = { {32 * 1024, 32} },
2537 .block_erase = spi_block_erase_52,
2538 }, {
2539 .eraseblocks = { {64 * 1024, 16} },
2540 .block_erase = spi_block_erase_d8,
2541 }, {
2542 .eraseblocks = { {1024 * 1024, 1} },
2543 .block_erase = spi_block_erase_60,
2544 }, {
2545 .eraseblocks = { {1024 * 1024, 1} },
2546 .block_erase = spi_block_erase_c7,
2547 }
2548 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002549 .printlock = spi_prettyprint_status_register_at26df081a,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002550 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002551 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002552 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002553 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002554 },
2555
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002556 {
2557 .vendor = "Atmel",
2558 .name = "AT26DF161",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002559 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002560 .id.type = ID_SPI_RDID,
2561 .id.manufacture = ATMEL_ID,
2562 .id.model = ATMEL_AT26DF161,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002563 .total_size = 2048,
2564 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002565 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00002566 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002567 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002568 .block_erasers =
2569 {
2570 {
2571 .eraseblocks = { {4 * 1024, 512} },
2572 .block_erase = spi_block_erase_20,
2573 }, {
2574 .eraseblocks = { {32 * 1024, 64} },
2575 .block_erase = spi_block_erase_52,
2576 }, {
2577 .eraseblocks = { {64 * 1024, 32} },
2578 .block_erase = spi_block_erase_d8,
2579 }, {
2580 .eraseblocks = { {2 * 1024 * 1024, 1} },
2581 .block_erase = spi_block_erase_60,
2582 }, {
2583 .eraseblocks = { {2 * 1024 * 1024, 1} },
2584 .block_erase = spi_block_erase_c7,
2585 }
2586 },
Carl-Daniel Hailfinger7a3bd8f2011-05-19 00:06:06 +00002587 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002588 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002589 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002590 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002591 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002592 },
2593
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002594 {
2595 .vendor = "Atmel",
2596 .name = "AT26DF161A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002597 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002598 .id.type = ID_SPI_RDID,
2599 .id.manufacture = ATMEL_ID,
2600 .id.model = ATMEL_AT26DF161A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002601 .total_size = 2048,
2602 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002603 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002604 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002605 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002606 .block_erasers =
2607 {
2608 {
2609 .eraseblocks = { {4 * 1024, 512} },
2610 .block_erase = spi_block_erase_20,
2611 }, {
2612 .eraseblocks = { {32 * 1024, 64} },
2613 .block_erase = spi_block_erase_52,
2614 }, {
2615 .eraseblocks = { {64 * 1024, 32} },
2616 .block_erase = spi_block_erase_d8,
2617 }, {
2618 .eraseblocks = { {2 * 1024 * 1024, 1} },
2619 .block_erase = spi_block_erase_60,
2620 }, {
2621 .eraseblocks = { {2 * 1024 * 1024, 1} },
2622 .block_erase = spi_block_erase_c7,
2623 }
2624 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002625 .printlock = spi_prettyprint_status_register_at26df081a,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002626 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002627 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002628 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002629 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002630 },
2631
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002632 {
2633 .vendor = "Atmel",
2634 .name = "AT26F004",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002635 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002636 .id.type = ID_SPI_RDID,
2637 .id.manufacture = ATMEL_ID,
2638 .id.model = ATMEL_AT26F004,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002639 .total_size = 512,
2640 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002641 .feature_bits = FEATURE_WRSR_WREN,
Alan Green908adf42019-07-03 15:34:06 +10002642 .tested = {.probe = NT, .read = NT, .erase = NT, .write = BAD},
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002643 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002644 .block_erasers =
2645 {
2646 {
2647 .eraseblocks = { {4 * 1024, 128} },
2648 .block_erase = spi_block_erase_20,
2649 }, {
2650 .eraseblocks = { {32 * 1024, 16} },
2651 .block_erase = spi_block_erase_52,
2652 }, {
2653 .eraseblocks = { {64 * 1024, 8} },
2654 .block_erase = spi_block_erase_d8,
2655 }, {
2656 .eraseblocks = { {512 * 1024, 1} },
2657 .block_erase = spi_block_erase_60,
2658 }, {
2659 .eraseblocks = { {512 * 1024, 1} },
2660 .block_erase = spi_block_erase_c7,
2661 }
2662 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002663 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Alan Greencbb85c02019-06-25 13:42:34 +10002664 .write = NULL, /* Incompatible Page write */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002665 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002666 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002667 },
2668
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002669 {
2670 .vendor = "Atmel",
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002671 .name = "AT29C010A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002672 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02002673 .id.type = ID_JEDEC,
2674 .id.manufacture = ATMEL_ID,
2675 .id.model = ATMEL_AT29C010A,
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002676 .total_size = 128,
2677 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +00002678 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00002679 .tested = TEST_OK_PRE,
Maciej Pijankac6e11112009-06-03 14:46:22 +00002680 .probe_timing = 10000, /* 10mS, Enter=Exec */
Sean Nelson89187292009-12-23 12:02:55 +00002681 .block_erasers =
2682 {
2683 {
2684 .eraseblocks = { {128 * 1024, 1} },
2685 .block_erase = erase_chip_block_jedec,
2686 }
2687 },
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002688 .write = write_jedec, /* FIXME */
2689 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002690 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01002691 .prepare_access = prepare_memory_access,
2692 .finish_access = finish_memory_access,
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002693 },
2694
2695 {
2696 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002697 .name = "AT29C020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002698 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02002699 .id.type = ID_JEDEC,
2700 .id.manufacture = ATMEL_ID,
2701 .id.model = ATMEL_AT29C020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002702 .total_size = 256,
2703 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00002704 .feature_bits = FEATURE_LONG_RESET,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00002705 .tested = TEST_OK_PREW,
Uwe Hermann431f4f72010-09-05 12:41:25 +00002706 .probe_timing = 10000, /* 10ms */
Sean Nelson89187292009-12-23 12:02:55 +00002707 .block_erasers =
2708 {
2709 {
2710 .eraseblocks = { {256 * 1024, 1} },
2711 .block_erase = erase_chip_block_jedec,
2712 }
2713 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002714 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00002715 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002716 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01002717 .prepare_access = prepare_memory_access,
2718 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00002719 },
2720
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002721 {
2722 .vendor = "Atmel",
2723 .name = "AT29C040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002724 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02002725 .id.type = ID_JEDEC,
2726 .id.manufacture = ATMEL_ID,
2727 .id.model = ATMEL_AT29C040A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002728 .total_size = 512,
2729 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00002730 .feature_bits = FEATURE_LONG_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002731 .tested = TEST_UNTESTED,
Mateusz Murawski8b2f46b2009-06-12 21:29:36 +00002732 .probe_timing = 10000, /* 10 ms */
Sean Nelson89187292009-12-23 12:02:55 +00002733 .block_erasers =
2734 {
2735 {
2736 .eraseblocks = { {512 * 1024, 1} },
2737 .block_erase = erase_chip_block_jedec,
2738 }
2739 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002740 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00002741 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002742 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01002743 .prepare_access = prepare_memory_access,
2744 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00002745 },
2746
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002747 {
2748 .vendor = "Atmel",
Alan Green1f9cc7d2019-07-01 11:10:45 +10002749 .name = "AT29C512",
2750 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02002751 .id.type = ID_JEDEC,
2752 .id.manufacture = ATMEL_ID,
2753 .id.model = ATMEL_AT29C512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002754 .total_size = 64,
2755 .page_size = 128,
2756 .feature_bits = FEATURE_LONG_RESET,
2757 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002758 .probe_timing = 10000, /* 10mS, Enter=Exec */
2759 .block_erasers =
2760 {
2761 {
2762 .eraseblocks = { {64 * 1024, 1} },
2763 .block_erase = erase_chip_block_jedec,
2764 }
2765 },
2766 .write = write_jedec,
2767 .read = read_memmapped,
2768 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01002769 .prepare_access = prepare_memory_access,
2770 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002771 },
2772
2773 {
2774 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002775 .name = "AT45CS1282",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002776 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002777 .id.type = ID_SPI_RDID,
2778 .id.manufacture = ATMEL_ID,
2779 .id.model = ATMEL_AT45CS1282,
Alan Greencbb85c02019-06-25 13:42:34 +10002780 .total_size = 16896, /* No power of two sizes */
2781 .page_size = 1056, /* No power of two sizes */
Steven Zakulec3603a282012-05-02 20:07:57 +00002782 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Stefan Tauner1dd5d3a2013-08-27 18:02:19 +00002783 /* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */
2784 .feature_bits = FEATURE_OTP,
2785 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002786 .probe_timing = TIMING_ZERO,
Stefan Tauner1dd5d3a2013-08-27 18:02:19 +00002787 .block_erasers =
2788 {
2789 {
2790 .eraseblocks = {
2791 {8 * 1056, 1}, /* sector 0a: opcode 50h */
2792 {248 * 1056, 1}, /* sector 0b: opcode 7Ch */
2793 {256 * 1056, 63}, /* sectors 1 - 63: opcode 7Ch */
2794 },
2795 .block_erase = spi_erase_at45cs_sector,
2796 }
2797 },
2798 .printlock = spi_prettyprint_status_register_plain,
Stefan Tauner1dd5d3a2013-08-27 18:02:19 +00002799 .write = spi_write_at45db,
2800 .read = spi_read_at45db,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002801 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10002802 .gran = write_gran_1056bytes,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002803 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002804
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002805 {
2806 .vendor = "Atmel",
2807 .name = "AT45DB011D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002808 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002809 .id.type = ID_SPI_RDID,
2810 .id.manufacture = ATMEL_ID,
2811 .id.model = ATMEL_AT45DB011D,
Alan Greencbb85c02019-06-25 13:42:34 +10002812 .total_size = 128, /* or 132, determined from status register */
2813 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002814 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002815 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2816 .feature_bits = FEATURE_OTP,
Stefan Tauner5c316f92015-02-08 21:57:52 +00002817 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002818 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002819 .block_erasers =
2820 {
2821 {
2822 .eraseblocks = { {256, 512} },
2823 .block_erase = spi_erase_at45db_page,
2824 }, {
2825 .eraseblocks = { {8 * 256, 512/8} },
2826 .block_erase = spi_erase_at45db_block,
2827 }, {
2828 .eraseblocks = {
2829 {8 * 256, 1},
2830 {120 * 256, 1},
2831 {128 * 256, 3},
2832 },
2833 .block_erase = spi_erase_at45db_sector
2834 }, {
2835 .eraseblocks = { {128 * 1024, 1} },
2836 .block_erase = spi_erase_at45db_chip,
2837 }
2838 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002839 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002840 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002841 /* granularity will be set by the probing function. */
2842 .write = spi_write_at45db,
2843 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002844 .voltage = {2700, 3600},
Nico Huber32f1ea82023-05-01 15:11:48 +02002845 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002846 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002847
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002848 {
2849 .vendor = "Atmel",
2850 .name = "AT45DB021D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002851 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002852 .id.type = ID_SPI_RDID,
2853 .id.manufacture = ATMEL_ID,
2854 .id.model = ATMEL_AT45DB021D,
Alan Greencbb85c02019-06-25 13:42:34 +10002855 .total_size = 256, /* or 264, determined from status register */
2856 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002857 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002858 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2859 .feature_bits = FEATURE_OTP,
Stefan Tauner6697f712014-08-06 15:09:15 +00002860 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002861 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002862 .block_erasers =
2863 {
2864 {
2865 .eraseblocks = { {256, 1024} },
2866 .block_erase = spi_erase_at45db_page,
2867 }, {
2868 .eraseblocks = { {8 * 256, 1024/8} },
2869 .block_erase = spi_erase_at45db_block,
2870 }, {
2871 .eraseblocks = {
2872 {8 * 256, 1},
2873 {120 * 256, 1},
2874 {128 * 256, 7},
2875 },
2876 .block_erase = spi_erase_at45db_sector
2877 }, {
2878 .eraseblocks = { {256 * 1024, 1} },
2879 .block_erase = spi_erase_at45db_chip,
2880 }
2881 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002882 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002883 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002884 /* granularity will be set by the probing function. */
2885 .write = spi_write_at45db,
2886 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002887 .voltage = {2700, 3600},
Nico Huber32f1ea82023-05-01 15:11:48 +02002888 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002889 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002890
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002891 {
2892 .vendor = "Atmel",
2893 .name = "AT45DB041D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002894 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002895 .id.type = ID_SPI_RDID,
2896 .id.manufacture = ATMEL_ID,
2897 .id.model = ATMEL_AT45DB041D,
Alan Greencbb85c02019-06-25 13:42:34 +10002898 .total_size = 512, /* or 528, determined from status register */
2899 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002900 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002901 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2902 .feature_bits = FEATURE_OTP,
2903 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002904 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002905 .block_erasers =
2906 {
2907 {
2908 .eraseblocks = { {256, 2048} },
2909 .block_erase = spi_erase_at45db_page,
2910 }, {
2911 .eraseblocks = { {8 * 256, 2048/8} },
2912 .block_erase = spi_erase_at45db_block,
2913 }, {
2914 .eraseblocks = {
2915 {8 * 256, 1},
2916 {248 * 256, 1},
2917 {256 * 256, 7},
2918 },
2919 .block_erase = spi_erase_at45db_sector
2920 }, {
2921 .eraseblocks = { {512 * 1024, 1} },
2922 .block_erase = spi_erase_at45db_chip,
2923 }
2924 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002925 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002926 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002927 /* granularity will be set by the probing function. */
2928 .write = spi_write_at45db,
2929 .read = spi_read_at45db, /* Fast read (0x0B) supported */
2930 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02002931 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002932 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002933
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002934 {
2935 .vendor = "Atmel",
2936 .name = "AT45DB081D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002937 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002938 .id.type = ID_SPI_RDID,
2939 .id.manufacture = ATMEL_ID,
2940 .id.model = ATMEL_AT45DB081D,
Alan Greencbb85c02019-06-25 13:42:34 +10002941 .total_size = 1024, /* or 1056, determined from status register */
2942 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002943 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002944 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2945 .feature_bits = FEATURE_OTP,
Angel Pons250aeba2018-09-30 20:28:22 +02002946 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002947 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002948 .block_erasers =
2949 {
2950 {
2951 .eraseblocks = { {256, 4096} },
2952 .block_erase = spi_erase_at45db_page,
2953 }, {
2954 .eraseblocks = { {8 * 256, 4096/8} },
2955 .block_erase = spi_erase_at45db_block,
2956 }, {
2957 .eraseblocks = {
2958 {8 * 256, 1},
2959 {248 * 256, 1},
2960 {256 * 256, 15},
2961 },
2962 .block_erase = spi_erase_at45db_sector
2963 }, {
2964 .eraseblocks = { {1024 * 1024, 1} },
2965 .block_erase = spi_erase_at45db_chip,
2966 }
2967 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002968 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002969 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002970 /* granularity will be set by the probing function. */
2971 .write = spi_write_at45db,
2972 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +00002973 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02002974 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002975 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002976
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002977 {
2978 .vendor = "Atmel",
2979 .name = "AT45DB161D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002980 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02002981 .id.type = ID_SPI_RDID,
2982 .id.manufacture = ATMEL_ID,
2983 .id.model = ATMEL_AT45DB161D,
Alan Greencbb85c02019-06-25 13:42:34 +10002984 .total_size = 2048, /* or 2112, determined from status register */
2985 .page_size = 512, /* or 528, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002986 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002987 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2988 .feature_bits = FEATURE_OTP,
2989 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002990 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002991 .block_erasers =
2992 {
2993 {
2994 .eraseblocks = { {512, 4096} },
2995 .block_erase = spi_erase_at45db_page,
2996 }, {
2997 .eraseblocks = { {8 * 512, 4096/8} },
2998 .block_erase = spi_erase_at45db_block,
2999 }, {
3000 .eraseblocks = {
3001 {8 * 512, 1},
3002 {248 * 512, 1},
3003 {256 * 512, 15},
3004 },
3005 .block_erase = spi_erase_at45db_sector
3006 }, {
3007 .eraseblocks = { {2048 * 1024, 1} },
3008 .block_erase = spi_erase_at45db_chip,
3009 }
3010 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003011 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003012 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003013 /* granularity will be set by the probing function. */
3014 .write = spi_write_at45db,
3015 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +00003016 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02003017 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003018 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003019
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003020 {
3021 .vendor = "Atmel",
3022 .name = "AT45DB321C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003023 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003024 .id.type = ID_SPI_RDID,
3025 .id.manufacture = ATMEL_ID,
3026 .id.model = ATMEL_AT45DB321C,
Alan Greencbb85c02019-06-25 13:42:34 +10003027 .total_size = 4224, /* No power of two sizes */
3028 .page_size = 528, /* No power of two sizes */
Steven Zakulec3603a282012-05-02 20:07:57 +00003029 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003030 /* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */
3031 .feature_bits = FEATURE_OTP,
3032 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003033 .probe_timing = TIMING_ZERO,
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003034 .block_erasers =
3035 {
3036 {
3037 .eraseblocks = { {528, 8192} },
3038 .block_erase = spi_erase_at45db_page,
3039 }, {
3040 .eraseblocks = { {8 * 528, 8192/8} },
3041 .block_erase = spi_erase_at45db_block,
3042 }, /* Although the datasheets describes sectors (which can be write protected)
3043 * there seems to be no erase functions for them.
Stefan Tauner23e10b82016-01-23 16:16:49 +00003044 {
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003045 .eraseblocks = {
3046 {8 * 528, 1},
3047 {120 * 528, 1},
3048 {128 * 528, 63},
3049 },
3050 .block_erase = spi_erase_at45db_sector
3051 }, */ {
3052 .eraseblocks = { {4224 * 1024, 1} },
3053 .block_erase = spi_erase_at45db_chip,
3054 }
3055 },
3056 .printlock = spi_prettyprint_status_register_at45db, /* Bit 0 is undefined, no lockdown */
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003057 .write = spi_write_at45db,
3058 .read = spi_read_at45db_e8, /* 3 address and 4 dummy bytes */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003059 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10003060 .gran = write_gran_528bytes,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003061 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003062
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003063 {
3064 .vendor = "Atmel",
3065 .name = "AT45DB321D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003066 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003067 .id.type = ID_SPI_RDID,
3068 .id.manufacture = ATMEL_ID,
3069 .id.model = ATMEL_AT45DB321D,
Alan Greencbb85c02019-06-25 13:42:34 +10003070 .total_size = 4096, /* or 4224, determined from status register */
3071 .page_size = 512, /* or 528, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00003072 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003073 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
Daniel Lenski65922a32012-02-15 23:40:23 +00003074 .feature_bits = FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +00003075 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003076 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003077 .block_erasers =
3078 {
3079 {
3080 .eraseblocks = { {512, 8192} },
3081 .block_erase = spi_erase_at45db_page,
3082 }, {
3083 .eraseblocks = { {8 * 512, 8192/8} },
3084 .block_erase = spi_erase_at45db_block,
3085 }, {
3086 .eraseblocks = {
3087 {8 * 512, 1},
3088 {120 * 512, 1},
3089 {128 * 512, 63},
3090 },
3091 .block_erase = spi_erase_at45db_sector
3092 }, {
3093 .eraseblocks = { {4096 * 1024, 1} },
3094 .block_erase = spi_erase_at45db_chip,
3095 }
3096 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003097 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003098 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003099 /* granularity will be set by the probing function. */
3100 .write = spi_write_at45db,
3101 .read = spi_read_at45db, /* Fast read (0x0B) supported */
3102 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02003103 .prepare_access = spi_prepare_at45db,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003104 },
3105
3106 {
3107 .vendor = "Atmel",
3108 .name = "AT45DB321E",
3109 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003110 .id.type = ID_SPI_RDID,
3111 .id.manufacture = ATMEL_ID,
3112 .id.model = ATMEL_AT45DB321C,
Alan Greencbb85c02019-06-25 13:42:34 +10003113 .total_size = 4096, /* or 4224, determined from status register */
3114 .page_size = 512, /* or 528, determined from status register */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003115 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
3116 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
3117 .feature_bits = FEATURE_OTP,
3118 .tested = TEST_UNTESTED,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003119 .probe_timing = TIMING_ZERO,
3120 .block_erasers =
3121 {
3122 {
3123 .eraseblocks = { {512, 8192} },
3124 .block_erase = spi_erase_at45db_page,
3125 }, {
3126 .eraseblocks = { {8 * 512, 8192/8} },
3127 .block_erase = spi_erase_at45db_block,
3128 }, {
3129 .eraseblocks = {
3130 {8 * 512, 1},
3131 {120 * 512, 1},
3132 {128 * 512, 63},
3133 },
3134 .block_erase = spi_erase_at45db_sector
3135 }, {
3136 .eraseblocks = { {4096 * 1024, 1} },
3137 .block_erase = spi_erase_at45db_chip,
3138 }
3139 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003140 .printlock = spi_prettyprint_status_register_at45db, /* has a 2nd status register */
Alan Greenc1863ca2019-06-27 15:08:03 +10003141 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003142 /* granularity will be set by the probing function. */
3143 .write = spi_write_at45db,
3144 .read = spi_read_at45db, /* Fast read (0x0B) supported */
3145 .voltage = {2500, 3600}, /* 2.3-3.6V & 2.5-3.6V models available */
Nico Huber32f1ea82023-05-01 15:11:48 +02003146 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003147 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003148
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003149 {
3150 .vendor = "Atmel",
3151 .name = "AT45DB642D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003152 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003153 .id.type = ID_SPI_RDID,
3154 .id.manufacture = ATMEL_ID,
3155 .id.model = ATMEL_AT45DB642D,
Alan Greencbb85c02019-06-25 13:42:34 +10003156 .total_size = 8192, /* or 8448, determined from status register */
3157 .page_size = 1024, /* or 1056, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00003158 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003159 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
3160 .feature_bits = FEATURE_OTP,
Stefan Tauner5c316f92015-02-08 21:57:52 +00003161 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003162 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003163 .block_erasers =
3164 {
3165 {
3166 .eraseblocks = { {1024, 8192} },
3167 .block_erase = spi_erase_at45db_page,
3168 }, {
3169 .eraseblocks = { {8 * 1024, 8192/8} },
3170 .block_erase = spi_erase_at45db_block,
3171 }, {
3172 .eraseblocks = {
3173 {8 * 1024, 1},
3174 {248 * 1024, 1},
3175 {256 * 1024, 31},
3176 },
3177 .block_erase = spi_erase_at45db_sector
3178 }, {
3179 .eraseblocks = { {8192 * 1024, 1} },
3180 .block_erase = spi_erase_at45db_chip,
3181 }
3182 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003183 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003184 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003185 /* granularity will be set by the probing function. */
3186 .write = spi_write_at45db,
3187 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003188 .voltage = {2700, 3600},
Nico Huber32f1ea82023-05-01 15:11:48 +02003189 .prepare_access = spi_prepare_at45db,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003190 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003191
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003192 {
3193 .vendor = "Atmel",
Alan Green1f9cc7d2019-07-01 11:10:45 +10003194 .name = "AT49(H)F010",
3195 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02003196 .id.type = ID_JEDEC,
3197 .id.manufacture = ATMEL_ID,
3198 .id.model = ATMEL_AT49F010,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003199 .total_size = 128,
3200 .page_size = 0, /* unused */
3201 .feature_bits = FEATURE_EITHER_RESET,
3202 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003203 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3204 .block_erasers =
3205 {
3206 {
3207 .eraseblocks = { {128 * 1024, 1} },
3208 .block_erase = erase_chip_block_jedec,
3209 }
3210 },
3211 .printlock = printlock_at49f,
3212 .write = write_jedec_1,
3213 .read = read_memmapped,
3214 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003215 .prepare_access = prepare_memory_access,
3216 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003217 },
3218
3219 {
3220 .vendor = "Atmel",
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003221 .name = "AT49BV512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003222 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02003223 .id.type = ID_JEDEC,
3224 .id.manufacture = ATMEL_ID,
3225 .id.model = ATMEL_AT49BV512,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003226 .total_size = 64,
3227 .page_size = 64,
Sean Nelson35727f72010-01-28 23:55:12 +00003228 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +00003229 .tested = TEST_OK_PREW,
Udu Ogahc04ee222009-09-05 01:31:32 +00003230 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003231 .block_erasers =
3232 {
3233 {
3234 .eraseblocks = { {64 * 1024, 1} },
3235 .block_erase = erase_chip_block_jedec,
3236 }
3237 },
Sean Nelson35727f72010-01-28 23:55:12 +00003238 .write = write_jedec_1,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003239 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003240 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01003241 .prepare_access = prepare_memory_access,
3242 .finish_access = finish_memory_access,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003243 },
3244
3245 {
3246 .vendor = "Atmel",
Nico Huberdafaf502026-03-22 19:18:43 +01003247 .name = "AT49F511",
3248 .bustype = BUS_PARALLEL,
3249 .id.type = ID_JEDEC,
3250 .id.manufacture = ATMEL_ID,
3251 .id.model = ATMEL_AT49F511,
3252 .total_size = 64,
3253 .feature_bits = FEATURE_EITHER_RESET,
3254 .tested = TEST_OK_PREW,
3255 .probe_timing = TIMING_ZERO,
3256 .block_erasers =
3257 {
3258 {
3259 .eraseblocks = { {64 * 1024, 1} },
3260 .block_erase = erase_sector_jedec,
3261 }, {
3262 .eraseblocks = { {64 * 1024, 1} },
3263 .block_erase = erase_chip_block_jedec,
3264 }
3265 },
3266 .write = write_jedec_1,
3267 .read = read_memmapped,
3268 .voltage = {4500, 5500},
3269 .prepare_access = prepare_memory_access,
3270 .finish_access = finish_memory_access,
3271 },
3272
3273 {
3274 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003275 .name = "AT49F002(N)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003276 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02003277 .id.type = ID_JEDEC,
3278 .id.manufacture = ATMEL_ID,
3279 .id.model = ATMEL_AT49F002N,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003280 .total_size = 256,
3281 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00003282 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003283 .tested = TEST_UNTESTED,
Udu Ogahc04ee222009-09-05 01:31:32 +00003284 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003285 .block_erasers =
3286 {
3287 {
3288 .eraseblocks = {
3289 {16 * 1024, 1},
3290 {8 * 1024, 2},
3291 {96 * 1024, 1},
3292 {128 * 1024, 1},
3293 },
3294 .block_erase = erase_sector_jedec,
3295 }, {
3296 .eraseblocks = { {256 * 1024, 1} },
3297 .block_erase = erase_chip_block_jedec,
3298 }
3299 },
Sean Nelson35727f72010-01-28 23:55:12 +00003300 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00003301 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003302 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003303 .prepare_access = prepare_memory_access,
3304 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00003305 },
3306
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003307 {
3308 .vendor = "Atmel",
3309 .name = "AT49F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003310 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02003311 .id.type = ID_JEDEC,
3312 .id.manufacture = ATMEL_ID,
3313 .id.model = ATMEL_AT49F002NT,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003314 .total_size = 256,
3315 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00003316 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00003317 .tested = TEST_OK_PR,
Udu Ogahc04ee222009-09-05 01:31:32 +00003318 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003319 .block_erasers =
3320 {
3321 {
3322 .eraseblocks = {
3323 {128 * 1024, 1},
3324 {96 * 1024, 1},
3325 {8 * 1024, 2},
3326 {16 * 1024, 1},
3327 },
3328 .block_erase = erase_sector_jedec,
3329 }, {
3330 .eraseblocks = { {256 * 1024, 1} },
3331 .block_erase = erase_chip_block_jedec,
3332 }
3333 },
Sean Nelson35727f72010-01-28 23:55:12 +00003334 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00003335 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003336 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003337 .prepare_access = prepare_memory_access,
3338 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00003339 },
3340
Daniel Lenskidf90d3a2010-07-22 11:44:38 +00003341 {
Uwe Hermannc74e9772011-09-08 19:55:18 +00003342 .vendor = "Atmel",
David Borgf5a30f62012-04-15 13:16:32 +00003343 .name = "AT49F020",
3344 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02003345 .id.type = ID_JEDEC,
3346 .id.manufacture = ATMEL_ID,
3347 .id.model = ATMEL_AT49F020,
David Borgf5a30f62012-04-15 13:16:32 +00003348 .total_size = 256,
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_OK_PRE,
David Borgf5a30f62012-04-15 13:16:32 +00003352 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3353 .block_erasers =
3354 {
3355 {
3356 .eraseblocks = { {256 * 1024, 1} },
3357 .block_erase = erase_chip_block_jedec,
3358 }
3359 /* Chip features an optional permanent write protection
3360 * of the first 8 kB. The erase function is the same as
3361 * above, but 00000H to 01FFFH will not be erased.
3362 * FIXME: add another eraser when partial erasers are
3363 * supported.
3364 */
3365 },
3366 .printlock = printlock_at49f,
3367 .write = write_jedec_1,
3368 .read = read_memmapped,
3369 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003370 .prepare_access = prepare_memory_access,
3371 .finish_access = finish_memory_access,
David Borgf5a30f62012-04-15 13:16:32 +00003372 },
3373
3374 {
3375 .vendor = "Atmel",
3376 .name = "AT49F040",
3377 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02003378 .id.type = ID_JEDEC,
3379 .id.manufacture = ATMEL_ID,
3380 .id.model = ATMEL_AT49F040,
David Borgf5a30f62012-04-15 13:16:32 +00003381 .total_size = 512,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003382 .page_size = 0, /* unused */
David Borgf5a30f62012-04-15 13:16:32 +00003383 .feature_bits = FEATURE_EITHER_RESET,
3384 .tested = TEST_UNTESTED,
David Borgf5a30f62012-04-15 13:16:32 +00003385 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3386 .block_erasers =
3387 {
3388 {
3389 .eraseblocks = { {512 * 1024, 1} },
3390 .block_erase = erase_chip_block_jedec,
3391 }
3392 /* Chip features an optional permanent write protection
3393 * of the first 16 kB. The erase function is the same as
3394 * above, but 00000H to 03FFFH will not be erased.
3395 * FIXME: add another eraser when partial erasers are
3396 * supported.
3397 */
3398 },
3399 .printlock = printlock_at49f,
3400 .write = write_jedec_1,
3401 .read = read_memmapped,
3402 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003403 .prepare_access = prepare_memory_access,
3404 .finish_access = finish_memory_access,
David Borgf5a30f62012-04-15 13:16:32 +00003405 },
3406
3407 {
3408 .vendor = "Atmel",
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003409 .name = "AT49F080",
3410 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02003411 .id.type = ID_JEDEC,
3412 .id.manufacture = ATMEL_ID,
3413 .id.model = ATMEL_AT49F080,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003414 .total_size = 1024,
3415 .page_size = 0, /* unused */
3416 .feature_bits = FEATURE_EITHER_RESET,
3417 .tested = TEST_UNTESTED,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003418 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3419 .block_erasers =
3420 {
3421 {
3422 .eraseblocks = { {1024 * 1024, 1} },
3423 .block_erase = erase_chip_block_jedec,
3424 }
3425 /* Chip features an optional permanent write protection
3426 * of the first 16 kB. The erase function is the same as
3427 * above, but 00000H to 03FFFH will not be erased.
3428 * FIXME: add another eraser when partial erasers are
3429 * supported.
3430 */
3431 },
3432 .printlock = printlock_at49f,
3433 .write = write_jedec_1,
3434 .read = read_memmapped,
3435 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003436 .prepare_access = prepare_memory_access,
3437 .finish_access = finish_memory_access,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003438 },
3439
3440 {
3441 /* 'top' version of AT49F080. equal in all aspects but the boot block address */
3442 .vendor = "Atmel",
3443 .name = "AT49F080T",
3444 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02003445 .id.type = ID_JEDEC,
3446 .id.manufacture = ATMEL_ID,
3447 .id.model = ATMEL_AT49F080T,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003448 .total_size = 1024,
3449 .page_size = 0, /* unused */
3450 .feature_bits = FEATURE_EITHER_RESET,
3451 .tested = TEST_UNTESTED,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003452 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3453 .block_erasers =
3454 {
3455 {
3456 .eraseblocks = { {1024 * 1024, 1} },
3457 .block_erase = erase_chip_block_jedec,
3458 }
3459 /* Chip features an optional permanent write protection
3460 * of the first 16 kB. The erase function is the same as
3461 * above, but FC000H to FFFFFH will not be erased.
3462 * FIXME: add another eraser when partial erasers are
3463 * supported.
3464 */
3465 },
3466 .printlock = printlock_at49f,
3467 .write = write_jedec_1,
3468 .read = read_memmapped,
3469 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003470 .prepare_access = prepare_memory_access,
3471 .finish_access = finish_memory_access,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003472 },
3473
3474 {
3475 .vendor = "Atmel",
Uwe Hermannc74e9772011-09-08 19:55:18 +00003476 .name = "AT49LH002",
3477 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Nico Huber11136c22023-05-01 12:00:09 +02003478 .id.type = ID_82802AB,
3479 .id.manufacture = ATMEL_ID,
3480 .id.model = ATMEL_AT49LH002,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003481 .total_size = 256,
3482 .page_size = 0, /* unused */
Uwe Hermannc74e9772011-09-08 19:55:18 +00003483 .tested = TEST_UNTESTED,
Stefan Tauner7de93932014-08-03 13:05:45 +00003484 .probe_timing = TIMING_ZERO,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003485 .block_erasers =
3486 {
3487 {
3488 .eraseblocks = {
3489 {64 * 1024, 3},
3490 {32 * 1024, 1},
3491 {8 * 1024, 2},
3492 {16 * 1024, 1},
3493 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003494 .block_erase = NULL, /* TODO: Implement. */
Uwe Hermannc74e9772011-09-08 19:55:18 +00003495 }, {
3496 .eraseblocks = {
3497 {64 * 1024, 4},
3498 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003499 .block_erase = erase_block_82802ab,
3500 },
3501 },
3502 .printlock = printlock_regspace2_block_eraser_0,
3503 .unlock = unlock_regspace2_block_eraser_0,
3504 .write = write_82802ab,
3505 .read = read_memmapped,
3506 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003507 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003508 .finish_access = finish_memory_access,
Stefan Tauner7de93932014-08-03 13:05:45 +00003509 },
3510
3511 {
3512 .vendor = "Atmel",
Stefan Tauner7de93932014-08-03 13:05:45 +00003513 .name = "AT49LH004",
3514 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Nico Huber11136c22023-05-01 12:00:09 +02003515 .id.type = ID_82802AB,
3516 .id.manufacture = ATMEL_ID,
3517 .id.model = ATMEL_AT49LH004,
Stefan Tauner7de93932014-08-03 13:05:45 +00003518 .total_size = 512,
3519 .page_size = 0, /* unused */
Stefan Tauner7de93932014-08-03 13:05:45 +00003520 .tested = TEST_UNTESTED,
Stefan Tauner7de93932014-08-03 13:05:45 +00003521 .probe_timing = TIMING_ZERO,
3522 .block_erasers =
3523 {
3524 {
3525 .eraseblocks = {
3526 {64 * 1024, 7},
3527 {32 * 1024, 1},
3528 {8 * 1024, 2},
3529 {16 * 1024, 1},
3530 },
3531 .block_erase = erase_block_82802ab,
3532 }, {
3533 .eraseblocks = {
3534 {64 * 1024, 8},
3535 },
Uwe Hermannc74e9772011-09-08 19:55:18 +00003536 .block_erase = NULL, /* TODO: Implement. */
3537 },
3538 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003539 .printlock = printlock_regspace2_block_eraser_0,
3540 .unlock = unlock_regspace2_block_eraser_0,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003541 .write = write_82802ab,
3542 .read = read_memmapped,
3543 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003544 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003545 .finish_access = finish_memory_access,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003546 },
3547
3548 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003549 .vendor = "Atmel",
3550 .name = "AT49LH00B4",
3551 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Nico Huber11136c22023-05-01 12:00:09 +02003552 .id.type = ID_82802AB,
3553 .id.manufacture = ATMEL_ID,
3554 .id.model = ATMEL_AT49LH00B4,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003555 .total_size = 512,
Andrew Morganca081462011-09-13 22:05:44 +00003556 .page_size = 0, /* unused */
Alan Green1f9cc7d2019-07-01 11:10:45 +10003557 .tested = TEST_UNTESTED,
Andrew Morganca081462011-09-13 22:05:44 +00003558 .probe_timing = TIMING_ZERO,
3559 .block_erasers =
3560 {
3561 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003562 .eraseblocks = {
3563 {8 * 1024, 2},
3564 {16 * 1024, 1},
3565 {32 * 1024, 1},
3566 {64 * 1024, 7},
3567 },
3568 .block_erase = NULL, /* TODO: Implement. */
3569 }, {
3570 .eraseblocks = {
3571 {64 * 1024, 8},
3572 },
3573 .block_erase = erase_block_82802ab,
Andrew Morganca081462011-09-13 22:05:44 +00003574 },
3575 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10003576 .printlock = printlock_regspace2_block_eraser_0,
3577 .unlock = unlock_regspace2_block_eraser_0,
3578 .write = write_82802ab,
Andrew Morganca081462011-09-13 22:05:44 +00003579 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003580 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003581 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003582 .finish_access = finish_memory_access,
Andrew Morganca081462011-09-13 22:05:44 +00003583 },
3584
3585 {
Angel Pons1ebda782021-04-20 21:39:11 +02003586 .vendor = "Boya/BoHong Microelectronics",
Nico Huber3cddff42024-10-20 15:18:53 +02003587 .name = "B.25D05AS",
Christian Kudera475a7ee2021-04-20 22:50:01 +02003588 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003589 .id.type = ID_SPI_RDID,
3590 .id.manufacture = BOYA_BOHONG_ID,
3591 .id.model = BOYA_BOHONG_B_25D05AS,
Nico Huber3cddff42024-10-20 15:18:53 +02003592 .total_size = 64,
3593 .page_size = 256,
3594 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3595 .tested = TEST_UNTESTED,
Nico Huber3cddff42024-10-20 15:18:53 +02003596 .probe_timing = TIMING_ZERO,
3597 .block_erasers =
3598 {
3599 {
3600 .eraseblocks = { {4 * 1024, 16} },
3601 .block_erase = spi_block_erase_20,
3602 }, {
3603 .eraseblocks = { {32 * 1024, 2} },
3604 .block_erase = spi_block_erase_52,
3605 }, {
3606 .eraseblocks = { {64 * 1024, 1} },
3607 .block_erase = spi_block_erase_d8,
3608 }, {
3609 .eraseblocks = { {64 * 1024, 1} },
3610 .block_erase = spi_block_erase_60,
3611 }, {
3612 .eraseblocks = { {64 * 1024, 1} },
3613 .block_erase = spi_block_erase_c7,
3614 },
3615 },
3616 .printlock = spi_prettyprint_status_register_bp2_srwd,
3617 .unlock = spi_disable_blockprotect_bp2_srwd,
3618 .write = spi_chip_write_256,
3619 .read = spi_chip_read,
3620 .voltage = {2700, 3600},
3621 .prepare_access = spi_prepare_io,
3622 .finish_access = spi_finish_io,
3623 },
3624
3625 {
3626 .vendor = "Boya/BoHong Microelectronics",
3627 .name = "B.25D10AS",
3628 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003629 .id.type = ID_SPI_RDID,
3630 .id.manufacture = BOYA_BOHONG_ID,
3631 .id.model = BOYA_BOHONG_B_25D10AS,
Nico Huber3cddff42024-10-20 15:18:53 +02003632 .total_size = 128,
3633 .page_size = 256,
3634 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3635 .tested = TEST_UNTESTED,
Nico Huber3cddff42024-10-20 15:18:53 +02003636 .probe_timing = TIMING_ZERO,
3637 .block_erasers =
3638 {
3639 {
3640 .eraseblocks = { {4 * 1024, 32} },
3641 .block_erase = spi_block_erase_20,
3642 }, {
3643 .eraseblocks = { {32 * 1024, 4} },
3644 .block_erase = spi_block_erase_52,
3645 }, {
3646 .eraseblocks = { {64 * 1024, 2} },
3647 .block_erase = spi_block_erase_d8,
3648 }, {
3649 .eraseblocks = { {128 * 1024, 1} },
3650 .block_erase = spi_block_erase_60,
3651 }, {
3652 .eraseblocks = { {128 * 1024, 1} },
3653 .block_erase = spi_block_erase_c7,
3654 },
3655 },
3656 .printlock = spi_prettyprint_status_register_bp2_srwd,
3657 .unlock = spi_disable_blockprotect_bp2_srwd,
3658 .write = spi_chip_write_256,
3659 .read = spi_chip_read,
3660 .voltage = {2700, 3600},
3661 .prepare_access = spi_prepare_io,
3662 .finish_access = spi_finish_io,
3663 },
3664
3665 {
3666 .vendor = "Boya/BoHong Microelectronics",
3667 .name = "B.25D20AS",
3668 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003669 .id.type = ID_SPI_RDID,
3670 .id.manufacture = BOYA_BOHONG_ID,
3671 .id.model = BOYA_BOHONG_B_25D20AS,
Nico Huber3cddff42024-10-20 15:18:53 +02003672 .total_size = 256,
3673 .page_size = 256,
3674 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3675 .tested = TEST_UNTESTED,
Nico Huber3cddff42024-10-20 15:18:53 +02003676 .probe_timing = TIMING_ZERO,
3677 .block_erasers =
3678 {
3679 {
3680 .eraseblocks = { {4 * 1024, 64} },
3681 .block_erase = spi_block_erase_20,
3682 }, {
3683 .eraseblocks = { {32 * 1024, 8} },
3684 .block_erase = spi_block_erase_52,
3685 }, {
3686 .eraseblocks = { {64 * 1024, 4} },
3687 .block_erase = spi_block_erase_d8,
3688 }, {
3689 .eraseblocks = { {256 * 1024, 1} },
3690 .block_erase = spi_block_erase_60,
3691 }, {
3692 .eraseblocks = { {256 * 1024, 1} },
3693 .block_erase = spi_block_erase_c7,
3694 },
3695 },
3696 .printlock = spi_prettyprint_status_register_bp2_srwd,
3697 .unlock = spi_disable_blockprotect_bp2_srwd,
3698 .write = spi_chip_write_256,
3699 .read = spi_chip_read,
3700 .voltage = {2700, 3600},
3701 .prepare_access = spi_prepare_io,
3702 .finish_access = spi_finish_io,
3703 },
3704
3705 {
3706 .vendor = "Boya/BoHong Microelectronics",
3707 .name = "B.25D40AS/BY25D40ES",
3708 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003709 .id.type = ID_SPI_RDID,
3710 .id.manufacture = BOYA_BOHONG_ID,
3711 .id.model = BOYA_BOHONG_B_25D40AS,
Nico Huber3cddff42024-10-20 15:18:53 +02003712 .total_size = 512,
3713 .page_size = 256,
3714 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3715 .tested = TEST_UNTESTED,
Nico Huber3cddff42024-10-20 15:18:53 +02003716 .probe_timing = TIMING_ZERO,
3717 .block_erasers =
3718 {
3719 {
3720 .eraseblocks = { {4 * 1024, 128} },
3721 .block_erase = spi_block_erase_20,
3722 }, {
3723 .eraseblocks = { {32 * 1024, 16} },
3724 .block_erase = spi_block_erase_52,
3725 }, {
3726 .eraseblocks = { {64 * 1024, 8} },
3727 .block_erase = spi_block_erase_d8,
3728 }, {
3729 .eraseblocks = { {512 * 1024, 1} },
3730 .block_erase = spi_block_erase_60,
3731 }, {
3732 .eraseblocks = { {512 * 1024, 1} },
3733 .block_erase = spi_block_erase_c7,
3734 },
3735 },
3736 .printlock = spi_prettyprint_status_register_bp2_srwd,
3737 .unlock = spi_disable_blockprotect_bp2_srwd,
3738 .write = spi_chip_write_256,
3739 .read = spi_chip_read,
3740 .voltage = {2700, 3600},
3741 .prepare_access = spi_prepare_io,
3742 .finish_access = spi_finish_io,
3743 },
3744
3745 {
3746 .vendor = "Boya/BoHong Microelectronics",
3747 .name = "B.25D80AS/BY25Q80BS/BY25Q80ES",
3748 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003749 .id.type = ID_SPI_RDID,
3750 .id.manufacture = BOYA_BOHONG_ID,
3751 .id.model = BOYA_BOHONG_B_25D80AS,
Nico Huber3cddff42024-10-20 15:18:53 +02003752 .total_size = 1024,
3753 .page_size = 256,
3754 /* BY25Q80BS: QPI, BY25Q80ES: QIO */
3755 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3756 .tested = TEST_UNTESTED,
Nico Huber3cddff42024-10-20 15:18:53 +02003757 .probe_timing = TIMING_ZERO,
3758 .block_erasers =
3759 {
3760 {
3761 .eraseblocks = { {4 * 1024, 256} },
3762 .block_erase = spi_block_erase_20,
3763 }, {
3764 .eraseblocks = { {32 * 1024, 32} },
3765 .block_erase = spi_block_erase_52,
3766 }, {
3767 .eraseblocks = { {64 * 1024, 16} },
3768 .block_erase = spi_block_erase_d8,
3769 }, {
3770 .eraseblocks = { {1024 * 1024, 1} },
3771 .block_erase = spi_block_erase_60,
3772 }, {
3773 .eraseblocks = { {1024 * 1024, 1} },
3774 .block_erase = spi_block_erase_c7,
3775 },
3776 },
3777 .printlock = spi_prettyprint_status_register_bp2_srwd,
3778 .unlock = spi_disable_blockprotect_bp2_srwd,
3779 .write = spi_chip_write_256,
3780 .read = spi_chip_read,
3781 .voltage = {2700, 3600},
3782 .prepare_access = spi_prepare_io,
3783 .finish_access = spi_finish_io,
3784 },
3785
3786 {
3787 .vendor = "Boya/BoHong Microelectronics",
3788 .name = "B.25D16AS/BY25Q16BS/BY25Q16ES",
3789 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003790 .id.type = ID_SPI_RDID,
3791 .id.manufacture = BOYA_BOHONG_ID,
3792 .id.model = BOYA_BOHONG_B_25D16AS,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003793 .total_size = 2048,
3794 .page_size = 256,
Nico Huber3cddff42024-10-20 15:18:53 +02003795 /* B25Q16BS/ES: QPI */
3796 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003797 .tested = TEST_OK_PR,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003798 .probe_timing = TIMING_ZERO,
3799 .block_erasers =
3800 {
3801 {
3802 .eraseblocks = { {4 * 1024, 512} },
3803 .block_erase = spi_block_erase_20,
3804 }, {
3805 .eraseblocks = { {32 * 1024, 64} },
3806 .block_erase = spi_block_erase_52,
3807 }, {
3808 .eraseblocks = { {64 * 1024, 32} },
3809 .block_erase = spi_block_erase_d8,
3810 }, {
3811 .eraseblocks = { {2 * 1024 * 1024, 1} },
3812 .block_erase = spi_block_erase_60,
3813 }, {
3814 .eraseblocks = { {2 * 1024 * 1024, 1} },
3815 .block_erase = spi_block_erase_c7,
3816 }
3817 },
3818 .printlock = spi_prettyprint_status_register_bp2_srwd,
3819 .unlock = spi_disable_blockprotect_bp2_srwd,
3820 .write = spi_chip_write_256,
3821 .read = spi_chip_read,
3822 .voltage = {2700, 3600},
Nico Huber3cddff42024-10-20 15:18:53 +02003823 .prepare_access = spi_prepare_io,
3824 .finish_access = spi_finish_io,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003825 },
3826
3827 {
3828 .vendor = "Boya/BoHong Microelectronics",
Nico Huber6bc88e72024-10-20 16:32:08 +02003829 .name = "B.25Q32BS/BY25Q32CS/BY25Q32ES",
3830 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003831 .id.type = ID_SPI_RDID,
3832 .id.manufacture = BOYA_BOHONG_ID,
3833 .id.model = BOYA_BOHONG_B_25Q32BS,
Nico Huber6bc88e72024-10-20 16:32:08 +02003834 .total_size = 4096,
3835 .page_size = 256,
3836 /* BY25Q32CS: QPI w/ SRP (4, 4, 6, 8) */
3837 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
3838 FEATURE_OTP | FEATURE_QIO,
3839 .tested = TEST_UNTESTED,
Nico Huber6bc88e72024-10-20 16:32:08 +02003840 .probe_timing = TIMING_ZERO,
3841 .block_erasers =
3842 {
3843 {
3844 .eraseblocks = { {4 * 1024, 1024} },
3845 .block_erase = spi_block_erase_20,
3846 }, {
3847 .eraseblocks = { {32 * 1024, 128} },
3848 .block_erase = spi_block_erase_52,
3849 }, {
3850 .eraseblocks = { {64 * 1024, 64} },
3851 .block_erase = spi_block_erase_d8,
3852 }, {
3853 .eraseblocks = { {4096 * 1024, 1} },
3854 .block_erase = spi_block_erase_60,
3855 }, {
3856 .eraseblocks = { {4096 * 1024, 1} },
3857 .block_erase = spi_block_erase_c7,
3858 },
3859 },
3860 .reg_bits =
3861 {
3862 .qe = {STATUS2, 1, RW},
3863 .srp = {STATUS1, 7, RW},
3864 .srl = {STATUS2, 0, RW},
3865 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3866 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3867 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3868 .cmp = {STATUS2, 6, RW},
3869 },
3870 .wp_write_cfg = spi_wp_write_cfg,
3871 .wp_read_cfg = spi_wp_read_cfg,
3872 .wp_get_ranges = spi_wp_get_available_ranges,
3873 .decode_range = decode_range_spi25,
3874 .printlock = spi_prettyprint_status_register_bp4_srwd,
3875 .unlock = spi_disable_blockprotect_bp4_srwd,
3876 .write = spi_chip_write_256,
3877 .read = spi_chip_read,
3878 .voltage = {2700, 3600},
3879 .prepare_access = spi_prepare_io,
3880 .finish_access = spi_finish_io,
3881 },
3882
3883 {
3884 .vendor = "Boya/BoHong Microelectronics",
3885 .name = "B.25Q64AS/BY25Q64ES",
3886 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003887 .id.type = ID_SPI_RDID,
3888 .id.manufacture = BOYA_BOHONG_ID,
3889 .id.model = BOYA_BOHONG_B_25Q64AS,
Nico Huber6bc88e72024-10-20 16:32:08 +02003890 .total_size = 8192,
3891 .page_size = 256,
3892 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
3893 FEATURE_OTP | FEATURE_QIO,
3894 .tested = TEST_UNTESTED,
Nico Huber6bc88e72024-10-20 16:32:08 +02003895 .probe_timing = TIMING_ZERO,
3896 .block_erasers =
3897 {
3898 {
3899 .eraseblocks = { {4 * 1024, 2048} },
3900 .block_erase = spi_block_erase_20,
3901 }, {
3902 .eraseblocks = { {32 * 1024, 256} },
3903 .block_erase = spi_block_erase_52,
3904 }, {
3905 .eraseblocks = { {64 * 1024, 128} },
3906 .block_erase = spi_block_erase_d8,
3907 }, {
3908 .eraseblocks = { {8192 * 1024, 1} },
3909 .block_erase = spi_block_erase_60,
3910 }, {
3911 .eraseblocks = { {8192 * 1024, 1} },
3912 .block_erase = spi_block_erase_c7,
3913 },
3914 },
3915 .reg_bits =
3916 {
3917 .qe = {STATUS2, 1, RW},
3918 .srp = {STATUS1, 7, RW},
3919 .srl = {STATUS2, 0, RW},
3920 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3921 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3922 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3923 .cmp = {STATUS2, 6, RW},
3924 },
3925 .wp_write_cfg = spi_wp_write_cfg,
3926 .wp_read_cfg = spi_wp_read_cfg,
3927 .wp_get_ranges = spi_wp_get_available_ranges,
3928 .decode_range = decode_range_spi25,
3929 .printlock = spi_prettyprint_status_register_bp4_srwd,
3930 .unlock = spi_disable_blockprotect_bp4_srwd,
3931 .write = spi_chip_write_256,
3932 .read = spi_chip_read,
3933 .voltage = {2700, 3600},
3934 .prepare_access = spi_prepare_io,
3935 .finish_access = spi_finish_io,
3936 },
3937
3938 {
3939 .vendor = "Boya/BoHong Microelectronics",
3940 .name = "B.25Q128AS/BY25Q128ES",
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003941 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003942 .id.type = ID_SPI_RDID,
3943 .id.manufacture = BOYA_BOHONG_ID,
3944 .id.model = BOYA_BOHONG_B_25Q128AS,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003945 .total_size = 16384,
3946 .page_size = 256,
Nico Huber6bc88e72024-10-20 16:32:08 +02003947 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber226bb872024-04-09 23:30:34 +02003948 FEATURE_OTP | FEATURE_QIO,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003949 .tested = TEST_OK_PREW,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003950 .probe_timing = TIMING_ZERO,
3951 .block_erasers =
3952 {
3953 {
3954 .eraseblocks = { {4 * 1024, 4096} },
3955 .block_erase = spi_block_erase_20,
3956 }, {
3957 .eraseblocks = { {32 * 1024, 512} },
3958 .block_erase = spi_block_erase_52,
3959 }, {
3960 .eraseblocks = { {64 * 1024, 256} },
3961 .block_erase = spi_block_erase_d8,
3962 }, {
3963 .eraseblocks = { {16 * 1024 * 1024, 1} },
3964 .block_erase = spi_block_erase_60,
3965 }, {
3966 .eraseblocks = { {16 * 1024 * 1024, 1} },
3967 .block_erase = spi_block_erase_c7,
3968 }
3969 },
Nico Huber226bb872024-04-09 23:30:34 +02003970 .reg_bits =
3971 {
3972 .qe = {STATUS2, 1, RW},
Nico Huber6bc88e72024-10-20 16:32:08 +02003973 .srp = {STATUS1, 7, RW},
3974 .srl = {STATUS2, 0, RW},
3975 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3976 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3977 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3978 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02003979 },
Nico Huber6bc88e72024-10-20 16:32:08 +02003980 .wp_write_cfg = spi_wp_write_cfg,
3981 .wp_read_cfg = spi_wp_read_cfg,
3982 .wp_get_ranges = spi_wp_get_available_ranges,
3983 .decode_range = decode_range_spi25,
3984 .printlock = spi_prettyprint_status_register_bp4_srwd,
3985 .unlock = spi_disable_blockprotect_bp4_srwd,
3986 .write = spi_chip_write_256,
3987 .read = spi_chip_read,
3988 .voltage = {2700, 3600},
3989 .prepare_access = spi_prepare_io,
3990 .finish_access = spi_finish_io,
3991 },
3992
3993 {
3994 .vendor = "Boya Microelectronics",
3995 .name = "BY25Q128FS",
3996 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02003997 .id.type = ID_SPI_RDID,
3998 .id.manufacture = BOYA_BOHONG_ID,
3999 .id.model = BOYA_BOHONG_B_25Q128FS,
Nico Huber6bc88e72024-10-20 16:32:08 +02004000 .total_size = 16384,
4001 .page_size = 256,
4002 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
4003 FEATURE_OTP | FEATURE_QIO,
4004 .tested = TEST_UNTESTED,
Nico Huber6bc88e72024-10-20 16:32:08 +02004005 .probe_timing = TIMING_ZERO,
4006 .block_erasers =
4007 {
4008 {
4009 .eraseblocks = { {4 * 1024, 4096} },
4010 .block_erase = spi_block_erase_20,
4011 }, {
4012 .eraseblocks = { {32 * 1024, 512} },
4013 .block_erase = spi_block_erase_52,
4014 }, {
4015 .eraseblocks = { {64 * 1024, 256} },
4016 .block_erase = spi_block_erase_d8,
4017 }, {
4018 .eraseblocks = { {16 * 1024 * 1024, 1} },
4019 .block_erase = spi_block_erase_60,
4020 }, {
4021 .eraseblocks = { {16 * 1024 * 1024, 1} },
4022 .block_erase = spi_block_erase_c7,
4023 }
4024 },
4025 .reg_bits =
4026 {
4027 .qe = {STATUS2, 1, RW},
4028 .srp = {STATUS1, 7, RW},
4029 .srl = {STATUS2, 0, RW},
4030 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
4031 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
4032 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
4033 .cmp = {STATUS2, 6, RW},
4034 },
4035 .wp_write_cfg = spi_wp_write_cfg,
4036 .wp_read_cfg = spi_wp_read_cfg,
4037 .wp_get_ranges = spi_wp_get_available_ranges,
4038 .decode_range = decode_range_spi25,
4039 .printlock = spi_prettyprint_status_register_bp4_srwd,
4040 .unlock = spi_disable_blockprotect_bp4_srwd,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05004041 .write = spi_chip_write_256,
4042 .read = spi_chip_read,
4043 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02004044 .prepare_access = spi_prepare_io,
4045 .finish_access = spi_finish_io,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05004046 },
4047
4048 {
Joshua Roysf1324e02010-09-16 00:51:51 +00004049 .vendor = "Bright",
4050 .name = "BM29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004051 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02004052 .id.type = ID_JEDEC,
4053 .id.manufacture = BRIGHT_ID,
4054 .id.model = BRIGHT_BM29F040,
Joshua Roysf1324e02010-09-16 00:51:51 +00004055 .total_size = 512,
4056 .page_size = 64 * 1024,
4057 .feature_bits = FEATURE_EITHER_RESET,
4058 .tested = TEST_OK_PR,
Joshua Roysf1324e02010-09-16 00:51:51 +00004059 .probe_timing = TIMING_ZERO,
4060 .block_erasers =
4061 {
4062 {
4063 .eraseblocks = { {64 * 1024, 8} },
4064 .block_erase = erase_sector_jedec,
4065 }, {
4066 .eraseblocks = { {512 * 1024, 1} },
4067 .block_erase = erase_chip_block_jedec,
4068 },
4069 },
4070 .write = write_jedec_1,
4071 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00004072 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004073 .prepare_access = prepare_memory_access,
4074 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00004075 },
4076
4077 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004078 .vendor = "Catalyst",
4079 .name = "CAT28F512",
4080 .bustype = BUS_PARALLEL,
Nico Hubera3ffc8e2026-06-30 22:08:10 +02004081 .id.type = ID_82802AB,
Nico Huber11136c22023-05-01 12:00:09 +02004082 .id.manufacture = CATALYST_ID,
4083 .id.model = CATALYST_CAT28F512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004084 .total_size = 64,
Nico Hubera3ffc8e2026-06-30 22:08:10 +02004085 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004086 .block_erasers =
4087 {
4088 {
4089 .eraseblocks = { {64 * 1024, 1} },
Nico Hubera3ffc8e2026-06-30 22:08:10 +02004090 .block_erase = erase_m28f,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004091 },
4092 },
Nico Hubera3ffc8e2026-06-30 22:08:10 +02004093 .write = write_m28f,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004094 .read = read_memmapped,
4095 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004096 .prepare_access = prepare_memory_access,
4097 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004098 },
4099
4100 {
Nico Huber1e9e91a2026-06-30 21:39:01 +02004101 .vendor = "Catalyst",
4102 .name = "CAT28F010",
4103 .bustype = BUS_PARALLEL,
4104 .id.type = ID_82802AB,
4105 .id.manufacture = CATALYST_ID,
4106 .id.model = CATALYST_CAT28F010,
4107 .total_size = 128,
4108 .tested = TEST_OK_PROBE,
4109 .block_erasers =
4110 {
4111 {
4112 .eraseblocks = { {128 * 1024, 1} },
4113 .block_erase = erase_m28f,
4114 }
4115 },
4116 .write = write_m28f,
4117 .read = read_memmapped,
4118 .voltage = {4500, 5500}, /* 12V Vpp */
4119 .prepare_access = prepare_memory_access,
4120 .finish_access = finish_memory_access,
4121 },
4122
4123 {
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004124 .vendor = "ENE",
4125 .name = "KB9012 (EDI)",
4126 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004127 .id.type = ID_EDI,
Nico Huberf3113ac2026-02-21 12:50:19 +01004128 .id.hwversion = ENE_KB9012_HWVERSION,
4129 .id.model = ENE_KB9012_EDIID,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004130 .total_size = 128,
4131 .page_size = 128,
4132 .feature_bits = FEATURE_ERASED_ZERO,
4133 .tested = TEST_OK_PREW,
Alan Greenc1863ca2019-06-27 15:08:03 +10004134 .spi_cmd_set = SPI_EDI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004135 .probe_timing = TIMING_ZERO,
4136 .block_erasers =
4137 {
4138 {
4139 .eraseblocks = { {128, 1024} },
4140 .block_erase = edi_chip_block_erase,
4141 },
4142 },
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004143 .write = edi_chip_write,
4144 .read = edi_chip_read,
4145 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10004146 .gran = write_gran_128bytes,
Nico Huber4af02fe2026-02-21 12:29:26 +01004147 .prepare_access = edi_prepare,
Nico Huber517d9372026-03-14 21:48:36 +01004148 .finish_access = edi_finish,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004149 },
4150
4151 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004152 .vendor = "ESI",
4153 .name = "ES25P16",
4154 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004155 .id.type = ID_SPI_RDID,
4156 .id.manufacture = EXCEL_ID_NOPREFIX,
4157 .id.model = EXCEL_ES25P16,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004158 .total_size = 2 * 1024,
4159 .page_size = 256,
4160 /* 256-byte parameter page separate from memory array:
4161 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4162 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00004163 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004164 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004165 .block_erasers =
4166 {
4167 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004168 .eraseblocks = { {64 * 1024, 32} },
4169 .block_erase = spi_block_erase_d8,
Sean Nelson54596372010-01-09 05:30:14 +00004170 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004171 .eraseblocks = { {2 * 1024 * 1024, 1} },
4172 .block_erase = spi_block_erase_c7,
Sean Nelson54596372010-01-09 05:30:14 +00004173 }
4174 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10004175 .printlock = spi_prettyprint_status_register_bp2_srwd,
4176 .unlock = spi_disable_blockprotect_bp2_srwd,
4177 .write = spi_chip_write_256,
4178 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4179 .voltage = {2700, 3600},
4180 },
4181
4182 {
4183 .vendor = "ESI",
4184 .name = "ES25P40",
4185 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004186 .id.type = ID_SPI_RDID,
4187 .id.manufacture = EXCEL_ID_NOPREFIX,
4188 .id.model = EXCEL_ES25P40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004189 .total_size = 512,
4190 .page_size = 256,
4191 /* 256-byte parameter page separate from memory array:
4192 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4193 .feature_bits = FEATURE_WRSR_WREN,
4194 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004195 .probe_timing = TIMING_ZERO,
4196 .block_erasers =
4197 {
4198 {
4199 .eraseblocks = { {64 * 1024, 8} },
4200 .block_erase = spi_block_erase_d8,
4201 }, {
4202 .eraseblocks = { {512 * 1024, 1} },
4203 .block_erase = spi_block_erase_c7,
4204 }
4205 },
4206 .printlock = spi_prettyprint_status_register_bp2_srwd,
4207 .unlock = spi_disable_blockprotect_bp2_srwd,
4208 .write = spi_chip_write_256,
4209 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4210 .voltage = {2700, 3600},
4211 },
4212
4213 {
4214 .vendor = "ESI",
4215 .name = "ES25P80",
4216 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004217 .id.type = ID_SPI_RDID,
4218 .id.manufacture = EXCEL_ID_NOPREFIX,
4219 .id.model = EXCEL_ES25P80,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004220 .total_size = 1024,
4221 .page_size = 256,
4222 /* 256-byte parameter page separate from memory array:
4223 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4224 .feature_bits = FEATURE_WRSR_WREN,
4225 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004226 .probe_timing = TIMING_ZERO,
4227 .block_erasers =
4228 {
4229 {
4230 .eraseblocks = { {64 * 1024, 16} },
4231 .block_erase = spi_block_erase_d8,
4232 }, {
4233 .eraseblocks = { {1024 * 1024, 1} },
4234 .block_erase = spi_block_erase_c7,
4235 }
4236 },
4237 .printlock = spi_prettyprint_status_register_bp2_srwd,
4238 .unlock = spi_disable_blockprotect_bp2_srwd,
4239 .write = spi_chip_write_256,
4240 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4241 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00004242 },
4243
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00004244 {
Stefan Tauner352e50b2013-02-22 15:58:45 +00004245 .vendor = "ESMT",
Michael Karcher80a59ea2010-06-19 22:06:35 +00004246 .name = "F25L008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004247 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004248 .id.type = ID_SPI_RDID,
4249 .id.manufacture = ESMT_ID,
4250 .id.model = ESMT_F25L008A,
Michael Karcher80a59ea2010-06-19 22:06:35 +00004251 .total_size = 1024,
4252 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004253 .feature_bits = FEATURE_WRSR_EITHER,
Stefan Taunereb582572012-09-21 12:52:50 +00004254 .tested = TEST_OK_PREW,
Michael Karcher80a59ea2010-06-19 22:06:35 +00004255 .probe_timing = TIMING_ZERO,
4256 .block_erasers =
4257 {
4258 {
4259 .eraseblocks = { {4 * 1024, 256} },
4260 .block_erase = spi_block_erase_20,
4261 }, {
4262 .eraseblocks = { {64 * 1024, 16} },
4263 .block_erase = spi_block_erase_d8,
4264 }, {
4265 .eraseblocks = { {1024 * 1024, 1} },
4266 .block_erase = spi_block_erase_60,
4267 }, {
4268 .eraseblocks = { {1024 * 1024, 1} },
4269 .block_erase = spi_block_erase_c7,
4270 }
4271 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004272 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004273 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger9a795d82010-07-14 16:19:05 +00004274 .write = spi_chip_write_1,
Michael Karcher4497e862010-07-10 19:34:15 +00004275 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004276 .voltage = {2700, 3600},
Michael Karcher80a59ea2010-06-19 22:06:35 +00004277 },
4278
4279 {
Stefan Tauner85f09f72014-05-27 21:27:14 +00004280 .vendor = "ESMT",
4281 .name = "F25L32PA",
4282 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004283 .id.type = ID_SPI_RDID,
4284 .id.manufacture = ESMT_ID,
4285 .id.model = ESMT_F25L32PA,
Stefan Tauner85f09f72014-05-27 21:27:14 +00004286 .total_size = 4096,
4287 .page_size = 256,
4288 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP,
4289 .tested = TEST_UNTESTED,
Stefan Tauner85f09f72014-05-27 21:27:14 +00004290 .probe_timing = TIMING_ZERO,
4291 .block_erasers =
4292 {
4293 {
4294 .eraseblocks = { {4 * 1024, 1024} },
4295 .block_erase = spi_block_erase_20,
4296 }, {
4297 .eraseblocks = { {64 * 1024, 64} },
4298 .block_erase = spi_block_erase_d8,
4299 }, {
4300 .eraseblocks = { {4 * 1024 * 1024, 1} },
4301 .block_erase = spi_block_erase_60,
4302 }, {
4303 .eraseblocks = { {4 * 1024 * 1024, 1} },
4304 .block_erase = spi_block_erase_c7,
4305 }
4306 },
4307 .printlock = spi_prettyprint_status_register_bp2_bpl,
4308 .unlock = spi_disable_blockprotect,
4309 .write = spi_chip_write_256,
4310 .read = spi_chip_read,
4311 .voltage = {2700, 3600},
4312 },
4313
4314 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004315 .vendor = "ESMT",
4316 .name = "F49B002UA",
4317 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02004318 .id.type = ID_JEDEC,
4319 .id.manufacture = ESMT_ID,
4320 .id.model = ESMT_F49B002UA,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004321 .total_size = 256,
4322 .page_size = 4096,
4323 .feature_bits = FEATURE_EITHER_RESET,
4324 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004325 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
4326 .block_erasers =
4327 {
4328 {
4329 .eraseblocks = {
4330 {128 * 1024, 1},
4331 {96 * 1024, 1},
4332 {8 * 1024, 2},
4333 {16 * 1024, 1},
4334 },
4335 .block_erase = erase_sector_jedec,
4336 }, {
4337 .eraseblocks = { {256 * 1024, 1} },
4338 .block_erase = erase_chip_block_jedec,
4339 }
4340 },
4341 .write = write_jedec_1,
4342 .read = read_memmapped,
4343 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004344 .prepare_access = prepare_memory_access,
4345 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004346 },
4347
4348 {
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004349 .vendor = "Eon",
4350 .name = "EN25B05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004351 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004352 .id.type = ID_SPI_RDID,
4353 .id.manufacture = EON_ID_NOPREFIX,
4354 .id.model = EON_EN25B05,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004355 .total_size = 64,
4356 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004357 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004358 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004359 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004360 .block_erasers =
4361 {
4362 {
4363 .eraseblocks = {
4364 {4 * 1024, 2},
4365 {8 * 1024, 1},
4366 {16 * 1024, 1},
4367 {32 * 1024, 1},
4368 },
4369 .block_erase = spi_block_erase_d8,
4370 }, {
4371 .eraseblocks = { {64 * 1024, 1} },
4372 .block_erase = spi_block_erase_c7,
4373 }
4374 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004375 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004376 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004377 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004378 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004379 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004380 },
4381
4382 {
4383 .vendor = "Eon",
4384 .name = "EN25B05T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004385 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004386 .id.type = ID_SPI_RDID,
4387 .id.manufacture = EON_ID_NOPREFIX,
4388 .id.model = EON_EN25B05,
Sean Nelson54596372010-01-09 05:30:14 +00004389 .total_size = 64,
4390 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004391 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004392 .tested = TEST_UNTESTED,
Sean Nelson54596372010-01-09 05:30:14 +00004393 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004394 .block_erasers =
4395 {
4396 {
4397 .eraseblocks = {
4398 {32 * 1024, 1},
4399 {16 * 1024, 1},
4400 {8 * 1024, 1},
4401 {4 * 1024, 2},
4402 },
4403 .block_erase = spi_block_erase_d8,
4404 }, {
4405 .eraseblocks = { {64 * 1024, 1} },
4406 .block_erase = spi_block_erase_c7,
4407 }
4408 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004409 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004410 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004411 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004412 .read = spi_chip_read, /* Fast read (0x0B) supported */
4413 .voltage = {2700, 3600},
4414 },
4415
4416 {
4417 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004418 .name = "EN25B10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004419 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004420 .id.type = ID_SPI_RDID,
4421 .id.manufacture = EON_ID_NOPREFIX,
4422 .id.model = EON_EN25B10,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004423 .total_size = 128,
4424 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004425 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004426 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004427 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004428 .block_erasers =
4429 {
4430 {
4431 .eraseblocks = {
4432 {4 * 1024, 2},
4433 {8 * 1024, 1},
4434 {16 * 1024, 1},
4435 {32 * 1024, 3},
4436 },
4437 .block_erase = spi_block_erase_d8,
4438 }, {
4439 .eraseblocks = { {128 * 1024, 1} },
4440 .block_erase = spi_block_erase_c7,
4441 }
4442 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004443 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004444 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004445 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004446 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004447 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004448 },
4449
4450 {
4451 .vendor = "Eon",
4452 .name = "EN25B10T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004453 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004454 .id.type = ID_SPI_RDID,
4455 .id.manufacture = EON_ID_NOPREFIX,
4456 .id.model = EON_EN25B10,
Sean Nelson54596372010-01-09 05:30:14 +00004457 .total_size = 128,
4458 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004459 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00004460 .tested = TEST_OK_PREW,
Sean Nelson54596372010-01-09 05:30:14 +00004461 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004462 .block_erasers =
4463 {
4464 {
4465 .eraseblocks = {
4466 {32 * 1024, 3},
4467 {16 * 1024, 1},
4468 {8 * 1024, 1},
4469 {4 * 1024, 2},
4470 },
4471 .block_erase = spi_block_erase_d8,
4472 }, {
4473 .eraseblocks = { {128 * 1024, 1} },
4474 .block_erase = spi_block_erase_c7,
4475 }
4476 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004477 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004478 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004479 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004480 .read = spi_chip_read, /* Fast read (0x0B) supported */
4481 .voltage = {2700, 3600},
4482 },
4483
4484 {
4485 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004486 .name = "EN25B16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004487 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004488 .id.type = ID_SPI_RDID,
4489 .id.manufacture = EON_ID_NOPREFIX,
4490 .id.model = EON_EN25B16,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004491 .total_size = 2048,
4492 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004493 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004494 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004495 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004496 .block_erasers =
4497 {
4498 {
4499 .eraseblocks = {
4500 {4 * 1024, 2},
4501 {8 * 1024, 1},
4502 {16 * 1024, 1},
4503 {32 * 1024, 1},
4504 {64 * 1024, 31},
4505 },
4506 .block_erase = spi_block_erase_d8,
4507 }, {
4508 .eraseblocks = { {2 * 1024 * 1024, 1} },
4509 .block_erase = spi_block_erase_c7,
4510 }
4511 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004512 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004513 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004514 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004515 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004516 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004517 },
4518
4519 {
4520 .vendor = "Eon",
4521 .name = "EN25B16T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004522 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004523 .id.type = ID_SPI_RDID,
4524 .id.manufacture = EON_ID_NOPREFIX,
4525 .id.model = EON_EN25B16,
Sean Nelson54596372010-01-09 05:30:14 +00004526 .total_size = 2048,
4527 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004528 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004529 .tested = TEST_UNTESTED,
Sean Nelson54596372010-01-09 05:30:14 +00004530 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004531 .block_erasers =
4532 {
4533 {
4534 .eraseblocks = {
4535 {64 * 1024, 31},
4536 {32 * 1024, 1},
4537 {16 * 1024, 1},
4538 {8 * 1024, 1},
4539 {4 * 1024, 2},
4540 },
4541 .block_erase = spi_block_erase_d8,
4542 }, {
4543 .eraseblocks = { {2 * 1024 * 1024, 1} },
4544 .block_erase = spi_block_erase_c7,
4545 }
4546 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004547 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004548 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004549 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004550 .read = spi_chip_read, /* Fast read (0x0B) supported */
4551 .voltage = {2700, 3600},
4552 },
4553
4554 {
4555 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004556 .name = "EN25B20",
Stefan Taunerb175af52015-01-24 15:06:27 +00004557 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004558 .id.type = ID_SPI_RDID,
4559 .id.manufacture = EON_ID_NOPREFIX,
4560 .id.model = EON_EN25B20,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004561 .total_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004562 .page_size = 256,
4563 .feature_bits = FEATURE_WRSR_WREN,
4564 .tested = TEST_UNTESTED,
Stefan Taunerb175af52015-01-24 15:06:27 +00004565 .probe_timing = TIMING_ZERO,
4566 .block_erasers =
4567 {
4568 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004569 .eraseblocks = {
4570 {4 * 1024, 2},
4571 {8 * 1024, 1},
4572 {16 * 1024, 1},
4573 {32 * 1024, 1},
4574 {64 * 1024, 3}
4575 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004576 .block_erase = spi_block_erase_d8,
4577 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004578 .eraseblocks = { {256 * 1024, 1} },
4579 .block_erase = spi_block_erase_c7,
4580 }
4581 },
4582 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4583 .unlock = spi_disable_blockprotect,
4584 .write = spi_chip_write_256,
4585 .read = spi_chip_read, /* Fast read (0x0B) supported */
4586 .voltage = {2700, 3600},
4587 },
4588
4589 {
4590 .vendor = "Eon",
4591 .name = "EN25B20T",
4592 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004593 .id.type = ID_SPI_RDID,
4594 .id.manufacture = EON_ID_NOPREFIX,
4595 .id.model = EON_EN25B20,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004596 .total_size = 256,
4597 .page_size = 256,
4598 .feature_bits = FEATURE_WRSR_WREN,
4599 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004600 .probe_timing = TIMING_ZERO,
4601 .block_erasers =
4602 {
4603 {
4604 .eraseblocks = {
4605 {64 * 1024, 3},
4606 {32 * 1024, 1},
4607 {16 * 1024, 1},
4608 {8 * 1024, 1},
4609 {4 * 1024, 2},
4610 },
4611 .block_erase = spi_block_erase_d8,
4612 }, {
4613 .eraseblocks = { {256 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004614 .block_erase = spi_block_erase_c7,
4615 }
4616 },
4617 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4618 .unlock = spi_disable_blockprotect,
4619 .write = spi_chip_write_256,
4620 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004621 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004622 },
4623
4624 {
4625 .vendor = "Eon",
4626 .name = "EN25B32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004627 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004628 .id.type = ID_SPI_RDID,
4629 .id.manufacture = EON_ID_NOPREFIX,
4630 .id.model = EON_EN25B32,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004631 .total_size = 4096,
4632 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004633 /* OTP: 512B total; enter 0x3A */
4634 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004635 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004636 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004637 .block_erasers =
4638 {
4639 {
4640 .eraseblocks = {
4641 {4 * 1024, 2},
4642 {8 * 1024, 1},
4643 {16 * 1024, 1},
4644 {32 * 1024, 1},
4645 {64 * 1024, 63},
4646 },
4647 .block_erase = spi_block_erase_d8,
4648 }, {
4649 .eraseblocks = { {4 * 1024 * 1024, 1} },
4650 .block_erase = spi_block_erase_c7,
4651 }
4652 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004653 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004654 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004655 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004656 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004657 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004658 },
4659
4660 {
4661 .vendor = "Eon",
4662 .name = "EN25B32T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004663 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004664 .id.type = ID_SPI_RDID,
4665 .id.manufacture = EON_ID_NOPREFIX,
4666 .id.model = EON_EN25B32,
Sean Nelson54596372010-01-09 05:30:14 +00004667 .total_size = 4096,
4668 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004669 /* OTP: 512B total; enter 0x3A */
4670 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004671 .tested = TEST_UNTESTED,
Sean Nelson54596372010-01-09 05:30:14 +00004672 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004673 .block_erasers =
4674 {
4675 {
4676 .eraseblocks = {
4677 {64 * 1024, 63},
4678 {32 * 1024, 1},
4679 {16 * 1024, 1},
4680 {8 * 1024, 1},
4681 {4 * 1024, 2},
4682 },
4683 .block_erase = spi_block_erase_d8,
4684 }, {
4685 .eraseblocks = { {4 * 1024 * 1024, 1} },
4686 .block_erase = spi_block_erase_c7,
4687 }
4688 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004689 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004690 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004691 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004692 .read = spi_chip_read, /* Fast read (0x0B) supported */
4693 .voltage = {2700, 3600},
4694 },
4695
4696 {
4697 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004698 .name = "EN25B40",
Stefan Taunerb175af52015-01-24 15:06:27 +00004699 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004700 .id.type = ID_SPI_RDID,
4701 .id.manufacture = EON_ID_NOPREFIX,
4702 .id.model = EON_EN25B40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004703 .total_size = 512,
Stefan Taunerb175af52015-01-24 15:06:27 +00004704 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004705 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004706 .tested = TEST_UNTESTED,
Stefan Taunerb175af52015-01-24 15:06:27 +00004707 .probe_timing = TIMING_ZERO,
4708 .block_erasers =
4709 {
4710 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004711 .eraseblocks = {
4712 {4 * 1024, 2},
4713 {8 * 1024, 1},
4714 {16 * 1024, 1},
4715 {32 * 1024, 1},
4716 {64 * 1024, 7}
4717 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004718 .block_erase = spi_block_erase_d8,
4719 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004720 .eraseblocks = { {512 * 1024, 1} },
4721 .block_erase = spi_block_erase_c7,
4722 }
4723 },
4724 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4725 .unlock = spi_disable_blockprotect,
4726 .write = spi_chip_write_256,
4727 .read = spi_chip_read, /* Fast read (0x0B) supported */
4728 .voltage = {2700, 3600},
4729 },
4730
4731 {
4732 .vendor = "Eon",
4733 .name = "EN25B40T",
4734 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004735 .id.type = ID_SPI_RDID,
4736 .id.manufacture = EON_ID_NOPREFIX,
4737 .id.model = EON_EN25B40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004738 .total_size = 512,
4739 .page_size = 256,
4740 .feature_bits = FEATURE_WRSR_WREN,
4741 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004742 .probe_timing = TIMING_ZERO,
4743 .block_erasers =
4744 {
4745 {
4746 .eraseblocks = {
4747 {64 * 1024, 7},
4748 {32 * 1024, 1},
4749 {16 * 1024, 1},
4750 {8 * 1024, 1},
4751 {4 * 1024, 2},
4752 },
4753 .block_erase = spi_block_erase_d8,
4754 }, {
4755 .eraseblocks = { {512 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004756 .block_erase = spi_block_erase_c7,
4757 }
4758 },
4759 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4760 .unlock = spi_disable_blockprotect,
4761 .write = spi_chip_write_256,
4762 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004763 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004764 },
4765
4766 {
4767 .vendor = "Eon",
4768 .name = "EN25B64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004769 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004770 .id.type = ID_SPI_RDID,
4771 .id.manufacture = EON_ID_NOPREFIX,
4772 .id.model = EON_EN25B64,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004773 .total_size = 8192,
4774 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004775 /* OTP: 512B total; enter 0x3A */
4776 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004777 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004778 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004779 .block_erasers =
4780 {
4781 {
4782 .eraseblocks = {
4783 {4 * 1024, 2},
4784 {8 * 1024, 1},
4785 {16 * 1024, 1},
4786 {32 * 1024, 1},
4787 {64 * 1024, 127},
4788 },
4789 .block_erase = spi_block_erase_d8,
4790 }, {
4791 .eraseblocks = { {8 * 1024 * 1024, 1} },
4792 .block_erase = spi_block_erase_c7,
4793 }
4794 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004795 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004796 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004797 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004798 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004799 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004800 },
4801
4802 {
4803 .vendor = "Eon",
4804 .name = "EN25B64T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004805 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004806 .id.type = ID_SPI_RDID,
4807 .id.manufacture = EON_ID_NOPREFIX,
4808 .id.model = EON_EN25B64,
Sean Nelson54596372010-01-09 05:30:14 +00004809 .total_size = 8192,
4810 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004811 /* OTP: 512B total; enter 0x3A */
4812 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004813 .tested = TEST_UNTESTED,
Sean Nelson54596372010-01-09 05:30:14 +00004814 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004815 .block_erasers =
4816 {
4817 {
4818 .eraseblocks = {
4819 {64 * 1024, 127},
4820 {32 * 1024, 1},
4821 {16 * 1024, 1},
4822 {8 * 1024, 1},
4823 {4 * 1024, 2},
4824 },
4825 .block_erase = spi_block_erase_d8,
4826 }, {
4827 .eraseblocks = { {8 * 1024 * 1024, 1} },
4828 .block_erase = spi_block_erase_c7,
4829 }
4830 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004831 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004832 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004833 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004834 .read = spi_chip_read, /* Fast read (0x0B) supported */
4835 .voltage = {2700, 3600},
4836 },
4837
4838 {
4839 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004840 .name = "EN25B80",
Stefan Taunerb175af52015-01-24 15:06:27 +00004841 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004842 .id.type = ID_SPI_RDID,
4843 .id.manufacture = EON_ID_NOPREFIX,
4844 .id.model = EON_EN25B80,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004845 .total_size = 1024,
Stefan Taunerb175af52015-01-24 15:06:27 +00004846 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004847 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004848 .tested = TEST_UNTESTED,
Stefan Taunerb175af52015-01-24 15:06:27 +00004849 .probe_timing = TIMING_ZERO,
4850 .block_erasers =
4851 {
4852 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004853 .eraseblocks = {
4854 {4 * 1024, 2},
4855 {8 * 1024, 1},
4856 {16 * 1024, 1},
4857 {32 * 1024, 1},
4858 {64 * 1024, 15}
4859 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004860 .block_erase = spi_block_erase_d8,
4861 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004862 .eraseblocks = { {1024 * 1024, 1} },
4863 .block_erase = spi_block_erase_c7,
4864 }
4865 },
4866 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4867 .unlock = spi_disable_blockprotect,
4868 .write = spi_chip_write_256,
4869 .read = spi_chip_read, /* Fast read (0x0B) supported */
4870 .voltage = {2700, 3600},
4871 },
4872
4873 {
4874 .vendor = "Eon",
4875 .name = "EN25B80T",
4876 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004877 .id.type = ID_SPI_RDID,
4878 .id.manufacture = EON_ID_NOPREFIX,
4879 .id.model = EON_EN25B80,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004880 .total_size = 1024,
4881 .page_size = 256,
4882 .feature_bits = FEATURE_WRSR_WREN,
4883 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004884 .probe_timing = TIMING_ZERO,
4885 .block_erasers =
4886 {
4887 {
4888 .eraseblocks = {
4889 {64 * 1024, 15},
4890 {32 * 1024, 1},
4891 {16 * 1024, 1},
4892 {8 * 1024, 1},
4893 {4 * 1024, 2},
4894 },
4895 .block_erase = spi_block_erase_d8,
4896 }, {
4897 .eraseblocks = { {1024 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004898 .block_erase = spi_block_erase_c7,
4899 }
4900 },
4901 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4902 .unlock = spi_disable_blockprotect,
4903 .write = spi_chip_write_256,
4904 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004905 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004906 },
4907
4908 {
4909 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004910 .name = "EN25F05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004911 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004912 .id.type = ID_SPI_RDID,
4913 .id.manufacture = EON_ID_NOPREFIX,
4914 .id.model = EON_EN25F05,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004915 .total_size = 64,
4916 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004917 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00004918 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004919 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004920 .block_erasers =
4921 {
4922 {
4923 .eraseblocks = { {4 * 1024, 16} },
4924 .block_erase = spi_block_erase_20,
4925 }, {
4926 .eraseblocks = { {32 * 1024, 2} },
4927 .block_erase = spi_block_erase_d8,
4928 }, {
4929 .eraseblocks = { {32 * 1024, 2} },
4930 .block_erase = spi_block_erase_52,
4931 }, {
4932 .eraseblocks = { {64 * 1024, 1} },
4933 .block_erase = spi_block_erase_60,
4934 }, {
4935 .eraseblocks = { {64 * 1024, 1} },
4936 .block_erase = spi_block_erase_c7,
4937 }
4938 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004939 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004940 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004941 .write = spi_chip_write_256,
4942 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004943 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004944 },
4945
4946 {
4947 .vendor = "Eon",
4948 .name = "EN25F10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004949 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004950 .id.type = ID_SPI_RDID,
4951 .id.manufacture = EON_ID_NOPREFIX,
4952 .id.model = EON_EN25F10,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004953 .total_size = 128,
4954 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004955 .feature_bits = FEATURE_WRSR_WREN,
Simon Buhrowd173ed42021-09-29 09:28:07 +02004956 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004957 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004958 .block_erasers =
4959 {
4960 {
4961 .eraseblocks = { {4 * 1024, 32} },
4962 .block_erase = spi_block_erase_20,
4963 }, {
4964 .eraseblocks = { {32 * 1024, 4} },
4965 .block_erase = spi_block_erase_d8,
4966 }, {
4967 .eraseblocks = { {32 * 1024, 4} },
4968 .block_erase = spi_block_erase_52,
4969 }, {
4970 .eraseblocks = { {128 * 1024, 1} },
4971 .block_erase = spi_block_erase_60,
4972 }, {
4973 .eraseblocks = { {128 * 1024, 1} },
4974 .block_erase = spi_block_erase_c7,
4975 }
4976 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004977 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004978 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004979 .write = spi_chip_write_256,
4980 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004981 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004982 },
4983
4984 {
4985 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004986 .name = "EN25F16",
4987 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02004988 .id.type = ID_SPI_RDID,
4989 .id.manufacture = EON_ID_NOPREFIX,
4990 .id.model = EON_EN25F16,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004991 .total_size = 2048,
4992 .page_size = 256,
4993 .feature_bits = FEATURE_WRSR_WREN,
4994 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004995 .probe_timing = TIMING_ZERO,
4996 .block_erasers =
4997 {
4998 {
4999 .eraseblocks = { {4 * 1024, 512} },
5000 .block_erase = spi_block_erase_20,
5001 }, {
5002 .eraseblocks = { {64 * 1024, 32} },
5003 .block_erase = spi_block_erase_d8,
5004 }, {
5005 .eraseblocks = { {2 * 1024 * 1024, 1} },
5006 .block_erase = spi_block_erase_60,
5007 }, {
5008 .eraseblocks = { {2 * 1024 * 1024, 1} },
5009 .block_erase = spi_block_erase_c7,
5010 }
5011 },
5012 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5013 .unlock = spi_disable_blockprotect,
5014 .write = spi_chip_write_256,
5015 .read = spi_chip_read,
5016 .voltage = {2700, 3600},
5017 },
5018
5019 {
5020 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005021 .name = "EN25F20",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005022 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005023 .id.type = ID_SPI_RDID,
5024 .id.manufacture = EON_ID_NOPREFIX,
5025 .id.model = EON_EN25F20,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005026 .total_size = 256,
5027 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00005028 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005029 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005030 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00005031 .block_erasers =
5032 {
5033 {
5034 .eraseblocks = { {4 * 1024, 64} },
5035 .block_erase = spi_block_erase_20,
5036 }, {
5037 .eraseblocks = { {64 * 1024, 4} },
5038 .block_erase = spi_block_erase_d8,
5039 }, {
5040 .eraseblocks = { {64 * 1024, 4} },
5041 .block_erase = spi_block_erase_52,
5042 }, {
5043 .eraseblocks = { {256 * 1024, 1} },
5044 .block_erase = spi_block_erase_60,
5045 }, {
5046 .eraseblocks = { {256 * 1024, 1} },
5047 .block_erase = spi_block_erase_c7,
5048 }
5049 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005050 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00005051 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005052 .write = spi_chip_write_256,
5053 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00005054 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005055 },
5056
5057 {
5058 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005059 .name = "EN25F32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005060 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005061 .id.type = ID_SPI_RDID,
5062 .id.manufacture = EON_ID_NOPREFIX,
5063 .id.model = EON_EN25F32,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005064 .total_size = 4096,
5065 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00005066 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00005067 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005068 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00005069 .block_erasers =
5070 {
5071 {
5072 .eraseblocks = { {4 * 1024, 1024} },
5073 .block_erase = spi_block_erase_20,
5074 }, {
5075 .eraseblocks = { {64 * 1024, 64} },
5076 .block_erase = spi_block_erase_d8,
5077 }, {
5078 .eraseblocks = { {4 * 1024 * 1024, 1} },
5079 .block_erase = spi_block_erase_60,
5080 }, {
5081 .eraseblocks = { {4 * 1024 * 1024, 1} },
5082 .block_erase = spi_block_erase_c7,
5083 }
5084 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005085 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00005086 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005087 .write = spi_chip_write_256,
5088 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00005089 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005090 },
5091
5092 {
Russ Dill3cd5a122010-03-05 08:44:11 +00005093 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005094 .name = "EN25F40",
5095 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005096 .id.type = ID_SPI_RDID,
5097 .id.manufacture = EON_ID_NOPREFIX,
5098 .id.model = EON_EN25F40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005099 .total_size = 512,
5100 .page_size = 256,
5101 .feature_bits = FEATURE_WRSR_WREN,
5102 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005103 .probe_timing = TIMING_ZERO,
5104 .block_erasers =
5105 {
5106 {
5107 .eraseblocks = { {4 * 1024, 128} },
5108 .block_erase = spi_block_erase_20,
5109 }, {
5110 .eraseblocks = { {64 * 1024, 8} },
5111 .block_erase = spi_block_erase_d8,
5112 }, {
5113 .eraseblocks = { {512 * 1024, 1} },
5114 .block_erase = spi_block_erase_60,
5115 }, {
5116 .eraseblocks = { {512 * 1024, 1} },
5117 .block_erase = spi_block_erase_c7,
5118 },
5119 },
5120 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5121 .unlock = spi_disable_blockprotect,
5122 .write = spi_chip_write_256,
5123 .read = spi_chip_read,
5124 .voltage = {2700, 3600},
5125 },
5126
5127 {
5128 .vendor = "Eon",
Stefan Taunerd932fd02012-09-06 17:37:16 +00005129 .name = "EN25F64",
5130 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005131 .id.type = ID_SPI_RDID,
5132 .id.manufacture = EON_ID_NOPREFIX,
5133 .id.model = EON_EN25F64,
Stefan Taunerd932fd02012-09-06 17:37:16 +00005134 .total_size = 8192,
5135 .page_size = 256,
5136 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunere34e3e82013-01-01 00:06:51 +00005137 .tested = TEST_OK_PREW,
Stefan Taunerd932fd02012-09-06 17:37:16 +00005138 .probe_timing = TIMING_ZERO,
5139 .block_erasers =
5140 {
5141 {
5142 .eraseblocks = { {4 * 1024, 2048} },
5143 .block_erase = spi_block_erase_20,
5144 }, {
5145 .eraseblocks = { {64 * 1024, 128} },
5146 .block_erase = spi_block_erase_d8,
5147 }, {
5148 .eraseblocks = { {8 * 1024 * 1024, 1} },
5149 .block_erase = spi_block_erase_60,
5150 }, {
5151 .eraseblocks = { {8 * 1024 * 1024, 1} },
5152 .block_erase = spi_block_erase_c7,
5153 }
5154 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005155 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Stefan Taunerd932fd02012-09-06 17:37:16 +00005156 .unlock = spi_disable_blockprotect,
5157 .write = spi_chip_write_256,
5158 .read = spi_chip_read,
5159 .voltage = {2700, 3600},
5160 },
5161
5162 {
5163 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005164 .name = "EN25F80",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005165 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005166 .id.type = ID_SPI_RDID,
5167 .id.manufacture = EON_ID_NOPREFIX,
5168 .id.model = EON_EN25F80,
David Hendricks6d715302011-07-24 22:21:57 +00005169 .total_size = 1024,
5170 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005171 .feature_bits = FEATURE_WRSR_WREN,
5172 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005173 .probe_timing = TIMING_ZERO,
5174 .block_erasers =
5175 {
5176 {
5177 .eraseblocks = { {4 * 1024, 256} },
5178 .block_erase = spi_block_erase_20,
5179 }, {
5180 .eraseblocks = { {64 * 1024, 16} },
5181 .block_erase = spi_block_erase_d8,
5182 }, {
5183 .eraseblocks = { {1024 * 1024, 1} },
5184 .block_erase = spi_block_erase_60,
5185 }, {
5186 .eraseblocks = { {1024 * 1024, 1} },
5187 .block_erase = spi_block_erase_c7,
5188 }
5189 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005190 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005191 .unlock = spi_disable_blockprotect,
5192 .write = spi_chip_write_256,
5193 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005194 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005195 },
5196
5197 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005198 .vendor = "Eon",
5199 .name = "EN25P05",
5200 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005201 .id.type = ID_SPI_RDID,
5202 .id.manufacture = EON_ID_NOPREFIX,
5203 .id.model = EON_EN25B05,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005204 .total_size = 64,
5205 .page_size = 256,
5206 .feature_bits = FEATURE_WRSR_WREN,
5207 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005208 .probe_timing = TIMING_ZERO,
5209 .block_erasers =
5210 {
5211 {
5212 .eraseblocks = {
5213 {32 * 1024, 2} },
5214 .block_erase = spi_block_erase_d8,
5215 }, {
5216 .eraseblocks = { {64 * 1024, 1} },
5217 .block_erase = spi_block_erase_c7,
5218 }
5219 },
5220 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5221 .unlock = spi_disable_blockprotect,
5222 .write = spi_chip_write_256,
5223 .read = spi_chip_read, /* Fast read (0x0B) supported */
5224 .voltage = {2700, 3600},
5225 },
5226
5227 {
5228 .vendor = "Eon",
5229 .name = "EN25P10",
5230 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005231 .id.type = ID_SPI_RDID,
5232 .id.manufacture = EON_ID_NOPREFIX,
5233 .id.model = EON_EN25B10,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005234 .total_size = 128,
5235 .page_size = 256,
5236 .feature_bits = FEATURE_WRSR_WREN,
5237 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005238 .probe_timing = TIMING_ZERO,
5239 .block_erasers =
5240 {
5241 {
5242 .eraseblocks = { {32 * 1024, 4} },
5243 .block_erase = spi_block_erase_d8,
5244 }, {
5245 .eraseblocks = { {128 * 1024, 1} },
5246 .block_erase = spi_block_erase_c7,
5247 }
5248 },
5249 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5250 .unlock = spi_disable_blockprotect,
5251 .write = spi_chip_write_256,
5252 .read = spi_chip_read, /* Fast read (0x0B) supported */
5253 .voltage = {2700, 3600},
5254 },
5255
5256 {
5257 .vendor = "Eon",
5258 .name = "EN25P16",
5259 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005260 .id.type = ID_SPI_RDID,
5261 .id.manufacture = EON_ID_NOPREFIX,
5262 .id.model = EON_EN25B16,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005263 .total_size = 2048,
5264 .page_size = 256,
5265 .feature_bits = FEATURE_WRSR_WREN,
5266 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005267 .probe_timing = TIMING_ZERO,
5268 .block_erasers =
5269 {
5270 {
5271 .eraseblocks = { {64 * 1024, 32} },
5272 .block_erase = spi_block_erase_d8,
5273 }, {
5274 .eraseblocks = { {2 * 1024 * 1024, 1} },
5275 .block_erase = spi_block_erase_c7,
5276 }
5277 },
5278 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5279 .unlock = spi_disable_blockprotect,
5280 .write = spi_chip_write_256,
5281 .read = spi_chip_read, /* Fast read (0x0B) supported */
5282 .voltage = {2700, 3600},
5283 },
5284
5285 {
5286 .vendor = "Eon",
5287 .name = "EN25P20",
5288 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005289 .id.type = ID_SPI_RDID,
5290 .id.manufacture = EON_ID_NOPREFIX,
5291 .id.model = EON_EN25B20,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005292 .total_size = 256,
5293 .page_size = 256,
5294 .feature_bits = FEATURE_WRSR_WREN,
5295 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005296 .probe_timing = TIMING_ZERO,
5297 .block_erasers =
5298 {
5299 {
5300 .eraseblocks = { {64 * 1024, 4} },
5301 .block_erase = spi_block_erase_d8,
5302 }, {
5303 .eraseblocks = { {256 * 1024, 1} },
5304 .block_erase = spi_block_erase_c7,
5305 }
5306 },
5307 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5308 .unlock = spi_disable_blockprotect,
5309 .write = spi_chip_write_256,
5310 .read = spi_chip_read, /* Fast read (0x0B) supported */
5311 .voltage = {2700, 3600},
5312 },
5313
5314 {
5315 .vendor = "Eon",
5316 .name = "EN25P32", /* Uniform version of EN25B32 */
5317 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005318 .id.type = ID_SPI_RDID,
5319 .id.manufacture = EON_ID_NOPREFIX,
5320 .id.model = EON_EN25B32,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005321 .total_size = 4096,
5322 .page_size = 256,
5323 /* OTP: 512B total; enter 0x3A */
5324 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5325 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005326 .probe_timing = TIMING_ZERO,
5327 .block_erasers =
5328 {
5329 {
5330 .eraseblocks = { {64 * 1024, 64} },
5331 .block_erase = spi_block_erase_d8,
5332 }, {
5333 .eraseblocks = { {4 * 1024 * 1024, 1} },
5334 .block_erase = spi_block_erase_c7,
5335 }
5336 },
5337 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5338 .unlock = spi_disable_blockprotect,
5339 .write = spi_chip_write_256,
5340 .read = spi_chip_read, /* Fast read (0x0B) supported */
5341 .voltage = {2700, 3600},
5342 },
5343
5344 {
5345 .vendor = "Eon",
5346 .name = "EN25P40",
5347 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005348 .id.type = ID_SPI_RDID,
5349 .id.manufacture = EON_ID_NOPREFIX,
5350 .id.model = EON_EN25B40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005351 .total_size = 512,
5352 .page_size = 256,
5353 .feature_bits = FEATURE_WRSR_WREN,
5354 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005355 .probe_timing = TIMING_ZERO,
5356 .block_erasers =
5357 {
5358 {
5359 .eraseblocks = { {64 * 1024, 8} },
5360 .block_erase = spi_block_erase_d8,
5361 }, {
5362 .eraseblocks = { {512 * 1024, 1} },
5363 .block_erase = spi_block_erase_c7,
5364 }
5365 },
5366 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5367 .unlock = spi_disable_blockprotect,
5368 .write = spi_chip_write_256,
5369 .read = spi_chip_read, /* Fast read (0x0B) supported */
5370 .voltage = {2700, 3600},
5371 },
5372
5373 {
5374 .vendor = "Eon",
5375 .name = "EN25P64",
5376 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005377 .id.type = ID_SPI_RDID,
5378 .id.manufacture = EON_ID_NOPREFIX,
5379 .id.model = EON_EN25B64,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005380 .total_size = 8192,
5381 .page_size = 256,
5382 /* OTP: 512B total; enter 0x3A */
5383 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5384 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005385 .probe_timing = TIMING_ZERO,
5386 .block_erasers =
5387 {
5388 {
5389 .eraseblocks = { {64 * 1024, 128} },
5390 .block_erase = spi_block_erase_d8,
5391 }, {
5392 .eraseblocks = { {8 * 1024 * 1024, 1} },
5393 .block_erase = spi_block_erase_c7,
5394 }
5395 },
5396 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5397 .unlock = spi_disable_blockprotect,
5398 .write = spi_chip_write_256,
5399 .read = spi_chip_read, /* Fast read (0x0B) supported */
5400 .voltage = {2700, 3600},
5401 },
5402
5403 {
5404 .vendor = "Eon",
5405 .name = "EN25P80",
5406 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005407 .id.type = ID_SPI_RDID,
5408 .id.manufacture = EON_ID_NOPREFIX,
5409 .id.model = EON_EN25B80,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005410 .total_size = 1024,
5411 .page_size = 256,
5412 .feature_bits = FEATURE_WRSR_WREN,
5413 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005414 .probe_timing = TIMING_ZERO,
5415 .block_erasers =
5416 {
5417 {
5418 .eraseblocks = { {64 * 1024, 16} },
5419 .block_erase = spi_block_erase_d8,
5420 }, {
5421 .eraseblocks = { {1024 * 1024, 1} },
5422 .block_erase = spi_block_erase_c7,
5423 }
5424 },
5425 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5426 .unlock = spi_disable_blockprotect,
5427 .write = spi_chip_write_256,
5428 .read = spi_chip_read, /* Fast read (0x0B) supported */
5429 .voltage = {2700, 3600},
5430 },
5431
5432 {
5433 .vendor = "Eon",
5434 .name = "EN25Q128",
5435 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005436 .id.type = ID_SPI_RDID,
5437 .id.manufacture = EON_ID_NOPREFIX,
5438 .id.model = EON_EN25Q128,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005439 .total_size = 16384,
5440 .page_size = 256,
5441 /* OTP: 512B total; enter 0x3A */
5442 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5443 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005444 .probe_timing = TIMING_ZERO,
5445 .block_erasers =
5446 {
5447 {
5448 .eraseblocks = { {4 * 1024, 4096} },
5449 .block_erase = spi_block_erase_20,
5450 }, {
5451 .eraseblocks = { {64 * 1024, 256} },
5452 .block_erase = spi_block_erase_d8,
5453 }, {
5454 .eraseblocks = { {16 * 1024 * 1024, 1} },
5455 .block_erase = spi_block_erase_60,
5456 }, {
5457 .eraseblocks = { {16 * 1024 * 1024, 1} },
5458 .block_erase = spi_block_erase_c7,
5459 }
5460 },
5461 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5462 .unlock = spi_disable_blockprotect,
5463 .write = spi_chip_write_256,
5464 .read = spi_chip_read,
5465 },
5466
5467 {
David Hendricks6d715302011-07-24 22:21:57 +00005468 /* Note: EN25D16 is an evil twin which shares the model ID
5469 but has different write protection capabilities */
5470 .vendor = "Eon",
5471 .name = "EN25Q16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005472 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005473 .id.type = ID_SPI_RDID,
5474 .id.manufacture = EON_ID_NOPREFIX,
5475 .id.model = EON_EN25Q16,
David Hendricks6d715302011-07-24 22:21:57 +00005476 .total_size = 2048,
5477 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005478 /* OTP: D16 512B/Q16 128B total; enter 0x3A */
5479 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks6d715302011-07-24 22:21:57 +00005480 .tested = TEST_UNTESTED,
David Hendricks6d715302011-07-24 22:21:57 +00005481 .probe_timing = TIMING_ZERO,
5482 .block_erasers =
5483 {
5484 {
5485 .eraseblocks = { {4 * 1024, 512} },
5486 .block_erase = spi_block_erase_20,
5487 }, {
5488 .eraseblocks = { {64 * 1024, 32} },
5489 .block_erase = spi_block_erase_d8,
5490 }, {
5491 /* not supported by Q16 version */
5492 .eraseblocks = { {64 * 1024, 32} },
5493 .block_erase = spi_block_erase_52,
5494 }, {
5495 .eraseblocks = { {2 * 1024 * 1024, 1} },
5496 .block_erase = spi_block_erase_60,
5497 }, {
5498 .eraseblocks = { {2 * 1024 * 1024, 1} },
5499 .block_erase = spi_block_erase_c7,
5500 }
5501 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005502 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005503 .unlock = spi_disable_blockprotect,
5504 .write = spi_chip_write_256,
5505 .read = spi_chip_read,
5506 .voltage = {2700, 3600},
5507 },
5508
5509 {
5510 .vendor = "Eon",
Nico Huberc5f61682026-07-19 16:32:04 +02005511 .name = "EN25Q32(/A/B)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005512 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005513 .id.type = ID_SPI_RDID,
5514 .id.manufacture = EON_ID_NOPREFIX,
5515 .id.model = EON_EN25Q32,
David Hendricks6d715302011-07-24 22:21:57 +00005516 .total_size = 4096,
5517 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005518 /* OTP: 512B total; enter 0x3A */
5519 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005520 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005521 .probe_timing = TIMING_ZERO,
5522 .block_erasers =
5523 {
5524 {
5525 .eraseblocks = { {4 * 1024, 1024} },
5526 .block_erase = spi_block_erase_20,
5527 }, {
5528 .eraseblocks = { {64 * 1024, 64} },
5529 .block_erase = spi_block_erase_d8,
5530 }, {
5531 .eraseblocks = { {4 * 1024 * 1024, 1} },
5532 .block_erase = spi_block_erase_60,
5533 }, {
5534 .eraseblocks = { {4 * 1024 * 1024, 1} },
5535 .block_erase = spi_block_erase_c7,
5536 }
5537 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005538 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005539 .unlock = spi_disable_blockprotect,
5540 .write = spi_chip_write_256,
5541 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005542 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005543 },
5544
5545 {
5546 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005547 .name = "EN25Q40",
5548 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005549 .id.type = ID_SPI_RDID,
5550 .id.manufacture = EON_ID_NOPREFIX,
5551 .id.model = EON_EN25Q40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005552 .total_size = 512,
5553 .page_size = 256,
5554 /* OTP: 256B total; enter 0x3A */
5555 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5556 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005557 .probe_timing = TIMING_ZERO,
5558 .block_erasers =
5559 {
5560 {
5561 .eraseblocks = { {4 * 1024, 128} },
5562 .block_erase = spi_block_erase_20,
5563 }, {
5564 .eraseblocks = { {64 * 1024, 8} },
5565 .block_erase = spi_block_erase_d8,
5566 }, {
5567 .eraseblocks = { {512 * 1024, 1} },
5568 .block_erase = spi_block_erase_60,
5569 }, {
5570 .eraseblocks = { {512 * 1024, 1} },
5571 .block_erase = spi_block_erase_c7,
5572 }
5573 },
5574 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5575 .unlock = spi_disable_blockprotect,
5576 .write = spi_chip_write_256,
5577 .read = spi_chip_read,
5578 .voltage = {2700, 3600},
5579 },
5580
5581 {
5582 .vendor = "Eon",
David Hendricks6d715302011-07-24 22:21:57 +00005583 .name = "EN25Q64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005584 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005585 .id.type = ID_SPI_RDID,
5586 .id.manufacture = EON_ID_NOPREFIX,
5587 .id.model = EON_EN25Q64,
David Hendricks6d715302011-07-24 22:21:57 +00005588 .total_size = 8192,
5589 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005590 /* OTP: 512B total; enter 0x3A */
5591 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005592 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005593 .probe_timing = TIMING_ZERO,
5594 .block_erasers =
5595 {
5596 {
5597 .eraseblocks = { {4 * 1024, 2048} },
5598 .block_erase = spi_block_erase_20,
5599 }, {
5600 .eraseblocks = { {64 * 1024, 128} },
5601 .block_erase = spi_block_erase_d8,
5602 }, {
5603 .eraseblocks = { {8 * 1024 * 1024, 1} },
5604 .block_erase = spi_block_erase_60,
5605 }, {
5606 .eraseblocks = { {8 * 1024 * 1024, 1} },
5607 .block_erase = spi_block_erase_c7,
5608 }
5609 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005610 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005611 .unlock = spi_disable_blockprotect,
5612 .write = spi_chip_write_256,
5613 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005614 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005615 },
5616
5617 {
5618 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005619 .name = "EN25Q80(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005620 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005621 .id.type = ID_SPI_RDID,
5622 .id.manufacture = EON_ID_NOPREFIX,
5623 .id.model = EON_EN25Q80,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005624 .total_size = 1024,
5625 .page_size = 256,
5626 /* OTP: 256B total; enter 0x3A */
5627 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5628 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005629 .probe_timing = TIMING_ZERO,
5630 .block_erasers =
5631 {
5632 {
5633 .eraseblocks = { {4 * 1024, 256} },
5634 .block_erase = spi_block_erase_20,
5635 }, {
5636 .eraseblocks = { {64 * 1024, 16} },
5637 .block_erase = spi_block_erase_d8,
5638 }, {
5639 .eraseblocks = { {1024 * 1024, 1} },
5640 .block_erase = spi_block_erase_60,
5641 }, {
5642 .eraseblocks = { {1024 * 1024, 1} },
5643 .block_erase = spi_block_erase_c7,
5644 }
5645 },
5646 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5647 .unlock = spi_disable_blockprotect,
5648 .write = spi_chip_write_256,
5649 .read = spi_chip_read,
5650 .voltage = {2700, 3600},
5651 },
5652
5653 {
5654 .vendor = "Eon",
5655 .name = "EN25QH128",
5656 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005657 .id.type = ID_SPI_RDID,
5658 .id.manufacture = EON_ID_NOPREFIX,
5659 .id.model = EON_EN25QH128,
David Hendricks6d715302011-07-24 22:21:57 +00005660 .total_size = 16384,
5661 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005662 /* supports SFDP */
Daniel Lenski65922a32012-02-15 23:40:23 +00005663 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005664 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5665 .dummy_cycles =
5666 {
5667 .qpi_fast_read = 6,
5668 .qpi_fast_read_qio = 6,
5669 },
Tim Chenbfe149a2020-07-06 14:59:21 +08005670 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005671 .probe_timing = TIMING_ZERO,
5672 .block_erasers =
5673 {
5674 {
5675 .eraseblocks = { {4 * 1024, 4096} },
5676 .block_erase = spi_block_erase_20,
5677 }, {
5678 .eraseblocks = { {64 * 1024, 256} },
5679 .block_erase = spi_block_erase_d8,
5680 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005681 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005682 .block_erase = spi_block_erase_60,
5683 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005684 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005685 .block_erase = spi_block_erase_c7,
5686 }
5687 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10005688 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5689 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005690 .write = spi_chip_write_256,
5691 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005692 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005693 .reg_bits =
5694 {
5695 .srp = {STATUS1, 7, RW},
5696 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5697 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5698 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005699 .wp_write_cfg = spi_wp_write_cfg,
5700 .wp_read_cfg = spi_wp_read_cfg,
5701 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005702 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005703 .prepare_access = spi_prepare_io,
5704 .finish_access = spi_finish_io,
David Hendricks6d715302011-07-24 22:21:57 +00005705 },
5706
5707 {
5708 .vendor = "Eon",
5709 .name = "EN25QH16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005710 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005711 .id.type = ID_SPI_RDID,
5712 .id.manufacture = EON_ID_NOPREFIX,
5713 .id.model = EON_EN25QH16,
David Hendricks6d715302011-07-24 22:21:57 +00005714 .total_size = 2048,
5715 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005716 /* supports SFDP */
5717 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005718 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5719 .dummy_cycles =
5720 {
5721 .qpi_fast_read = 6,
5722 .qpi_fast_read_qio = 6,
5723 },
Stefan Tauner5c316f92015-02-08 21:57:52 +00005724 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005725 .probe_timing = TIMING_ZERO,
5726 .block_erasers =
5727 {
5728 {
5729 .eraseblocks = { {4 * 1024, 512} },
5730 .block_erase = spi_block_erase_20,
5731 }, {
5732 .eraseblocks = { {64 * 1024, 32} },
5733 .block_erase = spi_block_erase_d8,
5734 }, {
5735 .eraseblocks = { {1024 * 2048, 1} },
5736 .block_erase = spi_block_erase_60,
5737 }, {
5738 .eraseblocks = { {1024 * 2048, 1} },
5739 .block_erase = spi_block_erase_c7,
5740 }
5741 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005742 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005743 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005744 .write = spi_chip_write_256,
5745 .read = spi_chip_read,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005746 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005747 .prepare_access = spi_prepare_io,
5748 .finish_access = spi_finish_io,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005749 },
5750
5751 {
5752 .vendor = "Eon",
5753 .name = "EN25QH32",
5754 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005755 .id.type = ID_SPI_RDID,
5756 .id.manufacture = EON_ID_NOPREFIX,
5757 .id.model = EON_EN25QH32,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005758 .total_size = 4096,
5759 .page_size = 256,
5760 /* supports SFDP */
5761 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005762 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5763 .dummy_cycles =
5764 {
5765 .qpi_fast_read = 6,
5766 .qpi_fast_read_qio = 6,
5767 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005768 .tested = TEST_OK_PREW,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005769 .probe_timing = TIMING_ZERO,
5770 .block_erasers =
5771 {
5772 {
5773 .eraseblocks = { {4 * 1024, 1024} },
5774 .block_erase = spi_block_erase_20,
5775 }, {
5776 .eraseblocks = { {64 * 1024, 64} },
5777 .block_erase = spi_block_erase_d8,
5778 }, {
5779 .eraseblocks = { {1024 * 4096, 1} },
5780 .block_erase = spi_block_erase_60,
5781 }, {
5782 .eraseblocks = { {1024 * 4096, 1} },
5783 .block_erase = spi_block_erase_c7,
5784 }
5785 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005786 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005787 .unlock = spi_disable_blockprotect_bp3_srwd,
5788 .write = spi_chip_write_256,
5789 .read = spi_chip_read,
5790 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005791 .reg_bits =
5792 {
5793 .srp = {STATUS1, 7, RW},
5794 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5795 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5796 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005797 .wp_write_cfg = spi_wp_write_cfg,
5798 .wp_read_cfg = spi_wp_read_cfg,
5799 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005800 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005801 .prepare_access = spi_prepare_io,
5802 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005803 },
5804
5805 {
5806 .vendor = "Eon",
5807 .name = "EN25QH32B",
5808 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005809 .id.type = ID_SPI_RDID,
5810 .id.manufacture = EON_ID_NOPREFIX,
5811 .id.model = EON_EN25QH32,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005812 .total_size = 4096,
5813 .page_size = 256,
5814 /* supports SFDP */
5815 /* OTP: 1536B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005816 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_38,
5817 .dummy_cycles =
5818 {
5819 .qpi_fast_read = 6,
5820 .qpi_fast_read_qio = 6,
5821 },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005822 .tested = TEST_OK_PREW,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005823 .probe_timing = TIMING_ZERO,
5824 .block_erasers =
5825 {
5826 {
5827 .eraseblocks = { {4 * 1024, 1024} },
5828 .block_erase = spi_block_erase_20,
5829 }, {
5830 .eraseblocks = { {32 * 1024, 128} },
5831 .block_erase = spi_block_erase_52,
5832 }, {
5833 .eraseblocks = { {64 * 1024, 64} },
5834 .block_erase = spi_block_erase_d8,
5835 }, {
5836 .eraseblocks = { {1024 * 4096, 1} },
5837 .block_erase = spi_block_erase_60,
5838 }, {
5839 .eraseblocks = { {1024 * 4096, 1} },
5840 .block_erase = spi_block_erase_c7,
5841 }
5842 },
5843 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5844 .unlock = spi_disable_blockprotect_bp3_srwd,
5845 .write = spi_chip_write_256,
5846 .read = spi_chip_read,
5847 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005848 .prepare_access = spi_prepare_io,
5849 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005850 },
5851
5852 {
5853 .vendor = "Eon",
5854 .name = "EN25QH64",
5855 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005856 .id.type = ID_SPI_RDID,
5857 .id.manufacture = EON_ID_NOPREFIX,
5858 .id.model = EON_EN25QH64,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005859 .total_size = 8192,
5860 .page_size = 256,
5861 /* supports SFDP */
5862 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005863 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5864 .dummy_cycles =
5865 {
5866 .qpi_fast_read = 6,
5867 .qpi_fast_read_qio = 6,
5868 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005869 .tested = TEST_OK_PREW,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005870 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005871 .block_erasers =
5872 {
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005873 {
5874 .eraseblocks = { {4 * 1024, 2048} },
5875 .block_erase = spi_block_erase_20,
5876 }, {
5877 .eraseblocks = { {64 * 1024, 128} },
5878 .block_erase = spi_block_erase_d8,
5879 }, {
5880 .eraseblocks = { { 8192 * 1024, 1} },
5881 .block_erase = spi_block_erase_60,
5882 }, {
5883 .eraseblocks = { { 8192 * 1024, 1} },
5884 .block_erase = spi_block_erase_c7,
5885 }
5886 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005887 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005888 .unlock = spi_disable_blockprotect_bp3_srwd,
5889 .write = spi_chip_write_256,
5890 .read = spi_chip_read,
5891 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005892 .reg_bits =
5893 {
5894 .srp = {STATUS1, 7, RW},
5895 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5896 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5897 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005898 .wp_write_cfg = spi_wp_write_cfg,
5899 .wp_read_cfg = spi_wp_read_cfg,
5900 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005901 .decode_range = decode_range_spi25_64k_block,
Nico Huber930d4212024-05-04 18:59:15 +02005902 .prepare_access = spi_prepare_io,
5903 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005904 },
5905
5906 {
5907 .vendor = "Eon",
5908 .name = "EN25QH64A",
5909 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005910 .id.type = ID_SPI_RDID,
5911 .id.manufacture = EON_ID_NOPREFIX,
5912 .id.model = EON_EN25QH64,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005913 .total_size = 8192,
5914 .page_size = 256,
5915 /* supports SFDP */
5916 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005917 /* Has a special, volatile status register 3 that is written with
5918 0xc0 like Set Read Parameters. Hence treating as QPI_SRP. */
5919 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP,
5920 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005921 .tested = TEST_OK_PREW,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005922 .probe_timing = TIMING_ZERO,
5923 .block_erasers =
5924 {
5925 {
5926 .eraseblocks = { {4 * 1024, 2048} },
5927 .block_erase = spi_block_erase_20,
5928 }, {
5929 .eraseblocks = { {32 * 1024, 256} },
5930 .block_erase = spi_block_erase_52,
5931 }, {
5932 .eraseblocks = { {64 * 1024, 128} },
5933 .block_erase = spi_block_erase_d8,
5934 }, {
5935 .eraseblocks = { { 8192 * 1024, 1} },
5936 .block_erase = spi_block_erase_60,
5937 }, {
5938 .eraseblocks = { { 8192 * 1024, 1} },
5939 .block_erase = spi_block_erase_c7,
5940 }
5941 },
5942 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5943 .unlock = spi_disable_blockprotect_bp3_srwd,
5944 .write = spi_chip_write_256,
5945 .read = spi_chip_read,
5946 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005947 .prepare_access = spi_prepare_io,
5948 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005949 },
5950
5951 {
5952 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005953 .name = "EN25S10",
5954 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005955 .id.type = ID_SPI_RDID,
5956 .id.manufacture = EON_ID_NOPREFIX,
5957 .id.model = EON_EN25S10,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005958 .total_size = 128,
5959 .page_size = 256,
5960 /* OTP: 256B total; enter 0x3A */
5961 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5962 .tested = TEST_UNTESTED,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005963 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005964 .block_erasers =
5965 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005966 {
5967 .eraseblocks = { {4 * 1024, 32} },
5968 .block_erase = spi_block_erase_20,
5969 }, {
5970 .eraseblocks = { {32 * 1024, 4} },
5971 .block_erase = spi_block_erase_52,
5972 }, {
5973 .eraseblocks = { {128 * 1024, 1} },
5974 .block_erase = spi_block_erase_60,
5975 }, {
5976 .eraseblocks = { {128 * 1024, 1} },
5977 .block_erase = spi_block_erase_c7,
5978 }
5979 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005980 .printlock = spi_prettyprint_status_register_bp2_srwd,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005981 .unlock = spi_disable_blockprotect,
5982 .write = spi_chip_write_256,
5983 .read = spi_chip_read,
5984 .voltage = {1650, 1950},
5985 },
5986
5987 {
5988 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005989 .name = "EN25S16",
5990 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02005991 .id.type = ID_SPI_RDID,
5992 .id.manufacture = EON_ID_NOPREFIX,
5993 .id.model = EON_EN25S16,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005994 .total_size = 2048,
5995 .page_size = 256,
5996 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005997 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5998 .dummy_cycles =
5999 {
6000 .qpi_fast_read = 6,
6001 .qpi_fast_read_qio = 6,
6002 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006003 .tested = TEST_UNTESTED,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006004 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006005 .block_erasers =
6006 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006007 {
6008 .eraseblocks = { {4 * 1024, 512} },
6009 .block_erase = spi_block_erase_20,
6010 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006011 .eraseblocks = { {32 * 1024, 64} },
6012 .block_erase = spi_block_erase_d8,
6013 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05306014 .eraseblocks = { {64 * 1024, 32} },
6015 .block_erase = spi_block_erase_52,
6016 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006017 .eraseblocks = { {2048 * 1024, 1} },
6018 .block_erase = spi_block_erase_60,
6019 }, {
6020 .eraseblocks = { {2048 * 1024, 1} },
6021 .block_erase = spi_block_erase_c7,
6022 }
6023 },
6024 .printlock = spi_prettyprint_status_register_en25s_wp,
6025 .unlock = spi_disable_blockprotect_bp3_srwd,
6026 .write = spi_chip_write_256,
6027 .read = spi_chip_read,
6028 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006029 .prepare_access = spi_prepare_io,
6030 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006031 },
6032
6033 {
6034 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006035 .name = "EN25S20",
6036 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006037 .id.type = ID_SPI_RDID,
6038 .id.manufacture = EON_ID_NOPREFIX,
6039 .id.model = EON_EN25S20,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006040 .total_size = 256,
6041 .page_size = 256,
6042 /* OTP: 256B total; enter 0x3A */
6043 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6044 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006045 .probe_timing = TIMING_ZERO,
6046 .block_erasers =
6047 {
6048 {
6049 .eraseblocks = { {4 * 1024, 64} },
6050 .block_erase = spi_block_erase_20,
6051 }, {
6052 .eraseblocks = { {64 * 1024, 4} },
6053 .block_erase = spi_block_erase_d8,
6054 }, {
6055 .eraseblocks = { {256 * 1024, 1} },
6056 .block_erase = spi_block_erase_60,
6057 }, {
6058 .eraseblocks = { {256 * 1024, 1} },
6059 .block_erase = spi_block_erase_c7,
6060 }
6061 },
6062 .printlock = spi_prettyprint_status_register_bp2_srwd,
6063 .unlock = spi_disable_blockprotect,
6064 .write = spi_chip_write_256,
6065 .read = spi_chip_read,
6066 .voltage = {1650, 1950},
6067 },
6068
6069 {
6070 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006071 .name = "EN25S32",
6072 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006073 .id.type = ID_SPI_RDID,
6074 .id.manufacture = EON_ID_NOPREFIX,
6075 .id.model = EON_EN25S32,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006076 .total_size = 4096,
6077 .page_size = 256,
6078 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01006079 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
6080 .dummy_cycles =
6081 {
6082 .qpi_fast_read = 6,
6083 .qpi_fast_read_qio = 6,
6084 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006085 .tested = TEST_UNTESTED,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006086 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006087 .block_erasers =
6088 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006089 {
6090 .eraseblocks = { {4 * 1024, 1024} },
6091 .block_erase = spi_block_erase_20,
6092 }, {
6093 .eraseblocks = { {32 * 1024, 128} },
6094 .block_erase = spi_block_erase_52,
6095 }, {
6096 .eraseblocks = { {64 * 1024, 64} },
6097 .block_erase = spi_block_erase_d8,
6098 }, {
6099 .eraseblocks = { {4096 * 1024, 1} },
6100 .block_erase = spi_block_erase_60,
6101 }, {
6102 .eraseblocks = { {4096 * 1024, 1} },
6103 .block_erase = spi_block_erase_c7,
6104 }
6105 },
6106 .printlock = spi_prettyprint_status_register_en25s_wp,
6107 .unlock = spi_disable_blockprotect_bp3_srwd,
6108 .write = spi_chip_write_256,
6109 .read = spi_chip_read,
6110 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006111 .prepare_access = spi_prepare_io,
6112 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006113 },
6114
6115 {
6116 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006117 .name = "EN25S40",
6118 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006119 .id.type = ID_SPI_RDID,
6120 .id.manufacture = EON_ID_NOPREFIX,
6121 .id.model = EON_EN25S40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006122 .total_size = 512,
6123 .page_size = 256,
6124 /* OTP: 256B total; enter 0x3A */
6125 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6126 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006127 .probe_timing = TIMING_ZERO,
6128 .block_erasers =
6129 {
6130 {
6131 .eraseblocks = { {4 * 1024, 128} },
6132 .block_erase = spi_block_erase_20,
6133 }, {
6134 .eraseblocks = { {64 * 1024, 8} },
6135 .block_erase = spi_block_erase_d8,
6136 }, {
6137 .eraseblocks = { {512 * 1024, 1} },
6138 .block_erase = spi_block_erase_60,
6139 }, {
6140 .eraseblocks = { {512 * 1024, 1} },
6141 .block_erase = spi_block_erase_c7,
6142 }
6143 },
6144 .printlock = spi_prettyprint_status_register_bp2_srwd,
6145 .unlock = spi_disable_blockprotect,
6146 .write = spi_chip_write_256,
6147 .read = spi_chip_read,
6148 .voltage = {1650, 1950},
6149 },
6150
6151 {
6152 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006153 .name = "EN25S64",
6154 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006155 .id.type = ID_SPI_RDID,
6156 .id.manufacture = EON_ID_NOPREFIX,
6157 .id.model = EON_EN25S64,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006158 .total_size = 8192,
6159 .page_size = 256,
6160 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01006161 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
6162 .dummy_cycles =
6163 {
6164 .qpi_fast_read = 6,
6165 .qpi_fast_read_qio = 6,
6166 },
Nikolai Artemievdf889fa2021-03-23 17:10:45 +11006167 .tested = TEST_OK_PREW,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006168 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006169 .block_erasers =
6170 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006171 {
6172 .eraseblocks = { {4 * 1024, 2048} },
6173 .block_erase = spi_block_erase_20,
6174 }, {
6175 .eraseblocks = { {64 * 1024, 128} },
6176 .block_erase = spi_block_erase_d8,
6177 }, {
6178 .eraseblocks = { {8192 * 1024, 1} },
6179 .block_erase = spi_block_erase_60,
6180 }, {
6181 .eraseblocks = { {8192 * 1024, 1} },
6182 .block_erase = spi_block_erase_c7,
6183 }
6184 },
6185 .printlock = spi_prettyprint_status_register_en25s_wp,
6186 .unlock = spi_disable_blockprotect_bp3_srwd,
6187 .write = spi_chip_write_256,
6188 .read = spi_chip_read,
6189 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006190 .prepare_access = spi_prepare_io,
6191 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006192 },
6193
6194 {
6195 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006196 .name = "EN25S80",
6197 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006198 .id.type = ID_SPI_RDID,
6199 .id.manufacture = EON_ID_NOPREFIX,
6200 .id.model = EON_EN25S80,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006201 .total_size = 1024,
6202 .page_size = 256,
6203 /* OTP: 256B total; enter 0x3A */
6204 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6205 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006206 .probe_timing = TIMING_ZERO,
Russ Dill3cd5a122010-03-05 08:44:11 +00006207 .block_erasers =
6208 {
6209 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006210 .eraseblocks = { {4 * 1024, 256} },
6211 .block_erase = spi_block_erase_20,
6212 }, {
6213 .eraseblocks = { {64 * 1024, 16} },
6214 .block_erase = spi_block_erase_d8,
6215 }, {
6216 .eraseblocks = { {1024 * 1024, 1} },
6217 .block_erase = spi_block_erase_60,
6218 }, {
6219 .eraseblocks = { {1024 * 1024, 1} },
6220 .block_erase = spi_block_erase_c7,
6221 }
Russ Dill3cd5a122010-03-05 08:44:11 +00006222 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006223 .printlock = spi_prettyprint_status_register_bp2_srwd,
6224 .unlock = spi_disable_blockprotect,
6225 .write = spi_chip_write_256,
6226 .read = spi_chip_read,
6227 .voltage = {1650, 1950},
Russ Dill3cd5a122010-03-05 08:44:11 +00006228 },
6229
6230 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00006231 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006232 .name = "EN29F002(A)(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006233 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02006234 .id.type = ID_JEDEC,
6235 .id.manufacture = EON_ID,
6236 .id.model = EON_EN29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006237 .total_size = 256,
6238 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00006239 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Alan Green4362e622019-08-26 15:02:12 +10006240 .tested = TEST_OK_PREW,
Udu Ogahc04ee222009-09-05 01:31:32 +00006241 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006242 .block_erasers =
6243 {
6244 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006245 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006246 {16 * 1024, 1},
Michael Karchere3cb0a12010-03-13 23:47:09 +00006247 {8 * 1024, 2},
6248 {32 * 1024, 1},
6249 {64 * 1024, 3},
Sean Nelson6b11ad22009-12-23 17:05:59 +00006250 },
6251 .block_erase = erase_sector_jedec,
6252 }, {
6253 .eraseblocks = { {256 * 1024, 1} },
6254 .block_erase = erase_chip_block_jedec,
6255 },
6256 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00006257 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006258 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006259 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006260 .prepare_access = prepare_memory_access,
6261 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006262 },
6263
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006264 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00006265 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006266 .name = "EN29F002(A)(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006267 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02006268 .id.type = ID_JEDEC,
6269 .id.manufacture = EON_ID,
6270 .id.model = EON_EN29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006271 .total_size = 256,
6272 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00006273 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +00006274 .tested = TEST_OK_PREW,
Udu Ogahc04ee222009-09-05 01:31:32 +00006275 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006276 .block_erasers =
6277 {
6278 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006279 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006280 {64 * 1024, 3},
Michael Karchere3cb0a12010-03-13 23:47:09 +00006281 {32 * 1024, 1},
6282 {8 * 1024, 2},
6283 {16 * 1024, 1},
Sean Nelson6b11ad22009-12-23 17:05:59 +00006284 },
6285 .block_erase = erase_sector_jedec,
6286 }, {
6287 .eraseblocks = { {256 * 1024, 1} },
6288 .block_erase = erase_chip_block_jedec,
6289 },
6290 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00006291 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006292 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006293 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006294 .prepare_access = prepare_memory_access,
6295 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006296 },
6297
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006298 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006299 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006300 .name = "EN29F010",
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006301 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02006302 .id.type = ID_JEDEC,
6303 .id.manufacture = EON_ID,
6304 .id.model = EON_EN29F010,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006305 .total_size = 128,
6306 .page_size = 128,
6307 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
6308 .tested = TEST_OK_PRE,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006309 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006310 .block_erasers =
6311 {
6312 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006313 .eraseblocks = { {16 * 1024, 8} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006314 .block_erase = erase_sector_jedec,
6315 },
6316 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006317 .eraseblocks = { {128 * 1024, 1} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006318 .block_erase = erase_chip_block_jedec,
6319 },
6320 },
6321 .write = write_jedec_1,
6322 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006323 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006324 .prepare_access = prepare_memory_access,
6325 .finish_access = finish_memory_access,
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006326 },
6327
6328 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006329 .vendor = "Eon",
6330 .name = "EN29GL064(A)B",
6331 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02006332 .id.type = ID_JEDEC_29GL,
6333 .id.manufacture = EON_ID,
6334 .id.model = EON_EN29GL064B,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006335 .total_size = 8192,
6336 .page_size = 128 * 1024, /* actual page size is 16 */
6337 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6338 .tested = TEST_UNTESTED,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006339 .probe_timing = TIMING_ZERO,
6340 .block_erasers =
6341 {
6342 {
6343 .eraseblocks = {
6344 {8 * 1024, 8},
6345 {64 * 1024, 127},
6346 },
6347 .block_erase = erase_sector_jedec,
6348 }, {
6349 .eraseblocks = { {8 * 1024 * 1024, 1} },
6350 .block_erase = erase_chip_block_jedec,
6351 },
6352 },
6353 .write = write_jedec_1,
6354 .read = read_memmapped,
6355 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006356 .prepare_access = prepare_memory_access,
6357 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006358 },
6359
6360 {
6361 .vendor = "Eon",
6362 .name = "EN29GL064(A)T",
6363 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02006364 .id.type = ID_JEDEC_29GL,
6365 .id.manufacture = EON_ID,
6366 .id.model = EON_EN29GL064T,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006367 .total_size = 8192,
6368 .page_size = 128 * 1024, /* actual page size is 16 */
6369 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6370 .tested = TEST_UNTESTED,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006371 .probe_timing = TIMING_ZERO,
6372 .block_erasers =
6373 {
6374 {
6375 .eraseblocks = {
6376 {64 * 1024, 127},
6377 {8 * 1024, 8},
6378 },
6379 .block_erase = erase_sector_jedec,
6380 }, {
6381 .eraseblocks = { {8 * 1024 * 1024, 1} },
6382 .block_erase = erase_chip_block_jedec,
6383 },
6384 },
6385 .write = write_jedec_1,
6386 .read = read_memmapped,
6387 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006388 .prepare_access = prepare_memory_access,
6389 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006390 },
6391
6392 {
6393 .vendor = "Eon",
Nico Huber533ea712026-07-19 15:52:21 +02006394 .name = "EN29GL064(H/L)",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006395 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02006396 .id.type = ID_JEDEC_29GL,
6397 .id.manufacture = EON_ID,
6398 .id.model = EON_EN29GL064HL,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006399 .total_size = 8192,
6400 .page_size = 128 * 1024, /* actual page size is 16 */
6401 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6402 .tested = TEST_UNTESTED,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006403 .probe_timing = TIMING_ZERO,
6404 .block_erasers =
6405 {
6406 {
6407 .eraseblocks = { {64 * 1024, 128} },
6408 .block_erase = erase_sector_jedec,
6409 }, {
6410 .eraseblocks = { {8 * 1024 * 1024, 1} },
6411 .block_erase = erase_chip_block_jedec,
6412 },
6413 },
6414 .write = write_jedec_1,
6415 .read = read_memmapped,
6416 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006417 .prepare_access = prepare_memory_access,
6418 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006419 },
6420
6421 {
6422 .vendor = "Eon",
6423 .name = "EN29GL128",
6424 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02006425 .id.type = ID_JEDEC_29GL,
6426 .id.manufacture = EON_ID,
6427 .id.model = EON_EN29GL128HL,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006428 .total_size = 16384,
6429 .page_size = 128 * 1024, /* actual page size is 16 */
6430 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6431 .tested = TEST_UNTESTED,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006432 .probe_timing = TIMING_ZERO,
6433 .block_erasers =
6434 {
6435 {
6436 .eraseblocks = { {128 * 1024, 128} },
6437 .block_erase = erase_sector_jedec,
6438 }, {
6439 .eraseblocks = { {16 * 1024 * 1024, 1} },
6440 .block_erase = erase_chip_block_jedec,
6441 },
6442 },
6443 .write = write_jedec_1,
6444 .read = read_memmapped,
6445 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006446 .prepare_access = prepare_memory_access,
6447 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006448 },
6449
6450 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006451 .vendor = "Eon",
6452 .name = "EN29LV040(A)",
6453 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02006454 .id.type = ID_JEDEC,
6455 .id.manufacture = EON_ID,
6456 .id.model = EON_EN29LV040,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006457 .total_size = 512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006458 .page_size = 4 * 1024,
6459 .tested = TEST_OK_PREW,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006460 .probe_timing = TIMING_ZERO,
6461 .block_erasers =
6462 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006463 {
6464 .eraseblocks = { {64 * 1024, 8} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006465 .block_erase = erase_sector_jedec,
6466 },
6467 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006468 .eraseblocks = { {512 * 1024, 1} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006469 .block_erase = erase_chip_block_jedec,
6470 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006471 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006472 .write = write_jedec_1,
6473 .read = read_memmapped,
6474 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R and 55R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006475 .prepare_access = prepare_memory_access,
6476 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006477 },
6478
6479 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006480 .vendor = "Eon",
6481 .name = "EN29LV640B",
6482 .bustype = BUS_PARALLEL,
Nico Huber3a353372026-03-08 15:06:51 +01006483 .id.type = ID_JEDEC,
Nico Huber11136c22023-05-01 12:00:09 +02006484 .id.manufacture = EON_ID,
6485 .id.model = EON_EN29LV640B,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006486 .total_size = 8192,
6487 .page_size = 8192,
Nico Huber3a353372026-03-08 15:06:51 +01006488 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_AAA | FEATURE_SHORT_RESET,
6489 .tested = {.probe = NT, .read = OK, .erase = OK, .write = OK},
Nico Huber3a353372026-03-08 15:06:51 +01006490 .probe_timing = 10, /* Datasheet has no timing info specified */
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006491 .block_erasers =
6492 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006493 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006494 .eraseblocks = {
6495 {8 * 1024, 8},
6496 {64 * 1024, 127},
6497 },
6498 .block_erase = erase_block_jedec,
Stefan Tauner0be072c2016-03-13 15:16:30 +00006499 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006500 .eraseblocks = { {8 * 1024 * 1024, 1} },
6501 .block_erase = erase_chip_block_jedec,
6502 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006503 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006504 .write = write_en29lv640b,
6505 .read = read_memmapped,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006506 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006507 .prepare_access = prepare_memory_access,
6508 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006509 },
6510
6511 {
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006512 .vendor = "Fudan",
6513 .name = "FM25F005",
6514 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006515 .id.type = ID_SPI_RDID,
6516 .id.manufacture = FUDAN_ID_NOPREFIX,
6517 .id.model = FUDAN_FM25F005,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006518 .total_size = 64,
6519 .page_size = 256,
6520 /* OTP: 256B total; enter 0x3A */
6521 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6522 .tested = TEST_UNTESTED,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006523 .probe_timing = TIMING_ZERO,
6524 .block_erasers = {
6525 {
6526 .eraseblocks = { {4 * 1024, 16} },
6527 .block_erase = spi_block_erase_20,
6528 }, {
6529 .eraseblocks = { {32 * 1024, 2} },
6530 .block_erase = spi_block_erase_52,
6531 }, {
6532 .eraseblocks = { {64 * 1024, 1} },
6533 .block_erase = spi_block_erase_d8,
6534 }, {
6535 .eraseblocks = { {64 * 1024, 1} },
6536 .block_erase = spi_block_erase_60,
6537 }, {
6538 .eraseblocks = { {64 * 1024, 1} },
6539 .block_erase = spi_block_erase_c7,
6540 }
6541 },
6542 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6543 .unlock = spi_disable_blockprotect_bp2_srwd,
6544 .write = spi_chip_write_256,
6545 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6546 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6547 },
6548
6549 {
6550 .vendor = "Fudan",
6551 .name = "FM25F01",
6552 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006553 .id.type = ID_SPI_RDID,
6554 .id.manufacture = FUDAN_ID_NOPREFIX,
6555 .id.model = FUDAN_FM25F01,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006556 .total_size = 128,
6557 .page_size = 256,
6558 /* OTP: 256B total; enter 0x3A */
6559 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6560 .tested = TEST_UNTESTED,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006561 .probe_timing = TIMING_ZERO,
6562 .block_erasers = {
6563 {
6564 .eraseblocks = { {4 * 1024, 32} },
6565 .block_erase = spi_block_erase_20,
6566 }, {
6567 .eraseblocks = { {32 * 1024, 4} },
6568 .block_erase = spi_block_erase_52,
6569 }, {
6570 .eraseblocks = { {64 * 1024, 2} },
6571 .block_erase = spi_block_erase_d8,
6572 }, {
6573 .eraseblocks = { {128 * 1024, 1} },
6574 .block_erase = spi_block_erase_60,
6575 }, {
6576 .eraseblocks = { {128 * 1024, 1} },
6577 .block_erase = spi_block_erase_c7,
6578 }
6579 },
6580 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6581 .unlock = spi_disable_blockprotect_bp2_srwd,
6582 .write = spi_chip_write_256,
6583 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6584 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6585 },
6586
6587 {
6588 .vendor = "Fudan",
6589 .name = "FM25F02(A)",
6590 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006591 .id.type = ID_SPI_RDID,
6592 .id.manufacture = FUDAN_ID_NOPREFIX,
6593 .id.model = FUDAN_FM25F02,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006594 .total_size = 256,
6595 .page_size = 256,
6596 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6597 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6598 .tested = TEST_UNTESTED,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006599 .probe_timing = TIMING_ZERO,
6600 .block_erasers = {
6601 {
6602 .eraseblocks = { {4 * 1024, 64} },
6603 .block_erase = spi_block_erase_20,
6604 }, {
6605 .eraseblocks = { {32 * 1024, 8} },
6606 .block_erase = spi_block_erase_52,
6607 }, {
6608 .eraseblocks = { {64 * 1024, 4} },
6609 .block_erase = spi_block_erase_d8,
6610 }, {
6611 .eraseblocks = { {1024 * 256, 1} },
6612 .block_erase = spi_block_erase_60,
6613 }, {
6614 .eraseblocks = { {1024 * 256, 1} },
6615 .block_erase = spi_block_erase_c7,
6616 },
6617 },
6618 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6619 .unlock = spi_disable_blockprotect_bp2_srwd,
6620 .write = spi_chip_write_256,
6621 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6622 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6623 },
6624
6625 {
6626 .vendor = "Fudan",
6627 .name = "FM25F04(A)",
6628 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006629 .id.type = ID_SPI_RDID,
6630 .id.manufacture = FUDAN_ID_NOPREFIX,
6631 .id.model = FUDAN_FM25F04,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006632 .total_size = 512,
6633 .page_size = 256,
6634 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6635 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6636 .tested = TEST_UNTESTED,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006637 .probe_timing = TIMING_ZERO,
6638 .block_erasers = {
6639 {
6640 .eraseblocks = { {4 * 1024, 128} },
6641 .block_erase = spi_block_erase_20,
6642 }, {
6643 .eraseblocks = { {32 * 1024, 16} },
6644 .block_erase = spi_block_erase_52,
6645 }, {
6646 .eraseblocks = { {64 * 1024, 8} },
6647 .block_erase = spi_block_erase_d8,
6648 }, {
6649 .eraseblocks = { {1024 * 512, 1} },
6650 .block_erase = spi_block_erase_60,
6651 }, {
6652 .eraseblocks = { {1024 * 512, 1} },
6653 .block_erase = spi_block_erase_c7,
6654 },
6655 },
6656 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6657 .unlock = spi_disable_blockprotect_bp2_srwd,
6658 .write = spi_chip_write_256,
6659 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6660 .voltage = {2700, 3600},
6661 },
6662
6663 {
6664 .vendor = "Fudan",
Nico Huberc5915182024-10-21 23:40:10 +02006665 .name = "FM25Q02",
6666 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006667 .id.type = ID_SPI_RDID,
6668 .id.manufacture = FUDAN_ID_NOPREFIX,
6669 .id.model = FUDAN_FM25Q02,
Nico Huberc5915182024-10-21 23:40:10 +02006670 .total_size = 256,
6671 .page_size = 256,
6672 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
6673 FEATURE_OTP | FEATURE_QPI_SRP,
6674 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6675 .tested = TEST_UNTESTED,
Nico Huberc5915182024-10-21 23:40:10 +02006676 .probe_timing = TIMING_ZERO,
6677 .block_erasers =
6678 {
6679 {
6680 .eraseblocks = { {4 * 1024, 64} },
6681 .block_erase = spi_block_erase_20,
6682 }, {
6683 .eraseblocks = { {32 * 1024, 8} },
6684 .block_erase = spi_block_erase_52,
6685 }, {
6686 .eraseblocks = { {64 * 1024, 4} },
6687 .block_erase = spi_block_erase_d8,
6688 }, {
6689 .eraseblocks = { {256 * 1024, 1} },
6690 .block_erase = spi_block_erase_60,
6691 }, {
6692 .eraseblocks = { {256 * 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}},
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",
6721 .name = "FM25Q04",
6722 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006723 .id.type = ID_SPI_RDID,
6724 .id.manufacture = FUDAN_ID_NOPREFIX,
6725 .id.model = FUDAN_FM25Q04,
Nico Huberc5915182024-10-21 23:40:10 +02006726 .total_size = 512,
6727 .page_size = 256,
6728 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
6729 FEATURE_OTP | FEATURE_QPI_SRP,
6730 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6731 .tested = TEST_UNTESTED,
Nico Huberc5915182024-10-21 23:40:10 +02006732 .probe_timing = TIMING_ZERO,
6733 .block_erasers =
6734 {
6735 {
6736 .eraseblocks = { {4 * 1024, 128} },
6737 .block_erase = spi_block_erase_20,
6738 }, {
6739 .eraseblocks = { {32 * 1024, 16} },
6740 .block_erase = spi_block_erase_52,
6741 }, {
6742 .eraseblocks = { {64 * 1024, 8} },
6743 .block_erase = spi_block_erase_d8,
6744 }, {
6745 .eraseblocks = { {512 * 1024, 1} },
6746 .block_erase = spi_block_erase_60,
6747 }, {
6748 .eraseblocks = { {512 * 1024, 1} },
6749 .block_erase = spi_block_erase_c7,
6750 },
6751 },
6752 .reg_bits =
6753 {
6754 .qe = {STATUS2, 1, RW},
6755 .srp = {STATUS1, 7, RW},
6756 .srl = {STATUS2, 0, RW},
6757 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6758 .tb = {STATUS1, 5, RW},
6759 .cmp = {STATUS2, 4, RW},
6760 .wps = {STATUS2, 5, RW},
6761 },
6762 .wp_write_cfg = spi_wp_write_cfg,
6763 .wp_read_cfg = spi_wp_read_cfg,
6764 .wp_get_ranges = spi_wp_get_available_ranges,
6765 .decode_range = decode_range_spi25,
6766 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6767 .unlock = spi_disable_blockprotect_bp2_srwd,
6768 .write = spi_chip_write_256,
6769 .read = spi_chip_read,
6770 .voltage = {2700, 3600},
6771 .prepare_access = spi_prepare_io,
6772 .finish_access = spi_finish_io,
6773 },
6774
6775 {
6776 .vendor = "Fudan",
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006777 .name = "FM25Q08",
6778 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006779 .id.type = ID_SPI_RDID,
6780 .id.manufacture = FUDAN_ID_NOPREFIX,
6781 .id.model = FUDAN_FM25Q08,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006782 .total_size = 1024,
6783 .page_size = 256,
6784 /* supports SFDP */
6785 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber7f7bffa2024-10-21 23:57:11 +02006786 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
Nico Huber226bb872024-04-09 23:30:34 +02006787 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006788 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006789 .tested = TEST_UNTESTED,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006790 .probe_timing = TIMING_ZERO,
6791 .block_erasers = {
6792 {
6793 .eraseblocks = { {4 * 1024, 256} },
6794 .block_erase = spi_block_erase_20,
6795 }, {
6796 .eraseblocks = { {32 * 1024, 32} },
6797 .block_erase = spi_block_erase_52,
6798 }, {
6799 .eraseblocks = { {64 * 1024, 16} },
6800 .block_erase = spi_block_erase_d8,
6801 }, {
6802 .eraseblocks = { {1024 * 1024, 1} },
6803 .block_erase = spi_block_erase_60,
6804 }, {
6805 .eraseblocks = { {1024 * 1024, 1} },
6806 .block_erase = spi_block_erase_c7,
6807 },
6808 },
Nico Huber226bb872024-04-09 23:30:34 +02006809 .reg_bits =
6810 {
6811 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006812 .srp = {STATUS1, 7, RW},
6813 .srl = {STATUS2, 0, RW},
6814 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6815 .tb = {STATUS1, 5, RW},
6816 .sec = {STATUS1, 6, RW},
6817 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02006818 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006819 .wp_write_cfg = spi_wp_write_cfg,
6820 .wp_read_cfg = spi_wp_read_cfg,
6821 .wp_get_ranges = spi_wp_get_available_ranges,
6822 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006823 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6824 .unlock = spi_disable_blockprotect_bp2_srwd,
6825 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006826 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006827 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006828 .prepare_access = spi_prepare_io,
6829 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006830 },
6831
6832 {
6833 .vendor = "Fudan",
Nico Huber4a351342024-10-22 00:03:52 +02006834 .name = "FM25Q08A",
6835 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006836 .id.type = ID_SPI_RDID,
6837 .id.manufacture = FUDAN_ID_NOPREFIX,
6838 .id.model = FUDAN_FM25Q08,
Nico Huber4a351342024-10-22 00:03:52 +02006839 .total_size = 1024,
6840 .page_size = 256,
6841 /* supports SFDP */
6842 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
6843 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
6844 FEATURE_OTP | FEATURE_QPI_SRP,
6845 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6846 .tested = TEST_UNTESTED,
Nico Huber4a351342024-10-22 00:03:52 +02006847 .probe_timing = TIMING_ZERO,
6848 .block_erasers = {
6849 {
6850 .eraseblocks = { {4 * 1024, 256} },
6851 .block_erase = spi_block_erase_20,
6852 }, {
6853 .eraseblocks = { {32 * 1024, 32} },
6854 .block_erase = spi_block_erase_52,
6855 }, {
6856 .eraseblocks = { {64 * 1024, 16} },
6857 .block_erase = spi_block_erase_d8,
6858 }, {
6859 .eraseblocks = { {1024 * 1024, 1} },
6860 .block_erase = spi_block_erase_60,
6861 }, {
6862 .eraseblocks = { {1024 * 1024, 1} },
6863 .block_erase = spi_block_erase_c7,
6864 },
6865 },
6866 .reg_bits =
6867 {
6868 .qe = {STATUS2, 1, RW},
6869 .srp = {STATUS1, 7, RW},
6870 .srl = {STATUS2, 0, RW},
6871 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6872 .tb = {STATUS1, 5, RW},
6873 .sec = {STATUS1, 6, RW},
6874 .cmp = {STATUS2, 4, RW},
6875 },
6876 .wp_write_cfg = spi_wp_write_cfg,
6877 .wp_read_cfg = spi_wp_read_cfg,
6878 .wp_get_ranges = spi_wp_get_available_ranges,
6879 .decode_range = decode_range_spi25,
6880 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6881 .unlock = spi_disable_blockprotect_bp2_srwd,
6882 .write = spi_chip_write_256,
6883 .read = spi_chip_read,
6884 .voltage = {2700, 3600},
6885 .prepare_access = spi_prepare_io,
6886 .finish_access = spi_finish_io,
6887 },
6888
6889 {
6890 .vendor = "Fudan",
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006891 .name = "FM25Q16",
6892 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006893 .id.type = ID_SPI_RDID,
6894 .id.manufacture = FUDAN_ID_NOPREFIX,
6895 .id.model = FUDAN_FM25Q16,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006896 .total_size = 2048,
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,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006904 .probe_timing = TIMING_ZERO,
6905 .block_erasers = {
6906 {
6907 .eraseblocks = { {4 * 1024, 512} },
6908 .block_erase = spi_block_erase_20,
6909 }, {
6910 .eraseblocks = { {32 * 1024, 64} },
6911 .block_erase = spi_block_erase_52,
6912 }, {
6913 .eraseblocks = { {64 * 1024, 32} },
6914 .block_erase = spi_block_erase_d8,
6915 }, {
6916 .eraseblocks = { {2 * 1024 * 1024, 1} },
6917 .block_erase = spi_block_erase_60,
6918 }, {
6919 .eraseblocks = { {2 * 1024 * 1024, 1} },
6920 .block_erase = spi_block_erase_c7,
6921 }
6922 },
Nico Huber226bb872024-04-09 23:30:34 +02006923 .reg_bits =
6924 {
6925 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006926 .srp = {STATUS1, 7, RW},
6927 .srl = {STATUS2, 0, RW},
6928 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6929 .tb = {STATUS1, 5, RW},
6930 .sec = {STATUS1, 6, RW},
6931 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02006932 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006933 .wp_write_cfg = spi_wp_write_cfg,
6934 .wp_read_cfg = spi_wp_read_cfg,
6935 .wp_get_ranges = spi_wp_get_available_ranges,
6936 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006937 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6938 .unlock = spi_disable_blockprotect_bp2_srwd,
6939 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006940 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006941 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006942 .prepare_access = spi_prepare_io,
6943 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006944 },
6945
6946 {
6947 .vendor = "Fudan",
6948 .name = "FM25Q32",
6949 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02006950 .id.type = ID_SPI_RDID,
6951 .id.manufacture = FUDAN_ID_NOPREFIX,
6952 .id.model = FUDAN_FM25Q32,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006953 .total_size = 4096,
6954 .page_size = 256,
6955 /* supports SFDP */
6956 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber7f7bffa2024-10-21 23:57:11 +02006957 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
Nico Huber226bb872024-04-09 23:30:34 +02006958 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006959 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006960 .tested = TEST_UNTESTED,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006961 .probe_timing = TIMING_ZERO,
6962 .block_erasers = {
6963 {
6964 .eraseblocks = { {4 * 1024, 1024} },
6965 .block_erase = spi_block_erase_20,
6966 }, {
6967 .eraseblocks = { {32 * 1024, 128} },
6968 .block_erase = spi_block_erase_52,
6969 }, {
6970 .eraseblocks = { {64 * 1024, 64} },
6971 .block_erase = spi_block_erase_d8,
6972 }, {
6973 .eraseblocks = { {4 * 1024 * 1024, 1} },
6974 .block_erase = spi_block_erase_60,
6975 }, {
6976 .eraseblocks = { {4 * 1024 * 1024, 1} },
6977 .block_erase = spi_block_erase_c7,
6978 },
6979 },
Nico Huber226bb872024-04-09 23:30:34 +02006980 .reg_bits =
6981 {
6982 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006983 .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},
Nico Huber226bb872024-04-09 23:30:34 +02006989 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006990 .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,
6994 .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,
6997 .read = spi_chip_read,
6998 .voltage = {2700, 3600},
6999 .prepare_access = spi_prepare_io,
7000 .finish_access = spi_finish_io,
7001 },
7002
7003 {
7004 .vendor = "Fudan",
7005 .name = "FM25Q64",
7006 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007007 .id.type = ID_SPI_RDID,
7008 .id.manufacture = FUDAN_ID_NOPREFIX,
7009 .id.model = FUDAN_FM25Q64,
Nico Huber7f7bffa2024-10-21 23:57:11 +02007010 .total_size = 8192,
7011 .page_size = 256,
7012 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7013 FEATURE_OTP | FEATURE_QPI_SRP,
7014 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
7015 .tested = TEST_UNTESTED,
Nico Huber7f7bffa2024-10-21 23:57:11 +02007016 .probe_timing = TIMING_ZERO,
7017 .block_erasers =
7018 {
7019 {
7020 .eraseblocks = { {4 * 1024, 2048} },
7021 .block_erase = spi_block_erase_20,
7022 }, {
7023 .eraseblocks = { {32 * 1024, 256} },
7024 .block_erase = spi_block_erase_52,
7025 }, {
7026 .eraseblocks = { {64 * 1024, 128} },
7027 .block_erase = spi_block_erase_d8,
7028 }, {
7029 .eraseblocks = { {8192 * 1024, 1} },
7030 .block_erase = spi_block_erase_60,
7031 }, {
7032 .eraseblocks = { {8192 * 1024, 1} },
7033 .block_erase = spi_block_erase_c7,
7034 },
7035 },
7036 .reg_bits =
7037 {
7038 .qe = {STATUS2, 1, RW},
7039 .srp = {STATUS1, 7, RW},
7040 .srl = {STATUS2, 0, RW},
7041 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7042 .tb = {STATUS1, 5, RW},
7043 .sec = {STATUS1, 6, RW},
7044 .cmp = {STATUS2, 6, RW},
7045 },
7046 .wp_write_cfg = spi_wp_write_cfg,
7047 .wp_read_cfg = spi_wp_read_cfg,
7048 .wp_get_ranges = spi_wp_get_available_ranges,
7049 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01007050 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
7051 .unlock = spi_disable_blockprotect_bp2_srwd,
7052 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007053 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01007054 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007055 .prepare_access = spi_prepare_io,
7056 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01007057 },
7058
7059 {
Nico Hubered8b82c2024-10-22 00:12:03 +02007060 .vendor = "Fudan",
7061 .name = "FM25Q128",
7062 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007063 .id.type = ID_SPI_RDID,
7064 .id.manufacture = FUDAN_ID_NOPREFIX,
7065 .id.model = FUDAN_FM25Q128,
Nico Hubered8b82c2024-10-22 00:12:03 +02007066 .total_size = 16384,
7067 .page_size = 256,
7068 /* Supports full QIO/QPI but has non-volatile DC bits controlling all modes. */
7069 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
7070 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
7071 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
7072 .tested = TEST_UNTESTED,
Nico Hubered8b82c2024-10-22 00:12:03 +02007073 .probe_timing = TIMING_ZERO,
7074 .block_erasers =
7075 {
7076 {
7077 .eraseblocks = { {4 * 1024, 4096} },
7078 .block_erase = spi_block_erase_20,
7079 }, {
7080 .eraseblocks = { {32 * 1024, 512} },
7081 .block_erase = spi_block_erase_52,
7082 }, {
7083 .eraseblocks = { {64 * 1024, 256} },
7084 .block_erase = spi_block_erase_d8,
7085 }, {
7086 .eraseblocks = { {16384 * 1024, 1} },
7087 .block_erase = spi_block_erase_60,
7088 }, {
7089 .eraseblocks = { {16384 * 1024, 1} },
7090 .block_erase = spi_block_erase_c7,
7091 },
7092 },
7093 .reg_bits =
7094 {
7095 .qe = {STATUS2, 1, RW},
7096 .dc = {{STATUS2, 6, RW}, {STATUS2, 7, RW}},
7097 .srp = {STATUS1, 7, RW},
7098 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7099 .tb = {STATUS1, 5, RW},
7100 .cmp = {STATUS1, 6, RW},
7101 .wps = {STATUS3, 2, RW},
7102 },
7103 .wp_write_cfg = spi_wp_write_cfg,
7104 .wp_read_cfg = spi_wp_read_cfg,
7105 .wp_get_ranges = spi_wp_get_available_ranges,
7106 .decode_range = decode_range_spi25,
7107 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
7108 .unlock = spi_disable_blockprotect_bp2_srwd,
7109 .write = spi_chip_write_256,
7110 .read = spi_chip_read,
7111 .voltage = {2700, 3600},
7112 .prepare_access = spi_prepare_io,
7113 .finish_access = spi_finish_io,
7114 },
7115
7116 {
Nico Huberd72347b2026-07-26 13:53:36 +02007117 .vendor = "Fudan",
7118 .name = "FM25W128",
7119 .bustype = BUS_SPI,
7120 .id.type = ID_SPI_RDID,
7121 .id.manufacture = FUDAN_ID_NOPREFIX,
7122 .id.model = FUDAN_FM25W128,
7123 .total_size = 16384,
7124 .page_size = 256,
7125 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7126 FEATURE_OTP | FEATURE_QPI_SRP,
7127 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
7128 .tested = TEST_UNTESTED,
7129 .block_erasers =
7130 {
7131 {
7132 .eraseblocks = { {4 * 1024, 4096} },
7133 .block_erase = spi_block_erase_20,
7134 }, {
7135 .eraseblocks = { {32 * 1024, 512} },
7136 .block_erase = spi_block_erase_52,
7137 }, {
7138 .eraseblocks = { {64 * 1024, 256} },
7139 .block_erase = spi_block_erase_d8,
7140 }, {
7141 .eraseblocks = { {16384 * 1024, 1} },
7142 .block_erase = spi_block_erase_60,
7143 }, {
7144 .eraseblocks = { {16384 * 1024, 1} },
7145 .block_erase = spi_block_erase_c7,
7146 },
7147 },
7148 .reg_bits =
7149 {
7150 .qe = {STATUS2, 1, RW},
7151 /*
7152 * Not all BP bit combinations are documented,
7153 * full WP support would need specific testing.
7154 * .srp = {STATUS1, 7, RW},
7155 * .srl = {STATUS2, 0, RW},
7156 * .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7157 * .tb = {STATUS1, 5, RW},
7158 * .sec = {STATUS1, 6, RW},
7159 * .cmp = {STATUS2, 6, RW},
7160 */
7161 },
7162 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
7163 .unlock = spi_disable_blockprotect_bp2_srwd,
7164 .write = spi_chip_write_256,
7165 .read = spi_chip_read,
7166 .voltage = {1650, 3600},
7167 .prepare_access = spi_prepare_io,
7168 .finish_access = spi_finish_io,
7169 },
7170
7171 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007172 .vendor = "Fujitsu",
7173 .name = "MBM29F004BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007174 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02007175 .id.type = ID_JEDEC,
7176 .id.manufacture = FUJITSU_ID,
7177 .id.model = FUJITSU_MBM29F004BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007178 .total_size = 512,
7179 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00007180 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007181 .tested = TEST_UNTESTED,
Udu Ogahc04ee222009-09-05 01:31:32 +00007182 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00007183 .block_erasers =
7184 {
7185 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007186 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007187 {16 * 1024, 1},
7188 {8 * 1024, 2},
7189 {32 * 1024, 1},
7190 {64 * 1024, 7},
7191 },
Sean Nelson35727f72010-01-28 23:55:12 +00007192 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007193 }, {
7194 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00007195 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007196 },
7197 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007198 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007199 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00007200 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007201 .prepare_access = prepare_memory_access,
7202 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007203 },
7204
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007205 {
7206 .vendor = "Fujitsu",
7207 .name = "MBM29F004TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007208 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02007209 .id.type = ID_JEDEC,
7210 .id.manufacture = FUJITSU_ID,
7211 .id.model = FUJITSU_MBM29F004TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007212 .total_size = 512,
7213 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00007214 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007215 .tested = TEST_UNTESTED,
Udu Ogahc04ee222009-09-05 01:31:32 +00007216 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00007217 .block_erasers =
7218 {
7219 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007220 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007221 {64 * 1024, 7},
7222 {32 * 1024, 1},
7223 {8 * 1024, 2},
7224 {16 * 1024, 1},
7225 },
Sean Nelson35727f72010-01-28 23:55:12 +00007226 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007227 }, {
7228 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00007229 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007230 },
7231 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007232 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007233 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00007234 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007235 .prepare_access = prepare_memory_access,
7236 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007237 },
7238
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007239 {
Sean Nelson35727f72010-01-28 23:55:12 +00007240 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007241 .vendor = "Fujitsu",
7242 .name = "MBM29F400BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007243 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02007244 .id.type = ID_JEDEC,
7245 .id.manufacture = FUJITSU_ID,
7246 .id.model = FUJITSU_MBM29F400BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007247 .total_size = 512,
7248 .page_size = 64 * 1024,
Nico Huber0c39ddb2026-03-06 22:17:33 +01007249 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +00007250 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007251 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00007252 .block_erasers =
7253 {
7254 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007255 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007256 {16 * 1024, 1},
7257 {8 * 1024, 2},
7258 {32 * 1024, 1},
7259 {64 * 1024, 7},
7260 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007261 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007262 }, {
7263 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007264 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007265 },
7266 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007267 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007268 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007269 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007270 .prepare_access = prepare_memory_access,
7271 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007272 },
7273
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007274 {
7275 .vendor = "Fujitsu",
7276 .name = "MBM29F400TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007277 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02007278 .id.type = ID_JEDEC,
7279 .id.manufacture = FUJITSU_ID,
7280 .id.model = FUJITSU_MBM29F400TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007281 .total_size = 512,
7282 .page_size = 64 * 1024,
Nico Huber0c39ddb2026-03-06 22:17:33 +01007283 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007284 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007285 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00007286 .block_erasers =
7287 {
7288 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007289 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007290 {64 * 1024, 7},
7291 {32 * 1024, 1},
7292 {8 * 1024, 2},
7293 {16 * 1024, 1},
7294 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007295 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007296 }, {
7297 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007298 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007299 },
7300 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007301 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007302 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007303 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007304 .prepare_access = prepare_memory_access,
7305 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007306 },
7307
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007308 {
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007309 .vendor = "Fujitsu",
7310 .name = "MBM29LV160BE",
7311 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02007312 .id.type = ID_JEDEC,
7313 .id.manufacture = FUJITSU_ID,
7314 .id.model = FUJITSU_MBM29LV160BE,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007315 .total_size = 2 * 1024,
7316 .page_size = 0,
Nico Huber899d36a2026-03-06 22:22:22 +01007317 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_EITHER_RESET,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007318 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007319 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007320 .block_erasers =
7321 {
7322 {
7323 .eraseblocks = {
7324 {16 * 1024, 1},
7325 {8 * 1024, 2},
7326 {32 * 1024, 1},
7327 {64 * 1024, 31},
7328 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007329 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007330 }, {
7331 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007332 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007333 },
7334 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007335 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007336 .read = read_memmapped,
7337 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01007338 .prepare_access = prepare_memory_access,
7339 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007340 },
7341
7342 {
7343 .vendor = "Fujitsu",
7344 .name = "MBM29LV160TE",
7345 .bustype = BUS_PARALLEL,
Nico Huber11136c22023-05-01 12:00:09 +02007346 .id.type = ID_JEDEC,
7347 .id.manufacture = FUJITSU_ID,
7348 .id.model = FUJITSU_MBM29LV160TE,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007349 .total_size = 2 * 1024,
7350 .page_size = 0,
Nico Huber899d36a2026-03-06 22:22:22 +01007351 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_EITHER_RESET,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007352 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007353 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007354 .block_erasers =
7355 {
7356 {
7357 .eraseblocks = {
7358 {64 * 1024, 31},
7359 {32 * 1024, 1},
7360 {8 * 1024, 2},
7361 {16 * 1024, 1},
7362 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007363 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007364 }, {
7365 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007366 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007367 },
7368 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007369 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007370 .read = read_memmapped,
7371 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01007372 .prepare_access = prepare_memory_access,
7373 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007374 },
7375
7376 {
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007377 .vendor = "GigaDevice",
Nico Huberd4eb5322024-11-08 23:26:04 +01007378 .name = "GD25LF80E",
7379 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007380 .id.type = ID_SPI_RDID,
7381 .id.manufacture = GIGADEVICE_ID,
7382 .id.model = GIGADEVICE_GD25LF80E,
Nico Huberd4eb5322024-11-08 23:26:04 +01007383 .total_size = 1024,
7384 .page_size = 256,
7385 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7386 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7387 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7388 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7389 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7390 .tested = TEST_UNTESTED,
Nico Huberd4eb5322024-11-08 23:26:04 +01007391 .probe_timing = TIMING_ZERO,
7392 .block_erasers =
7393 {
7394 {
7395 .eraseblocks = { {4 * 1024, 256} },
7396 .block_erase = spi_block_erase_20,
7397 }, {
7398 .eraseblocks = { {32 * 1024, 32} },
7399 .block_erase = spi_block_erase_52,
7400 }, {
7401 .eraseblocks = { {64 * 1024, 16} },
7402 .block_erase = spi_block_erase_d8,
7403 }, {
7404 .eraseblocks = { {1024 * 1024, 1} },
7405 .block_erase = spi_block_erase_60,
7406 }, {
7407 .eraseblocks = { {1024 * 1024, 1} },
7408 .block_erase = spi_block_erase_c7,
7409 }
7410 },
7411 .printlock = spi_prettyprint_status_register_bp4_srwd,
7412 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7413 .write = spi_chip_write_256,
7414 .read = spi_chip_read,
7415 .voltage = {1650, 2000},
7416 .reg_bits =
7417 {
7418 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7419 .srp = {STATUS1, 7, RW},
7420 .srl = {STATUS2, 0, RW},
7421 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7422 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7423 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7424 .cmp = {STATUS2, 6, RW},
7425 },
7426 .wp_write_cfg = spi_wp_write_cfg,
7427 .wp_read_cfg = spi_wp_read_cfg,
7428 .wp_get_ranges = spi_wp_get_available_ranges,
7429 .decode_range = decode_range_spi25,
7430 .prepare_access = spi_prepare_io,
7431 .finish_access = spi_finish_io,
7432 },
7433
7434 {
7435 .vendor = "GigaDevice",
7436 .name = "GD25LF16E",
7437 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007438 .id.type = ID_SPI_RDID,
7439 .id.manufacture = GIGADEVICE_ID,
7440 .id.model = GIGADEVICE_GD25LF16E,
Nico Huberd4eb5322024-11-08 23:26:04 +01007441 .total_size = 2048,
7442 .page_size = 256,
7443 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7444 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7445 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7446 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7447 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7448 .tested = TEST_UNTESTED,
Nico Huberd4eb5322024-11-08 23:26:04 +01007449 .probe_timing = TIMING_ZERO,
7450 .block_erasers =
7451 {
7452 {
7453 .eraseblocks = { {4 * 1024, 512} },
7454 .block_erase = spi_block_erase_20,
7455 }, {
7456 .eraseblocks = { {32 * 1024, 64} },
7457 .block_erase = spi_block_erase_52,
7458 }, {
7459 .eraseblocks = { {64 * 1024, 32} },
7460 .block_erase = spi_block_erase_d8,
7461 }, {
7462 .eraseblocks = { {2048 * 1024, 1} },
7463 .block_erase = spi_block_erase_60,
7464 }, {
7465 .eraseblocks = { {2048 * 1024, 1} },
7466 .block_erase = spi_block_erase_c7,
7467 }
7468 },
7469 .printlock = spi_prettyprint_status_register_bp4_srwd,
7470 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7471 .write = spi_chip_write_256,
7472 .read = spi_chip_read,
7473 .voltage = {1650, 2000},
7474 .reg_bits =
7475 {
7476 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7477 .srp = {STATUS1, 7, RW},
7478 .srl = {STATUS2, 0, RW},
7479 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7480 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7481 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7482 .cmp = {STATUS2, 6, RW},
7483 },
7484 .wp_write_cfg = spi_wp_write_cfg,
7485 .wp_read_cfg = spi_wp_read_cfg,
7486 .wp_get_ranges = spi_wp_get_available_ranges,
7487 .decode_range = decode_range_spi25,
7488 .prepare_access = spi_prepare_io,
7489 .finish_access = spi_finish_io,
7490 },
7491
7492 {
7493 .vendor = "GigaDevice",
7494 .name = "GD25LF32E",
7495 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007496 .id.type = ID_SPI_RDID,
7497 .id.manufacture = GIGADEVICE_ID,
7498 .id.model = GIGADEVICE_GD25LF32E,
Nico Huberd4eb5322024-11-08 23:26:04 +01007499 .total_size = 4096,
7500 .page_size = 256,
7501 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7502 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7503 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7504 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7505 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7506 .tested = TEST_UNTESTED,
Nico Huberd4eb5322024-11-08 23:26:04 +01007507 .probe_timing = TIMING_ZERO,
7508 .block_erasers =
7509 {
7510 {
7511 .eraseblocks = { {4 * 1024, 1024} },
7512 .block_erase = spi_block_erase_20,
7513 }, {
7514 .eraseblocks = { {32 * 1024, 128} },
7515 .block_erase = spi_block_erase_52,
7516 }, {
7517 .eraseblocks = { {64 * 1024, 64} },
7518 .block_erase = spi_block_erase_d8,
7519 }, {
7520 .eraseblocks = { {4096 * 1024, 1} },
7521 .block_erase = spi_block_erase_60,
7522 }, {
7523 .eraseblocks = { {4096 * 1024, 1} },
7524 .block_erase = spi_block_erase_c7,
7525 }
7526 },
7527 .printlock = spi_prettyprint_status_register_bp4_srwd,
7528 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7529 .write = spi_chip_write_256,
7530 .read = spi_chip_read,
7531 .voltage = {1650, 2000},
7532 .reg_bits =
7533 {
7534 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7535 .srp = {STATUS1, 7, RW},
7536 .srl = {STATUS2, 0, RW},
7537 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7538 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7539 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7540 .cmp = {STATUS2, 6, RW},
7541 },
7542 .wp_write_cfg = spi_wp_write_cfg,
7543 .wp_read_cfg = spi_wp_read_cfg,
7544 .wp_get_ranges = spi_wp_get_available_ranges,
7545 .decode_range = decode_range_spi25,
7546 .prepare_access = spi_prepare_io,
7547 .finish_access = spi_finish_io,
7548 },
7549
7550 {
7551 .vendor = "GigaDevice",
7552 .name = "GD25LF64E",
7553 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007554 .id.type = ID_SPI_RDID,
7555 .id.manufacture = GIGADEVICE_ID,
7556 .id.model = GIGADEVICE_GD25LF64E,
Nico Huberd4eb5322024-11-08 23:26:04 +01007557 .total_size = 8192,
7558 .page_size = 256,
7559 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7560 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7561 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7562 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7563 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7564 .tested = TEST_UNTESTED,
Nico Huberd4eb5322024-11-08 23:26:04 +01007565 .probe_timing = TIMING_ZERO,
7566 .block_erasers =
7567 {
7568 {
7569 .eraseblocks = { {4 * 1024, 2048} },
7570 .block_erase = spi_block_erase_20,
7571 }, {
7572 .eraseblocks = { {32 * 1024, 256} },
7573 .block_erase = spi_block_erase_52,
7574 }, {
7575 .eraseblocks = { {64 * 1024, 128} },
7576 .block_erase = spi_block_erase_d8,
7577 }, {
7578 .eraseblocks = { {8192 * 1024, 1} },
7579 .block_erase = spi_block_erase_60,
7580 }, {
7581 .eraseblocks = { {8192 * 1024, 1} },
7582 .block_erase = spi_block_erase_c7,
7583 }
7584 },
7585 .printlock = spi_prettyprint_status_register_bp4_srwd,
7586 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7587 .write = spi_chip_write_256,
7588 .read = spi_chip_read,
7589 .voltage = {1650, 2000},
7590 .reg_bits =
7591 {
7592 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7593 .srp = {STATUS1, 7, RW},
7594 .srl = {STATUS2, 0, RW},
7595 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7596 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7597 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7598 .cmp = {STATUS2, 6, RW},
7599 },
7600 .wp_write_cfg = spi_wp_write_cfg,
7601 .wp_read_cfg = spi_wp_read_cfg,
7602 .wp_get_ranges = spi_wp_get_available_ranges,
7603 .decode_range = decode_range_spi25,
7604 .prepare_access = spi_prepare_io,
7605 .finish_access = spi_finish_io,
7606 },
7607
7608 {
7609 .vendor = "GigaDevice",
Nico Huber3646b182024-11-08 23:44:37 +01007610 .name = "GD25LF128E",
7611 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007612 .id.type = ID_SPI_RDID,
7613 .id.manufacture = GIGADEVICE_ID,
7614 .id.model = GIGADEVICE_GD25LF128E,
Nico Huber3646b182024-11-08 23:44:37 +01007615 .total_size = 16384,
7616 .page_size = 256,
7617 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7618 /* Supports fast-read quad-i/o (0xeb) but with non-volatile DC bits. */
7619 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7620 FEATURE_OTP | (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7621 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7622 .tested = TEST_UNTESTED,
Nico Huber3646b182024-11-08 23:44:37 +01007623 .probe_timing = TIMING_ZERO,
7624 .block_erasers =
7625 {
7626 {
7627 .eraseblocks = { {4 * 1024, 4096} },
7628 .block_erase = spi_block_erase_20,
7629 }, {
7630 .eraseblocks = { {32 * 1024, 512} },
7631 .block_erase = spi_block_erase_52,
7632 }, {
7633 .eraseblocks = { {64 * 1024, 256} },
7634 .block_erase = spi_block_erase_d8,
7635 }, {
7636 .eraseblocks = { {16384 * 1024, 1} },
7637 .block_erase = spi_block_erase_60,
7638 }, {
7639 .eraseblocks = { {16384 * 1024, 1} },
7640 .block_erase = spi_block_erase_c7,
7641 }
7642 },
7643 .printlock = spi_prettyprint_status_register_bp4_srwd,
7644 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7645 .write = spi_chip_write_256,
7646 .read = spi_chip_read,
7647 .voltage = {1650, 2000},
7648 .reg_bits =
7649 {
7650 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7651 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
7652 .srp = {STATUS1, 7, RW},
7653 .srl = {STATUS2, 0, RW},
7654 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7655 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7656 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7657 .cmp = {STATUS2, 6, RW},
7658 },
7659 .wp_write_cfg = spi_wp_write_cfg,
7660 .wp_read_cfg = spi_wp_read_cfg,
7661 .wp_get_ranges = spi_wp_get_available_ranges,
7662 .decode_range = decode_range_spi25,
7663 .prepare_access = spi_prepare_io,
7664 .finish_access = spi_finish_io,
7665 },
7666
7667 {
7668 .vendor = "GigaDevice",
Edward O'Callaghan981a3442021-06-22 11:16:55 +10007669 .name = "GD25LQ128C/GD25LQ128D/GD25LQ128E",
Roman Titov95edc892015-04-03 21:29:04 +00007670 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007671 .id.type = ID_SPI_RDID,
7672 .id.manufacture = GIGADEVICE_ID,
7673 .id.model = GIGADEVICE_GD25LQ128CD,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007674 .total_size = 16384,
Roman Titov95edc892015-04-03 21:29:04 +00007675 .page_size = 256,
Nico Huber7d0f5562024-11-08 15:06:22 +01007676 /* OTP: 3x 512B, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7677 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber4da971f2024-03-27 01:18:12 +01007678 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007679 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00007680 .probe_timing = TIMING_ZERO,
7681 .block_erasers =
7682 {
7683 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007684 .eraseblocks = { {4 * 1024, 4096} },
Roman Titov95edc892015-04-03 21:29:04 +00007685 .block_erase = spi_block_erase_20,
7686 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007687 .eraseblocks = { {32 * 1024, 512} },
Roman Titov95edc892015-04-03 21:29:04 +00007688 .block_erase = spi_block_erase_52,
7689 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007690 .eraseblocks = { {64 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00007691 .block_erase = spi_block_erase_d8,
7692 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007693 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00007694 .block_erase = spi_block_erase_60,
7695 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007696 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00007697 .block_erase = spi_block_erase_c7,
7698 }
7699 },
7700 .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 Huber7d0f5562024-11-08 15:06:22 +01007704 .voltage = {1650, 1950},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007705 .reg_bits =
7706 {
Nico Huber4da971f2024-03-27 01:18:12 +01007707 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007708 .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 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007715 .wp_write_cfg = spi_wp_write_cfg,
7716 .wp_read_cfg = spi_wp_read_cfg,
7717 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007718 .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",
7725 .name = "GD25LQ16",
7726 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007727 .id.type = ID_SPI_RDID,
7728 .id.manufacture = GIGADEVICE_ID,
7729 .id.model = GIGADEVICE_GD25LQ16,
Roman Titov95edc892015-04-03 21:29:04 +00007730 .total_size = 2048,
7731 .page_size = 256,
Nico Huber7f8c12d2024-11-08 14:24:14 +01007732 /* OTP: 1024B total, 256B reserved, later 3x 512B; read 0x48; write 0x42, erase 0x44 */
7733 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for L.16C */
7734 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00007735 .tested = TEST_UNTESTED,
Roman Titov95edc892015-04-03 21:29:04 +00007736 .probe_timing = TIMING_ZERO,
7737 .block_erasers =
7738 {
7739 {
7740 .eraseblocks = { {4 * 1024, 512} },
7741 .block_erase = spi_block_erase_20,
7742 }, {
7743 .eraseblocks = { {32 * 1024, 64} },
7744 .block_erase = spi_block_erase_52,
7745 }, {
7746 .eraseblocks = { {64 * 1024, 32} },
7747 .block_erase = spi_block_erase_d8,
7748 }, {
7749 .eraseblocks = { {2 * 1024 * 1024, 1} },
7750 .block_erase = spi_block_erase_60,
7751 }, {
7752 .eraseblocks = { {2 * 1024 * 1024, 1} },
7753 .block_erase = spi_block_erase_c7,
7754 }
7755 },
Nico Huber7f8c12d2024-11-08 14:24:14 +01007756 .printlock = spi_prettyprint_status_register_bp4_srwd,
7757 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7758 .write = spi_chip_write_256,
7759 .read = spi_chip_read,
7760 .voltage = {1650, 1950}, /* 16C, 16E: up to 2.1V */
Nico Huber4da971f2024-03-27 01:18:12 +01007761 .reg_bits =
7762 {
7763 .qe = {STATUS2, 1, RW},
Nico Huber7f8c12d2024-11-08 14:24:14 +01007764 .srp = {STATUS1, 7, RW},
7765 .srl = {STATUS2, 0, RW},
7766 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7767 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7768 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7769 .cmp = {STATUS2, 6, RW},
7770 },
7771 .wp_write_cfg = spi_wp_write_cfg,
7772 .wp_read_cfg = spi_wp_read_cfg,
7773 .wp_get_ranges = spi_wp_get_available_ranges,
7774 .decode_range = decode_range_spi25,
7775 .prepare_access = spi_prepare_io,
7776 .finish_access = spi_finish_io,
7777 },
7778
7779 {
7780 .vendor = "GigaDevice",
7781 .name = "GD25LQ20",
7782 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007783 .id.type = ID_SPI_RDID,
7784 .id.manufacture = GIGADEVICE_ID,
7785 .id.model = GIGADEVICE_GD25LQ20,
Nico Huber7f8c12d2024-11-08 14:24:14 +01007786 .total_size = 256,
7787 .page_size = 256,
7788 /* OTP: 3x 512B; read 0x48; write 0x42, erase 0x44 */
7789 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
7790 .tested = TEST_UNTESTED,
Nico Huber7f8c12d2024-11-08 14:24:14 +01007791 .probe_timing = TIMING_ZERO,
7792 .block_erasers =
7793 {
7794 {
7795 .eraseblocks = { {4 * 1024, 64} },
7796 .block_erase = spi_block_erase_20,
7797 }, {
7798 .eraseblocks = { {32 * 1024, 8} },
7799 .block_erase = spi_block_erase_52,
7800 }, {
7801 .eraseblocks = { {64 * 1024, 4} },
7802 .block_erase = spi_block_erase_d8,
7803 }, {
7804 .eraseblocks = { {256 * 1024, 1} },
7805 .block_erase = spi_block_erase_60,
7806 }, {
7807 .eraseblocks = { {256 * 1024, 1} },
7808 .block_erase = spi_block_erase_c7,
7809 }
Nico Huber4da971f2024-03-27 01:18:12 +01007810 },
Roman Titov95edc892015-04-03 21:29:04 +00007811 .printlock = spi_prettyprint_status_register_bp4_srwd,
7812 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7813 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007814 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01007815 .voltage = {1650, 1950}, /* 20C: up to 2.1V, 20E: up to 2.0V */
7816 .reg_bits =
7817 {
7818 .qe = {STATUS2, 1, RW},
7819 .srp = {STATUS1, 7, RW},
7820 .srl = {STATUS2, 0, RW},
7821 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7822 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7823 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7824 .cmp = {STATUS2, 6, RW},
7825 },
7826 .wp_write_cfg = spi_wp_write_cfg,
7827 .wp_read_cfg = spi_wp_read_cfg,
7828 .wp_get_ranges = spi_wp_get_available_ranges,
7829 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007830 .prepare_access = spi_prepare_io,
7831 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00007832 },
7833
7834 {
7835 .vendor = "GigaDevice",
Nico Huberbc001da2024-11-08 17:11:56 +01007836 .name = "GD25LQ256D/GD25LE256D/GD25LB256D/GD25LQ255E",
7837 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007838 .id.type = ID_SPI_RDID,
7839 .id.manufacture = GIGADEVICE_ID,
7840 .id.model = GIGADEVICE_GD25LQ256D,
Nico Huberbc001da2024-11-08 17:11:56 +01007841 .total_size = 32768,
7842 .page_size = 256,
7843 /* GD25LQ255E also supports native 4BA commands, EAR. */
7844 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7845 FEATURE_4BA_ENTER | FEATURE_QPI_SRP,
7846 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7847 .tested = TEST_UNTESTED,
Nico Huberbc001da2024-11-08 17:11:56 +01007848 .probe_timing = TIMING_ZERO,
7849 .block_erasers =
7850 {
7851 {
7852 .eraseblocks = { {4 * 1024, 8192} },
7853 .block_erase = spi_block_erase_20,
7854 }, {
7855 .eraseblocks = { {32 * 1024, 1024} },
7856 .block_erase = spi_block_erase_52,
7857 }, {
7858 .eraseblocks = { {64 * 1024, 512} },
7859 .block_erase = spi_block_erase_d8,
7860 }, {
7861 .eraseblocks = { {32 * 1024 * 1024, 1} },
7862 .block_erase = spi_block_erase_60,
7863 }, {
7864 .eraseblocks = { {32 * 1024 * 1024, 1} },
7865 .block_erase = spi_block_erase_c7,
7866 }
7867 },
7868 .printlock = spi_prettyprint_status_register_bp4_srwd,
7869 .unlock = spi_disable_blockprotect_bp4_srwd,
7870 .write = spi_chip_write_256,
7871 .read = spi_chip_read,
7872 .voltage = {1650, 2000},
7873 .reg_bits =
7874 {
7875 .qe = {STATUS2, 1, RW}, /* GD25LB256D: Fixed QE=1 */
7876 .srp = {STATUS1, 7, RW},
7877 .srl = {STATUS2, 0, RW},
7878 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7879 .tb = {STATUS1, 5, RW},
7880 .sec = {STATUS1, 6, RW},
7881 .cmp = {STATUS2, 6, RW},
7882 },
7883 .wp_write_cfg = spi_wp_write_cfg,
7884 .wp_read_cfg = spi_wp_read_cfg,
7885 .wp_get_ranges = spi_wp_get_available_ranges,
7886 .decode_range = decode_range_spi25,
7887 .prepare_access = spi_prepare_io,
7888 .finish_access = spi_finish_io,
7889 },
7890
7891 {
7892 .vendor = "GigaDevice",
7893 .name = "GD25LQ256H/GD25LE256H/GD25LB256F",
7894 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007895 .id.type = ID_SPI_RDID,
7896 .id.manufacture = GIGADEVICE_ID,
7897 .id.model = GIGADEVICE_GD25LQ256D,
Nico Huberbc001da2024-11-08 17:11:56 +01007898 .total_size = 32768,
7899 .page_size = 256,
7900 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
7901 /* LE256H supports DTR. */
7902 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7903 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
7904 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
7905 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7906 .tested = TEST_UNTESTED,
Nico Huberbc001da2024-11-08 17:11:56 +01007907 .probe_timing = TIMING_ZERO,
7908 .block_erasers =
7909 {
7910 {
7911 .eraseblocks = { {4 * 1024, 8192} },
7912 .block_erase = spi_block_erase_21,
7913 }, {
7914 .eraseblocks = { {4 * 1024, 8192} },
7915 .block_erase = spi_block_erase_20,
7916 }, {
7917 .eraseblocks = { {32 * 1024, 1024} },
7918 .block_erase = spi_block_erase_5c,
7919 }, {
7920 .eraseblocks = { {32 * 1024, 1024} },
7921 .block_erase = spi_block_erase_52,
7922 }, {
7923 .eraseblocks = { {64 * 1024, 512} },
7924 .block_erase = spi_block_erase_dc,
7925 }, {
7926 .eraseblocks = { {64 * 1024, 512} },
7927 .block_erase = spi_block_erase_d8,
7928 }, {
7929 .eraseblocks = { {32 * 1024 * 1024, 1} },
7930 .block_erase = spi_block_erase_60,
7931 }, {
7932 .eraseblocks = { {32 * 1024 * 1024, 1} },
7933 .block_erase = spi_block_erase_c7,
7934 }
7935 },
7936 .printlock = spi_prettyprint_status_register_bp4_srwd,
7937 .unlock = spi_disable_blockprotect_bp4_srwd,
7938 .write = spi_chip_write_256,
7939 .read = spi_chip_read,
7940 .voltage = {1650, 2000},
7941 .reg_bits =
7942 {
7943 .qe = {STATUS2, 1, RW}, /* GD25LB256F: Fixed QE=1 */
7944 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
7945 .srp = {STATUS1, 7, RW},
7946 .srl = {STATUS2, 0, RW},
7947 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7948 .tb = {STATUS1, 6, RW},
7949 .cmp = {STATUS2, 6, RW},
7950 },
7951 .wp_write_cfg = spi_wp_write_cfg,
7952 .wp_read_cfg = spi_wp_read_cfg,
7953 .wp_get_ranges = spi_wp_get_available_ranges,
7954 .decode_range = decode_range_spi25,
7955 .prepare_access = spi_prepare_io,
7956 .finish_access = spi_finish_io,
7957 },
7958
7959 {
7960 .vendor = "GigaDevice",
7961 .name = "GD25LE255E",
7962 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02007963 .id.type = ID_SPI_RDID,
7964 .id.manufacture = GIGADEVICE_ID,
7965 .id.model = GIGADEVICE_GD25LQ256D,
Nico Huberbc001da2024-11-08 17:11:56 +01007966 .total_size = 32768,
7967 .page_size = 256,
7968 /* Non-volatile DC bits control SPI mode, hence disable fast-read commands. */
7969 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7970 FEATURE_OTP | (FEATURE_4BA & ~FEATURE_4BA_FAST_READ) |
7971 FEATURE_FAST_READ_QPI4B | (FEATURE_QPI_SRP & ~FEATURE_QIO),
Nico Hubere0600182025-03-01 12:29:28 +01007972 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 0 } },
Nico Huberbc001da2024-11-08 17:11:56 +01007973 .tested = TEST_UNTESTED,
Nico Huberbc001da2024-11-08 17:11:56 +01007974 .probe_timing = TIMING_ZERO,
7975 .block_erasers =
7976 {
7977 {
7978 .eraseblocks = { {4 * 1024, 8192} },
7979 .block_erase = spi_block_erase_21,
7980 }, {
7981 .eraseblocks = { {4 * 1024, 8192} },
7982 .block_erase = spi_block_erase_20,
7983 }, {
7984 .eraseblocks = { {32 * 1024, 1024} },
7985 .block_erase = spi_block_erase_5c,
7986 }, {
7987 .eraseblocks = { {32 * 1024, 1024} },
7988 .block_erase = spi_block_erase_52,
7989 }, {
7990 .eraseblocks = { {64 * 1024, 512} },
7991 .block_erase = spi_block_erase_dc,
7992 }, {
7993 .eraseblocks = { {64 * 1024, 512} },
7994 .block_erase = spi_block_erase_d8,
7995 }, {
7996 .eraseblocks = { {32 * 1024 * 1024, 1} },
7997 .block_erase = spi_block_erase_60,
7998 }, {
7999 .eraseblocks = { {32 * 1024 * 1024, 1} },
8000 .block_erase = spi_block_erase_c7,
8001 }
8002 },
8003 .printlock = spi_prettyprint_status_register_bp4_srwd,
8004 .unlock = spi_disable_blockprotect_bp4_srwd,
8005 .write = spi_chip_write_256,
8006 .read = spi_chip_read,
8007 .voltage = {1650, 2000},
8008 .reg_bits =
8009 {
8010 .qe = {STATUS2, 1, RW},
8011 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8012 .srp = {STATUS1, 7, RW},
8013 .srl = {STATUS2, 0, RW},
8014 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8015 .tb = {STATUS1, 6, RW},
8016 },
8017 .wp_write_cfg = spi_wp_write_cfg,
8018 .wp_read_cfg = spi_wp_read_cfg,
8019 .wp_get_ranges = spi_wp_get_available_ranges,
8020 .decode_range = decode_range_spi25,
8021 .prepare_access = spi_prepare_io,
8022 .finish_access = spi_finish_io,
8023 },
8024
8025 {
8026 .vendor = "GigaDevice",
Nico Huber06fbccc2024-11-08 17:36:28 +01008027 .name = "GD25LB256E/GD25LR256E",
8028 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008029 .id.type = ID_SPI_RDID,
8030 .id.manufacture = GIGADEVICE_ID,
8031 .id.model = GIGADEVICE_GD25LB256E,
Nico Huber06fbccc2024-11-08 17:36:28 +01008032 .total_size = 32768,
8033 .page_size = 256,
8034 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8035 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
8036 .tested = TEST_UNTESTED,
Nico Huber06fbccc2024-11-08 17:36:28 +01008037 .probe_timing = TIMING_ZERO,
8038 .block_erasers =
8039 {
8040 {
8041 .eraseblocks = { {4 * 1024, 8192} },
8042 .block_erase = spi_block_erase_21,
8043 }, {
8044 .eraseblocks = { {4 * 1024, 8192} },
8045 .block_erase = spi_block_erase_20,
8046 }, {
8047 .eraseblocks = { {32 * 1024, 1024} },
8048 .block_erase = spi_block_erase_5c,
8049 }, {
8050 .eraseblocks = { {32 * 1024, 1024} },
8051 .block_erase = spi_block_erase_52,
8052 }, {
8053 .eraseblocks = { {64 * 1024, 512} },
8054 .block_erase = spi_block_erase_dc,
8055 }, {
8056 .eraseblocks = { {64 * 1024, 512} },
8057 .block_erase = spi_block_erase_d8,
8058 }, {
8059 .eraseblocks = { {32 * 1024 * 1024, 1} },
8060 .block_erase = spi_block_erase_60,
8061 }, {
8062 .eraseblocks = { {32 * 1024 * 1024, 1} },
8063 .block_erase = spi_block_erase_c7,
8064 }
8065 },
8066 /* Has WPS bit in unsupported register. */
8067 .printlock = spi_prettyprint_status_register_bp4_srwd,
8068 .unlock = spi_disable_blockprotect_bp4_srwd,
8069 .write = spi_chip_write_256,
8070 .read = spi_chip_read,
8071 .voltage = {1650, 2000},
8072 .prepare_access = spi_prepare_io,
8073 .finish_access = spi_finish_io,
8074 },
8075
8076 {
8077 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008078 .name = "GD25LQ32",
8079 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008080 .id.type = ID_SPI_RDID,
8081 .id.manufacture = GIGADEVICE_ID,
8082 .id.model = GIGADEVICE_GD25LQ32,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008083 .total_size = 4096,
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 } },
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008088 .tested = TEST_OK_PREW,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008089 .probe_timing = TIMING_ZERO,
8090 .block_erasers =
8091 {
8092 {
8093 .eraseblocks = { {4 * 1024, 1024} },
8094 .block_erase = spi_block_erase_20,
8095 }, {
8096 .eraseblocks = { {32 * 1024, 128} },
8097 .block_erase = spi_block_erase_52,
8098 }, {
8099 .eraseblocks = { {64 * 1024, 64} },
8100 .block_erase = spi_block_erase_d8,
8101 }, {
8102 .eraseblocks = { {4 * 1024 * 1024, 1} },
8103 .block_erase = spi_block_erase_60,
8104 }, {
8105 .eraseblocks = { {4 * 1024 * 1024, 1} },
8106 .block_erase = spi_block_erase_c7,
8107 }
8108 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00008109 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008110 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8111 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008112 .read = spi_chip_read,
Nico Huber7d0f5562024-11-08 15:06:22 +01008113 .voltage = {1650, 1950},
8114 .reg_bits =
8115 {
8116 .qe = {STATUS2, 1, RW},
8117 .srp = {STATUS1, 7, RW},
8118 .srl = {STATUS2, 0, RW},
8119 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8120 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8121 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8122 .cmp = {STATUS2, 6, RW},
8123 },
8124 .wp_write_cfg = spi_wp_write_cfg,
8125 .wp_read_cfg = spi_wp_read_cfg,
8126 .wp_get_ranges = spi_wp_get_available_ranges,
8127 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008128 .prepare_access = spi_prepare_io,
8129 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00008130 },
8131
8132 {
8133 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008134 .name = "GD25LQ40",
8135 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008136 .id.type = ID_SPI_RDID,
8137 .id.manufacture = GIGADEVICE_ID,
8138 .id.model = GIGADEVICE_GD25LQ40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008139 .total_size = 512,
8140 .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 */
8142 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ40B, LQ40C, LQ40E */
8143 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008144 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008145 .probe_timing = TIMING_ZERO,
8146 .block_erasers =
8147 {
8148 {
8149 .eraseblocks = { {4 * 1024, 128} },
8150 .block_erase = spi_block_erase_20,
8151 }, {
8152 .eraseblocks = { {32 * 1024, 16} },
8153 .block_erase = spi_block_erase_52,
8154 }, {
8155 .eraseblocks = { {64 * 1024, 8} },
8156 .block_erase = spi_block_erase_d8,
8157 }, {
8158 .eraseblocks = { {512 * 1024, 1} },
8159 .block_erase = spi_block_erase_60,
8160 }, {
8161 .eraseblocks = { {512 * 1024, 1} },
8162 .block_erase = spi_block_erase_c7,
8163 }
8164 },
8165 .printlock = spi_prettyprint_status_register_bp4_srwd,
8166 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8167 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008168 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008169 .voltage = {1650, 1950}, /* 40C: up to 2.1V, 40E: up to 2.0V */
8170 .reg_bits =
8171 {
8172 .qe = {STATUS2, 1, RW},
8173 .srp = {STATUS1, 7, RW},
8174 .srl = {STATUS2, 0, RW},
8175 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8176 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8177 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8178 .cmp = {STATUS2, 6, RW},
8179 },
8180 .wp_write_cfg = spi_wp_write_cfg,
8181 .wp_read_cfg = spi_wp_read_cfg,
8182 .wp_get_ranges = spi_wp_get_available_ranges,
8183 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008184 .prepare_access = spi_prepare_io,
8185 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008186 },
8187
8188 {
8189 .vendor = "GigaDevice",
Roman Titov95edc892015-04-03 21:29:04 +00008190 .name = "GD25LQ64(B)",
8191 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008192 .id.type = ID_SPI_RDID,
8193 .id.manufacture = GIGADEVICE_ID,
8194 .id.model = GIGADEVICE_GD25LQ64,
Roman Titov95edc892015-04-03 21:29:04 +00008195 .total_size = 8192,
8196 .page_size = 256,
Nico Huber7d0f5562024-11-08 15:06:22 +01008197 /* OTP: 1024B total, 256B reserved, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
8198 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber4da971f2024-03-27 01:18:12 +01008199 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03008200 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00008201 .probe_timing = TIMING_ZERO,
8202 .block_erasers =
8203 {
8204 {
8205 .eraseblocks = { {4 * 1024, 2048} },
8206 .block_erase = spi_block_erase_20,
8207 }, {
8208 .eraseblocks = { {32 * 1024, 256} },
8209 .block_erase = spi_block_erase_52,
8210 }, {
8211 .eraseblocks = { {64 * 1024, 128} },
8212 .block_erase = spi_block_erase_d8,
8213 }, {
8214 .eraseblocks = { {8 * 1024 * 1024, 1} },
8215 .block_erase = spi_block_erase_60,
8216 }, {
8217 .eraseblocks = { {8 * 1024 * 1024, 1} },
8218 .block_erase = spi_block_erase_c7,
8219 }
8220 },
8221 .printlock = spi_prettyprint_status_register_bp4_srwd,
8222 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8223 .write = spi_chip_write_256,
Nico Huber7d0f5562024-11-08 15:06:22 +01008224 .read = spi_chip_read,
8225 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008226 .reg_bits =
8227 {
Nico Huber4da971f2024-03-27 01:18:12 +01008228 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008229 .srp = {STATUS1, 7, RW},
8230 .srl = {STATUS2, 0, RW},
8231 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8232 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8233 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8234 .cmp = {STATUS2, 6, RW},
8235 },
Nico Huberaabb3e02023-01-13 00:22:30 +01008236 .wp_write_cfg = spi_wp_write_cfg,
8237 .wp_read_cfg = spi_wp_read_cfg,
8238 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008239 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008240 .prepare_access = spi_prepare_io,
8241 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00008242 },
8243
8244 {
8245 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008246 .name = "GD25LQ80",
Roman Titov95edc892015-04-03 21:29:04 +00008247 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008248 .id.type = ID_SPI_RDID,
8249 .id.manufacture = GIGADEVICE_ID,
8250 .id.model = GIGADEVICE_GD25LQ80,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008251 .total_size = 1024,
Roman Titov95edc892015-04-03 21:29:04 +00008252 .page_size = 256,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008253 /* OTP: 1024B total, 256B reserved, later 3x 512B; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01008254 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ80B, LQ80C */
Nico Huber7f8c12d2024-11-08 14:24:14 +01008255 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00008256 .tested = TEST_UNTESTED,
Roman Titov95edc892015-04-03 21:29:04 +00008257 .probe_timing = TIMING_ZERO,
8258 .block_erasers =
8259 {
8260 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008261 .eraseblocks = { {4 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00008262 .block_erase = spi_block_erase_20,
8263 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008264 .eraseblocks = { {32 * 1024, 32} },
Roman Titov95edc892015-04-03 21:29:04 +00008265 .block_erase = spi_block_erase_52,
8266 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008267 .eraseblocks = { {64 * 1024, 16} },
Roman Titov95edc892015-04-03 21:29:04 +00008268 .block_erase = spi_block_erase_d8,
8269 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008270 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00008271 .block_erase = spi_block_erase_60,
8272 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008273 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00008274 .block_erase = spi_block_erase_c7,
8275 }
8276 },
8277 .printlock = spi_prettyprint_status_register_bp4_srwd,
8278 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8279 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008280 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008281 .voltage = {1650, 1950}, /* 80C: up to 2.1V, 80E: up to 2.0V */
8282 .reg_bits =
8283 {
8284 .qe = {STATUS2, 1, RW},
8285 .srp = {STATUS1, 7, RW},
8286 .srl = {STATUS2, 0, RW},
8287 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8288 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8289 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8290 .cmp = {STATUS2, 6, RW},
8291 },
8292 .wp_write_cfg = spi_wp_write_cfg,
8293 .wp_read_cfg = spi_wp_read_cfg,
8294 .wp_get_ranges = spi_wp_get_available_ranges,
8295 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008296 .prepare_access = spi_prepare_io,
8297 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008298 },
8299
8300 {
8301 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008302 .name = "GD25LB512ME/GD25LR512ME",
Naresh Solanki768cfc42024-10-04 20:17:34 +05308303 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008304 .id.type = ID_SPI_RDID,
8305 .id.manufacture = GIGADEVICE_ID,
8306 .id.model = GIGADEVICE_GD25LB512ME,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308307 .total_size = 65536,
8308 .page_size = 256,
Nico Huber1da02932024-11-08 17:56:39 +01008309 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8310 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308311 .tested = TEST_OK_PREW,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308312 .probe_timing = TIMING_ZERO,
8313 .block_erasers =
8314 {
8315 {
8316 .eraseblocks = { {4 * 1024, 16384} },
8317 .block_erase = spi_block_erase_21,
8318 }, {
8319 .eraseblocks = { {4 * 1024, 16384} },
8320 .block_erase = spi_block_erase_20,
8321 }, {
8322 .eraseblocks = { {32 * 1024, 2048} },
Nico Huber1da02932024-11-08 17:56:39 +01008323 .block_erase = spi_block_erase_5c,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308324 }, {
8325 .eraseblocks = { {32 * 1024, 2048} },
Nico Huber1da02932024-11-08 17:56:39 +01008326 .block_erase = spi_block_erase_52,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308327 }, {
8328 .eraseblocks = { {64 * 1024, 1024} },
8329 .block_erase = spi_block_erase_dc,
8330 }, {
8331 .eraseblocks = { {64 * 1024, 1024} },
8332 .block_erase = spi_block_erase_d8,
8333 }, {
8334 .eraseblocks = { {64 * 1024 * 1024, 1} },
8335 .block_erase = spi_block_erase_60,
8336 }, {
8337 .eraseblocks = { {64 * 1024 * 1024, 1} },
8338 .block_erase = spi_block_erase_c7,
8339 }
8340 },
Nico Huber1da02932024-11-08 17:56:39 +01008341 /* Has WPS bit in unsupported register. */
8342 .printlock = spi_prettyprint_status_register_bp4_srwd,
8343 .unlock = spi_disable_blockprotect_bp4_srwd,
8344 .write = spi_chip_write_256,
8345 .read = spi_chip_read,
8346 .voltage = {1650, 2000},
8347 .prepare_access = spi_prepare_io,
8348 .finish_access = spi_finish_io,
8349 },
8350
8351 {
8352 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008353 .name = "GD25LB512MF/GD25LR512MF",
8354 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008355 .id.type = ID_SPI_RDID,
8356 .id.manufacture = GIGADEVICE_ID,
8357 .id.model = GIGADEVICE_GD25LB512MF,
Nico Huber38d037f2024-11-08 18:25:55 +01008358 .total_size = 65536,
8359 .page_size = 256,
8360 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8361 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8362 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8363 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8364 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8365 .tested = TEST_UNTESTED,
Nico Huber38d037f2024-11-08 18:25:55 +01008366 .probe_timing = TIMING_ZERO,
8367 .block_erasers =
8368 {
8369 {
8370 .eraseblocks = { {4 * 1024, 16384} },
8371 .block_erase = spi_block_erase_21,
8372 }, {
8373 .eraseblocks = { {4 * 1024, 16384} },
8374 .block_erase = spi_block_erase_20,
8375 }, {
8376 .eraseblocks = { {32 * 1024, 2048} },
8377 .block_erase = spi_block_erase_52,
8378 }, {
8379 .eraseblocks = { {32 * 1024, 2048} },
8380 .block_erase = spi_block_erase_5c,
8381 }, {
8382 .eraseblocks = { {64 * 1024, 1024} },
8383 .block_erase = spi_block_erase_dc,
8384 }, {
8385 .eraseblocks = { {64 * 1024, 1024} },
8386 .block_erase = spi_block_erase_d8,
8387 }, {
8388 .eraseblocks = { {64 * 1024 * 1024, 1} },
8389 .block_erase = spi_block_erase_60,
8390 }, {
8391 .eraseblocks = { {64 * 1024 * 1024, 1} },
8392 .block_erase = spi_block_erase_c7,
8393 }
8394 },
8395 .printlock = spi_prettyprint_status_register_bp4_srwd,
8396 .unlock = spi_disable_blockprotect_bp4_srwd,
8397 .write = spi_chip_write_256,
8398 .read = spi_chip_read,
8399 .voltage = {1650, 2000},
8400 .reg_bits =
8401 {
8402 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8403 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8404 .srp = {STATUS1, 7, RW},
8405 .srl = {STATUS2, 0, RW},
8406 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8407 .tb = {STATUS1, 6, RW},
8408 .cmp = {STATUS2, 6, RW},
8409 },
8410 .wp_write_cfg = spi_wp_write_cfg,
8411 .wp_read_cfg = spi_wp_read_cfg,
8412 .wp_get_ranges = spi_wp_get_available_ranges,
8413 .decode_range = decode_range_spi25,
8414 .prepare_access = spi_prepare_io,
8415 .finish_access = spi_finish_io,
8416 },
8417
8418 {
8419 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008420 .name = "GD55LB01GE",
8421 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008422 .id.type = ID_SPI_RDID,
8423 .id.manufacture = GIGADEVICE_ID,
8424 .id.model = GIGADEVICE_GD55LB01GE,
Nico Huber1da02932024-11-08 17:56:39 +01008425 .total_size = 128 * 1024,
8426 .page_size = 256,
8427 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8428 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
8429 .tested = TEST_UNTESTED,
Nico Huber1da02932024-11-08 17:56:39 +01008430 .probe_timing = TIMING_ZERO,
8431 .block_erasers =
8432 {
8433 {
8434 .eraseblocks = { {4 * 1024, 32768} },
8435 .block_erase = spi_block_erase_21,
8436 }, {
8437 .eraseblocks = { {4 * 1024, 32768} },
8438 .block_erase = spi_block_erase_20,
8439 }, {
8440 .eraseblocks = { {32 * 1024, 4096} },
8441 .block_erase = spi_block_erase_5c,
8442 }, {
8443 .eraseblocks = { {32 * 1024, 4096} },
8444 .block_erase = spi_block_erase_52,
8445 }, {
8446 .eraseblocks = { {64 * 1024, 2048} },
8447 .block_erase = spi_block_erase_dc,
8448 }, {
8449 .eraseblocks = { {64 * 1024, 2048} },
8450 .block_erase = spi_block_erase_d8,
8451 }, {
8452 .eraseblocks = { {128 * 1024 * 1024, 1} },
8453 .block_erase = spi_block_erase_60,
8454 }, {
8455 .eraseblocks = { {128 * 1024 * 1024, 1} },
8456 .block_erase = spi_block_erase_c7,
8457 }
8458 },
8459 /* Has WPS bit in unsupported register. */
8460 .printlock = spi_prettyprint_status_register_bp4_srwd,
8461 .unlock = spi_disable_blockprotect_bp4_srwd,
8462 .write = spi_chip_write_256,
8463 .read = spi_chip_read,
8464 .voltage = {1650, 2000},
8465 .prepare_access = spi_prepare_io,
8466 .finish_access = spi_finish_io,
8467 },
8468
8469 {
8470 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008471 .name = "GD55LB01GF",
8472 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008473 .id.type = ID_SPI_RDID,
8474 .id.manufacture = GIGADEVICE_ID,
8475 .id.model = GIGADEVICE_GD55LB01GF,
Nico Huber38d037f2024-11-08 18:25:55 +01008476 .total_size = 128 * 1024,
8477 .page_size = 256,
8478 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8479 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8480 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8481 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8482 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8483 .tested = TEST_UNTESTED,
Nico Huber38d037f2024-11-08 18:25:55 +01008484 .probe_timing = TIMING_ZERO,
8485 .block_erasers =
8486 {
8487 {
8488 .eraseblocks = { {4 * 1024, 32768} },
8489 .block_erase = spi_block_erase_21,
8490 }, {
8491 .eraseblocks = { {4 * 1024, 32768} },
8492 .block_erase = spi_block_erase_20,
8493 }, {
8494 .eraseblocks = { {32 * 1024, 4096} },
8495 .block_erase = spi_block_erase_52,
8496 }, {
8497 .eraseblocks = { {32 * 1024, 4096} },
8498 .block_erase = spi_block_erase_5c,
8499 }, {
8500 .eraseblocks = { {64 * 1024, 2048} },
8501 .block_erase = spi_block_erase_dc,
8502 }, {
8503 .eraseblocks = { {64 * 1024, 2048} },
8504 .block_erase = spi_block_erase_d8,
8505 }, {
8506 .eraseblocks = { {128 * 1024 * 1024, 1} },
8507 .block_erase = spi_block_erase_60,
8508 }, {
8509 .eraseblocks = { {128 * 1024 * 1024, 1} },
8510 .block_erase = spi_block_erase_c7,
8511 }
8512 },
8513 .printlock = spi_prettyprint_status_register_bp4_srwd,
8514 .unlock = spi_disable_blockprotect_bp4_srwd,
8515 .write = spi_chip_write_256,
8516 .read = spi_chip_read,
8517 .voltage = {1650, 2000},
8518 .reg_bits =
8519 {
8520 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8521 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8522 .srp = {STATUS1, 7, RW},
8523 .srl = {STATUS2, 0, RW},
8524 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8525 .tb = {STATUS1, 6, RW},
8526 .cmp = {STATUS2, 6, RW},
8527 },
8528 .wp_write_cfg = spi_wp_write_cfg,
8529 .wp_read_cfg = spi_wp_read_cfg,
8530 .wp_get_ranges = spi_wp_get_available_ranges,
8531 .decode_range = decode_range_spi25,
8532 .prepare_access = spi_prepare_io,
8533 .finish_access = spi_finish_io,
8534 },
8535
8536 {
8537 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008538 .name = "GD55LB02GE",
8539 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008540 .id.type = ID_SPI_RDID,
8541 .id.manufacture = GIGADEVICE_ID,
8542 .id.model = GIGADEVICE_GD55LB02GE,
Nico Huber1da02932024-11-08 17:56:39 +01008543 .total_size = 256 * 1024,
8544 .page_size = 256,
8545 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8546 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
8547 .tested = TEST_UNTESTED,
Nico Huber1da02932024-11-08 17:56:39 +01008548 .probe_timing = TIMING_ZERO,
8549 .block_erasers =
8550 {
8551 {
8552 .eraseblocks = { {4 * 1024, 65536} },
8553 .block_erase = spi_block_erase_21,
8554 }, {
8555 .eraseblocks = { {4 * 1024, 65536} },
8556 .block_erase = spi_block_erase_20,
8557 }, {
8558 .eraseblocks = { {32 * 1024, 8192} },
8559 .block_erase = spi_block_erase_5c,
8560 }, {
8561 .eraseblocks = { {32 * 1024, 8192} },
8562 .block_erase = spi_block_erase_52,
8563 }, {
8564 .eraseblocks = { {64 * 1024, 4096} },
8565 .block_erase = spi_block_erase_dc,
8566 }, {
8567 .eraseblocks = { {64 * 1024, 4096} },
8568 .block_erase = spi_block_erase_d8,
8569 }, {
8570 .eraseblocks = { {256 * 1024 * 1024, 1} },
8571 .block_erase = spi_block_erase_60,
8572 }, {
8573 .eraseblocks = { {256 * 1024 * 1024, 1} },
8574 .block_erase = spi_block_erase_c7,
8575 }
8576 },
8577 /* Has WPS bit in unsupported register. */
Naresh Solanki768cfc42024-10-04 20:17:34 +05308578 .printlock = spi_prettyprint_status_register_bp4_srwd,
8579 .unlock = spi_disable_blockprotect_bp4_srwd,
8580 .write = spi_chip_write_256,
8581 .read = spi_chip_read,
8582 .voltage = {1650, 2000},
8583 .prepare_access = spi_prepare_io,
8584 .finish_access = spi_finish_io,
8585 },
8586
8587 {
8588 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008589 .name = "GD55LB02GF",
8590 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008591 .id.type = ID_SPI_RDID,
8592 .id.manufacture = GIGADEVICE_ID,
8593 .id.model = GIGADEVICE_GD55LB02GF,
Nico Huber38d037f2024-11-08 18:25:55 +01008594 .total_size = 256 * 1024,
8595 .page_size = 256,
8596 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8597 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8598 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8599 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8600 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8601 .tested = TEST_UNTESTED,
Nico Huber38d037f2024-11-08 18:25:55 +01008602 .probe_timing = TIMING_ZERO,
8603 .block_erasers =
8604 {
8605 {
8606 .eraseblocks = { {4 * 1024, 65536} },
8607 .block_erase = spi_block_erase_21,
8608 }, {
8609 .eraseblocks = { {4 * 1024, 65536} },
8610 .block_erase = spi_block_erase_20,
8611 }, {
8612 .eraseblocks = { {32 * 1024, 8192} },
8613 .block_erase = spi_block_erase_52,
8614 }, {
8615 .eraseblocks = { {32 * 1024, 8192} },
8616 .block_erase = spi_block_erase_5c,
8617 }, {
8618 .eraseblocks = { {64 * 1024, 4096} },
8619 .block_erase = spi_block_erase_dc,
8620 }, {
8621 .eraseblocks = { {64 * 1024, 4096} },
8622 .block_erase = spi_block_erase_d8,
8623 }, {
8624 .eraseblocks = { {256 * 1024 * 1024, 1} },
8625 .block_erase = spi_block_erase_60,
8626 }, {
8627 .eraseblocks = { {256 * 1024 * 1024, 1} },
8628 .block_erase = spi_block_erase_c7,
8629 }
8630 },
8631 .printlock = spi_prettyprint_status_register_bp4_srwd,
8632 .unlock = spi_disable_blockprotect_bp4_srwd,
8633 .write = spi_chip_write_256,
8634 .read = spi_chip_read,
8635 .voltage = {1650, 2000},
8636 .reg_bits =
8637 {
8638 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8639 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8640 .srp = {STATUS1, 7, RW},
8641 .srl = {STATUS2, 0, RW},
8642 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8643 .tb = {STATUS1, 6, RW},
8644 .cmp = {STATUS2, 6, RW},
8645 },
8646 .wp_write_cfg = spi_wp_write_cfg,
8647 .wp_read_cfg = spi_wp_read_cfg,
8648 .wp_get_ranges = spi_wp_get_available_ranges,
8649 .decode_range = decode_range_spi25,
8650 .prepare_access = spi_prepare_io,
8651 .finish_access = spi_finish_io,
8652 },
8653
8654 {
8655 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008656 .name = "GD25Q10",
8657 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008658 .id.type = ID_SPI_RDID,
8659 .id.manufacture = GIGADEVICE_ID,
8660 .id.model = GIGADEVICE_GD25Q10,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008661 .total_size = 128,
8662 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01008663 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008664 .tested = TEST_UNTESTED,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008665 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10008666 .block_erasers =
8667 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008668 {
8669 .eraseblocks = { {4 * 1024, 32} },
8670 .block_erase = spi_block_erase_20,
8671 }, {
8672 .eraseblocks = { {32 * 1024, 4} },
8673 .block_erase = spi_block_erase_52,
8674 }, {
8675 .eraseblocks = { {64 * 1024, 2} },
8676 .block_erase = spi_block_erase_d8,
8677 }, {
8678 .eraseblocks = { {128 * 1024, 1} },
8679 .block_erase = spi_block_erase_60,
8680 }, {
8681 .eraseblocks = { {128 * 1024, 1} },
8682 .block_erase = spi_block_erase_c7,
8683 }
8684 },
Nico Huber4da971f2024-03-27 01:18:12 +01008685 .reg_bits =
8686 {
8687 .qe = {STATUS2, 1, RW},
8688 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00008689 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008690 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8691 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008692 .read = spi_chip_read,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008693 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008694 .prepare_access = spi_prepare_io,
8695 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008696 },
8697
8698 {
8699 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008700 .name = "GD25Q127C/GD25B127D",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008701 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008702 .id.type = ID_SPI_RDID,
8703 .id.manufacture = GIGADEVICE_ID,
8704 .id.model = GIGADEVICE_GD25Q128,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008705 .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_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03008710 .tested = TEST_OK_PREWB,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008711 .probe_timing = TIMING_ZERO,
8712 .block_erasers =
8713 {
8714 {
8715 .eraseblocks = { {4 * 1024, 4096} },
8716 .block_erase = spi_block_erase_20,
8717 }, {
8718 .eraseblocks = { {32 * 1024, 512} },
8719 .block_erase = spi_block_erase_52,
8720 }, {
8721 .eraseblocks = { {64 * 1024, 256} },
8722 .block_erase = spi_block_erase_d8,
8723 }, {
8724 .eraseblocks = { {16 * 1024 * 1024, 1} },
8725 .block_erase = spi_block_erase_60,
8726 }, {
8727 .eraseblocks = { {16 * 1024 * 1024, 1} },
8728 .block_erase = spi_block_erase_c7,
8729 }
8730 },
8731 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8732 .printlock = spi_prettyprint_status_register_bp4_srwd,
8733 .unlock = spi_disable_blockprotect_bp4_srwd,
8734 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01008735 .read = spi_chip_read,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008736 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008737 .reg_bits =
8738 {
Nico Huber4da971f2024-03-27 01:18:12 +01008739 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008740 .srp = {STATUS1, 7, RW},
8741 .srl = {STATUS2, 0, RW},
8742 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8743 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8744 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8745 .cmp = {STATUS2, 6, RW},
8746 },
Nico Huberaabb3e02023-01-13 00:22:30 +01008747 .wp_write_cfg = spi_wp_write_cfg,
8748 .wp_read_cfg = spi_wp_read_cfg,
8749 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008750 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008751 .prepare_access = spi_prepare_io,
8752 .finish_access = spi_finish_io,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008753 },
8754
8755 {
8756 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008757 .name = "GD25Q128B/GD25B128B",
8758 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008759 .id.type = ID_SPI_RDID,
8760 .id.manufacture = GIGADEVICE_ID,
8761 .id.model = GIGADEVICE_GD25Q128,
Nico Huber6ee2f892024-10-27 12:15:50 +01008762 .total_size = 16384,
8763 .page_size = 256,
8764 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
8765 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
8766 .tested = TEST_OK_PREW,
Nico Huber6ee2f892024-10-27 12:15:50 +01008767 .probe_timing = TIMING_ZERO,
8768 .block_erasers =
8769 {
8770 {
8771 .eraseblocks = { {4 * 1024, 4096} },
8772 .block_erase = spi_block_erase_20,
8773 }, {
8774 .eraseblocks = { {32 * 1024, 512} },
8775 .block_erase = spi_block_erase_52,
8776 }, {
8777 .eraseblocks = { {64 * 1024, 256} },
8778 .block_erase = spi_block_erase_d8,
8779 }, {
8780 .eraseblocks = { {16 * 1024 * 1024, 1} },
8781 .block_erase = spi_block_erase_60,
8782 }, {
8783 .eraseblocks = { {16 * 1024 * 1024, 1} },
8784 .block_erase = spi_block_erase_c7,
8785 }
8786 },
8787 .printlock = spi_prettyprint_status_register_bp4_srwd,
8788 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8789 .write = spi_chip_write_256,
8790 .read = spi_chip_read,
8791 .voltage = {2700, 3600},
8792 .reg_bits =
8793 {
8794 .qe = {STATUS2, 1, RW}, /* GD25B128B: Fixed QE=1 */
8795 .srp = {STATUS1, 7, RW},
8796 .srl = {STATUS2, 0, RW},
8797 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8798 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8799 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8800 .cmp = {STATUS2, 6, RW},
8801 },
8802 .wp_write_cfg = spi_wp_write_cfg,
8803 .wp_read_cfg = spi_wp_read_cfg,
8804 .wp_get_ranges = spi_wp_get_available_ranges,
8805 .decode_range = decode_range_spi25,
8806 .prepare_access = spi_prepare_io,
8807 .finish_access = spi_finish_io,
8808 },
8809
8810 {
8811 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01008812 .name = "GD25Q128C",
8813 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008814 .id.type = ID_SPI_RDID,
8815 .id.manufacture = GIGADEVICE_ID,
8816 .id.model = GIGADEVICE_GD25Q128,
Nico Huber68573af2024-01-06 18:28:22 +01008817 .total_size = 16384,
8818 .page_size = 256,
8819 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
Nico Huber6ee2f892024-10-27 12:15:50 +01008820 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
8821 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber68573af2024-01-06 18:28:22 +01008822 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8823 .tested = TEST_OK_PREWB,
Nico Huber68573af2024-01-06 18:28:22 +01008824 .probe_timing = TIMING_ZERO,
8825 .block_erasers =
8826 {
8827 {
8828 .eraseblocks = { {4 * 1024, 4096} },
8829 .block_erase = spi_block_erase_20,
8830 }, {
8831 .eraseblocks = { {32 * 1024, 512} },
8832 .block_erase = spi_block_erase_52,
8833 }, {
8834 .eraseblocks = { {64 * 1024, 256} },
8835 .block_erase = spi_block_erase_d8,
8836 }, {
8837 .eraseblocks = { {16 * 1024 * 1024, 1} },
8838 .block_erase = spi_block_erase_60,
8839 }, {
8840 .eraseblocks = { {16 * 1024 * 1024, 1} },
8841 .block_erase = spi_block_erase_c7,
8842 }
8843 },
8844 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8845 .printlock = spi_prettyprint_status_register_bp4_srwd,
8846 .unlock = spi_disable_blockprotect_bp4_srwd,
8847 .write = spi_chip_write_256,
8848 .read = spi_chip_read,
8849 .voltage = {2700, 3600},
8850 .reg_bits =
8851 {
8852 .qe = {STATUS2, 1, RW},
8853 .srp = {STATUS1, 7, RW},
8854 .srl = {STATUS2, 0, RW},
8855 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8856 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8857 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8858 .cmp = {STATUS2, 6, RW},
Nico Huber284d55b2025-02-26 23:37:49 +01008859 .wps = {STATUS3, 2, RW},
Nico Huber68573af2024-01-06 18:28:22 +01008860 },
Nico Huber2a1036b2024-10-20 23:19:49 +02008861 .wp_write_cfg = spi_wp_write_cfg,
8862 .wp_read_cfg = spi_wp_read_cfg,
8863 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber68573af2024-01-06 18:28:22 +01008864 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008865 .prepare_access = spi_prepare_io,
8866 .finish_access = spi_finish_io,
Nico Huber68573af2024-01-06 18:28:22 +01008867 },
8868
8869 {
8870 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008871 .name = "GD25Q128E/GD25B128E/GD25R128E/GD25Q128H/GD25B128H",
8872 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008873 .id.type = ID_SPI_RDID,
8874 .id.manufacture = GIGADEVICE_ID,
8875 .id.model = GIGADEVICE_GD25Q128,
Nico Huber6ee2f892024-10-27 12:15:50 +01008876 .total_size = 16384,
8877 .page_size = 256,
8878 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
8879 /* Supports full QIO but has a non-volatile DC bit. */
8880 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
8881 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
8882 .tested = TEST_UNTESTED,
Nico Huber6ee2f892024-10-27 12:15:50 +01008883 .probe_timing = TIMING_ZERO,
8884 .block_erasers =
8885 {
8886 {
8887 .eraseblocks = { {4 * 1024, 4096} },
8888 .block_erase = spi_block_erase_20,
8889 }, {
8890 .eraseblocks = { {32 * 1024, 512} },
8891 .block_erase = spi_block_erase_52,
8892 }, {
8893 .eraseblocks = { {64 * 1024, 256} },
8894 .block_erase = spi_block_erase_d8,
8895 }, {
8896 .eraseblocks = { {16 * 1024 * 1024, 1} },
8897 .block_erase = spi_block_erase_60,
8898 }, {
8899 .eraseblocks = { {16 * 1024 * 1024, 1} },
8900 .block_erase = spi_block_erase_c7,
8901 }
8902 },
8903 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8904 .printlock = spi_prettyprint_status_register_bp4_srwd,
8905 .unlock = spi_disable_blockprotect_bp4_srwd,
8906 .write = spi_chip_write_256,
8907 .read = spi_chip_read,
8908 .voltage = {2700, 3600},
8909 .reg_bits =
8910 {
8911 .qe = {STATUS2, 1, RW}, /* GD25B/R: Fixed QE=1 */
8912 .dc = {{STATUS3, 0, RW}},
8913 .srp = {STATUS1, 7, RW},
8914 .srl = {STATUS2, 0, RW},
8915 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8916 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8917 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8918 .cmp = {STATUS2, 6, RW},
8919 },
8920 .wp_write_cfg = spi_wp_write_cfg,
8921 .wp_read_cfg = spi_wp_read_cfg,
8922 .wp_get_ranges = spi_wp_get_available_ranges,
8923 .decode_range = decode_range_spi25,
8924 .prepare_access = spi_prepare_io,
8925 .finish_access = spi_finish_io,
8926 },
8927
8928 {
8929 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008930 .name = "GD25Q16(B)",
8931 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008932 .id.type = ID_SPI_RDID,
8933 .id.manufacture = GIGADEVICE_ID,
8934 .id.model = GIGADEVICE_GD25Q16,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008935 .total_size = 2048,
8936 .page_size = 256,
8937 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01008938 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008939 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008940 .probe_timing = TIMING_ZERO,
8941 .block_erasers =
8942 {
8943 {
8944 .eraseblocks = { {4 * 1024, 512} },
8945 .block_erase = spi_block_erase_20,
8946 }, {
8947 .eraseblocks = { {32 * 1024, 64} },
8948 .block_erase = spi_block_erase_52,
8949 }, {
8950 .eraseblocks = { {64 * 1024, 32} },
8951 .block_erase = spi_block_erase_d8,
8952 }, {
8953 .eraseblocks = { {2 * 1024 * 1024, 1} },
8954 .block_erase = spi_block_erase_60,
8955 }, {
8956 .eraseblocks = { {2 * 1024 * 1024, 1} },
8957 .block_erase = spi_block_erase_c7,
8958 }
8959 },
Nico Huber4da971f2024-03-27 01:18:12 +01008960 .reg_bits =
8961 {
8962 .qe = {STATUS2, 1, RW},
8963 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008964 .printlock = spi_prettyprint_status_register_bp4_srwd,
8965 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8966 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008967 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008968 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008969 .prepare_access = spi_prepare_io,
8970 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008971 },
8972
8973 {
8974 .vendor = "GigaDevice",
8975 .name = "GD25Q20(B)",
8976 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02008977 .id.type = ID_SPI_RDID,
8978 .id.manufacture = GIGADEVICE_ID,
8979 .id.model = GIGADEVICE_GD25Q20,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008980 .total_size = 256,
8981 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01008982 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008983 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008984 .probe_timing = TIMING_ZERO,
8985 .block_erasers =
8986 {
8987 {
8988 .eraseblocks = { {4 * 1024, 64} },
8989 .block_erase = spi_block_erase_20,
8990 }, {
8991 .eraseblocks = { {32 * 1024, 8} },
8992 .block_erase = spi_block_erase_52,
8993 }, {
8994 .eraseblocks = { {64 * 1024, 4} },
8995 .block_erase = spi_block_erase_d8,
8996 }, {
8997 .eraseblocks = { {256 * 1024, 1} },
8998 .block_erase = spi_block_erase_60,
8999 }, {
9000 .eraseblocks = { {256 * 1024, 1} },
9001 .block_erase = spi_block_erase_c7,
9002 }
9003 },
Nico Huber4da971f2024-03-27 01:18:12 +01009004 .reg_bits = {
9005 .qe = {STATUS2, 1, RW},
9006 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009007 .printlock = spi_prettyprint_status_register_bp4_srwd,
9008 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9009 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009010 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009011 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009012 .prepare_access = spi_prepare_io,
9013 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009014 },
9015
9016 {
9017 .vendor = "GigaDevice",
Nico Hubercbc5d572026-08-05 22:43:15 +02009018 .name = "GD25Q256D/GD25B256D/GD25R256D",
Alan Green86fc9cf2019-08-26 15:02:12 +10009019 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009020 .id.type = ID_SPI_RDID,
9021 .id.manufacture = GIGADEVICE_ID,
9022 .id.model = GIGADEVICE_GD25Q256D,
Alan Green86fc9cf2019-08-26 15:02:12 +10009023 .total_size = 32768,
9024 .page_size = 256,
Nico Huber493a4e02024-10-27 15:15:26 +01009025 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA |
Nico Huber4da971f2024-03-27 01:18:12 +01009026 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9027 FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03009028 .tested = TEST_OK_PREWB,
Alan Green86fc9cf2019-08-26 15:02:12 +10009029 .probe_timing = TIMING_ZERO,
9030 .block_erasers =
9031 {
9032 {
9033 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber5374dc32019-10-04 16:16:15 +02009034 .block_erase = spi_block_erase_21,
9035 }, {
9036 .eraseblocks = { {4 * 1024, 8192} },
Alan Green86fc9cf2019-08-26 15:02:12 +10009037 .block_erase = spi_block_erase_20,
9038 }, {
9039 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber5374dc32019-10-04 16:16:15 +02009040 .block_erase = spi_block_erase_5c,
9041 }, {
9042 .eraseblocks = { {32 * 1024, 1024} },
Alan Green86fc9cf2019-08-26 15:02:12 +10009043 .block_erase = spi_block_erase_52,
9044 }, {
9045 .eraseblocks = { {64 * 1024, 512} },
Nico Huber5374dc32019-10-04 16:16:15 +02009046 .block_erase = spi_block_erase_dc,
9047 }, {
9048 .eraseblocks = { {64 * 1024, 512} },
Alan Green86fc9cf2019-08-26 15:02:12 +10009049 .block_erase = spi_block_erase_d8,
9050 }, {
9051 .eraseblocks = { {32 * 1024 * 1024, 1} },
9052 .block_erase = spi_block_erase_60,
9053 }, {
9054 .eraseblocks = { {32 * 1024 * 1024, 1} },
9055 .block_erase = spi_block_erase_c7,
9056 }
9057 },
Nico Huber493a4e02024-10-27 15:15:26 +01009058 .printlock = spi_prettyprint_status_register_bp4_srwd,
9059 .unlock = spi_disable_blockprotect_bp4_srwd,
Alan Green86fc9cf2019-08-26 15:02:12 +10009060 .write = spi_chip_write_256,
9061 .read = spi_chip_read,
9062 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11009063 .reg_bits =
9064 {
Nico Hubercbc5d572026-08-05 22:43:15 +02009065 .qe = {STATUS2, 1, RW}, /* GD25B/R: Fixed QE=1 */
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11009066 .srp = {STATUS1, 7, RW},
9067 .srl = {STATUS2, 6, RW},
9068 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9069 .tb = {STATUS1, 6, RW},
9070 },
Nico Huberaabb3e02023-01-13 00:22:30 +01009071 .wp_write_cfg = spi_wp_write_cfg,
9072 .wp_read_cfg = spi_wp_read_cfg,
9073 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11009074 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02009075 .prepare_access = spi_prepare_io,
9076 .finish_access = spi_finish_io,
Alan Green86fc9cf2019-08-26 15:02:12 +10009077 },
9078
9079 {
9080 .vendor = "GigaDevice",
Nico Huber493a4e02024-10-27 15:15:26 +01009081 .name = "GD25Q257D/GD25B257D",
9082 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009083 .id.type = ID_SPI_RDID,
9084 .id.manufacture = GIGADEVICE_ID,
9085 .id.model = GIGADEVICE_GD25Q256D,
Nico Huber493a4e02024-10-27 15:15:26 +01009086 .total_size = 32768,
9087 .page_size = 256,
9088 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9089 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
9090 .tested = TEST_UNTESTED,
Nico Huber493a4e02024-10-27 15:15:26 +01009091 .probe_timing = TIMING_ZERO,
9092 .block_erasers =
9093 {
9094 {
9095 .eraseblocks = { {4 * 1024, 8192} },
9096 .block_erase = spi_block_erase_21,
9097 }, {
9098 .eraseblocks = { {4 * 1024, 8192} },
9099 .block_erase = spi_block_erase_20,
9100 }, {
9101 .eraseblocks = { {32 * 1024, 1024} },
9102 .block_erase = spi_block_erase_5c,
9103 }, {
9104 .eraseblocks = { {32 * 1024, 1024} },
9105 .block_erase = spi_block_erase_52,
9106 }, {
9107 .eraseblocks = { {64 * 1024, 512} },
9108 .block_erase = spi_block_erase_dc,
9109 }, {
9110 .eraseblocks = { {64 * 1024, 512} },
9111 .block_erase = spi_block_erase_d8,
9112 }, {
9113 .eraseblocks = { {32 * 1024 * 1024, 1} },
9114 .block_erase = spi_block_erase_60,
9115 }, {
9116 .eraseblocks = { {32 * 1024 * 1024, 1} },
9117 .block_erase = spi_block_erase_c7,
9118 }
9119 },
9120 .printlock = spi_prettyprint_status_register_bp4_srwd,
9121 .unlock = spi_disable_blockprotect_bp4_srwd,
9122 .write = spi_chip_write_256,
9123 .read = spi_chip_read,
9124 .voltage = {2700, 3600},
9125 .reg_bits =
9126 {
9127 .qe = {STATUS2, 1, RW}, /* GD25B257D: Fixed QE=1 */
9128 .srp = {STATUS1, 7, RW},
9129 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9130 .tb = {STATUS1, 6, RW},
9131 },
9132 .wp_write_cfg = spi_wp_write_cfg,
9133 .wp_read_cfg = spi_wp_read_cfg,
9134 .wp_get_ranges = spi_wp_get_available_ranges,
9135 .decode_range = decode_range_spi25,
9136 .prepare_access = spi_prepare_io,
9137 .finish_access = spi_finish_io,
9138 },
9139
9140 {
9141 .vendor = "GigaDevice",
9142 .name = "GD25Q256E/GD25B256E/GD25R256E",
9143 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009144 .id.type = ID_SPI_RDID,
9145 .id.manufacture = GIGADEVICE_ID,
9146 .id.model = GIGADEVICE_GD25Q256D,
Nico Huber493a4e02024-10-27 15:15:26 +01009147 .total_size = 32768,
9148 .page_size = 256,
9149 /* Supports full QIO but has non-volatile DC bits. */
9150 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
9151 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ |
9152 FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
9153 .tested = TEST_UNTESTED,
Nico Huber493a4e02024-10-27 15:15:26 +01009154 .probe_timing = TIMING_ZERO,
9155 .block_erasers =
9156 {
9157 {
9158 .eraseblocks = { {4 * 1024, 8192} },
9159 .block_erase = spi_block_erase_21,
9160 }, {
9161 .eraseblocks = { {4 * 1024, 8192} },
9162 .block_erase = spi_block_erase_20,
9163 }, {
9164 .eraseblocks = { {32 * 1024, 1024} },
9165 .block_erase = spi_block_erase_5c,
9166 }, {
9167 .eraseblocks = { {32 * 1024, 1024} },
9168 .block_erase = spi_block_erase_52,
9169 }, {
9170 .eraseblocks = { {64 * 1024, 512} },
9171 .block_erase = spi_block_erase_dc,
9172 }, {
9173 .eraseblocks = { {64 * 1024, 512} },
9174 .block_erase = spi_block_erase_d8,
9175 }, {
9176 .eraseblocks = { {32 * 1024 * 1024, 1} },
9177 .block_erase = spi_block_erase_60,
9178 }, {
9179 .eraseblocks = { {32 * 1024 * 1024, 1} },
9180 .block_erase = spi_block_erase_c7,
9181 }
9182 },
9183 .printlock = spi_prettyprint_status_register_bp4_srwd,
9184 .unlock = spi_disable_blockprotect_bp4_srwd,
9185 .write = spi_chip_write_256,
9186 .read = spi_chip_read,
9187 .voltage = {2700, 3600},
9188 .reg_bits =
9189 {
9190 .qe = {STATUS2, 1, RW}, /* GD25B/R: Fixed QE=1 */
9191 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9192 .srp = {STATUS1, 7, RW},
9193 .srl = {STATUS2, 6, RW},
9194 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9195 .tb = {STATUS1, 6, RW},
9196 },
9197 .wp_write_cfg = spi_wp_write_cfg,
9198 .wp_read_cfg = spi_wp_read_cfg,
9199 .wp_get_ranges = spi_wp_get_available_ranges,
9200 .decode_range = decode_range_spi25,
9201 .prepare_access = spi_prepare_io,
9202 .finish_access = spi_finish_io,
9203 },
9204
9205 {
9206 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009207 .name = "GD25Q32(B)",
9208 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009209 .id.type = ID_SPI_RDID,
9210 .id.manufacture = GIGADEVICE_ID,
9211 .id.model = GIGADEVICE_GD25Q32,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009212 .total_size = 4096,
9213 .page_size = 256,
9214 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009215 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03009216 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009217 .probe_timing = TIMING_ZERO,
9218 .block_erasers =
9219 {
9220 {
9221 .eraseblocks = { {4 * 1024, 1024} },
9222 .block_erase = spi_block_erase_20,
9223 }, {
9224 .eraseblocks = { {32 * 1024, 128} },
9225 .block_erase = spi_block_erase_52,
9226 }, {
9227 .eraseblocks = { {64 * 1024, 64} },
9228 .block_erase = spi_block_erase_d8,
9229 }, {
9230 .eraseblocks = { {4 * 1024 * 1024, 1} },
9231 .block_erase = spi_block_erase_60,
9232 }, {
9233 .eraseblocks = { {4 * 1024 * 1024, 1} },
9234 .block_erase = spi_block_erase_c7,
9235 }
9236 },
9237 .printlock = spi_prettyprint_status_register_bp4_srwd,
9238 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9239 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009240 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009241 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11009242 .reg_bits =
9243 {
Nico Huber4da971f2024-03-27 01:18:12 +01009244 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11009245 .srp = {STATUS1, 7, RW},
9246 .srl = {STATUS2, 0, RW},
9247 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
9248 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
9249 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
9250 .cmp = {STATUS2, 6, RW},
9251 },
Nico Huberaabb3e02023-01-13 00:22:30 +01009252 .wp_write_cfg = spi_wp_write_cfg,
9253 .wp_read_cfg = spi_wp_read_cfg,
9254 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11009255 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02009256 .prepare_access = spi_prepare_io,
9257 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009258 },
9259
9260 {
9261 .vendor = "GigaDevice",
9262 .name = "GD25Q40(B)",
9263 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009264 .id.type = ID_SPI_RDID,
9265 .id.manufacture = GIGADEVICE_ID,
9266 .id.model = GIGADEVICE_GD25Q40,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009267 .total_size = 512,
9268 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01009269 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Simon Buhrow551664c2022-03-09 16:09:08 +01009270 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009271 .probe_timing = TIMING_ZERO,
9272 .block_erasers =
9273 {
9274 {
9275 .eraseblocks = { {4 * 1024, 128} },
9276 .block_erase = spi_block_erase_20,
9277 }, {
9278 .eraseblocks = { {32 * 1024, 16} },
9279 .block_erase = spi_block_erase_52,
9280 }, {
9281 .eraseblocks = { {64 * 1024, 8} },
9282 .block_erase = spi_block_erase_d8,
9283 }, {
9284 .eraseblocks = { {512 * 1024, 1} },
9285 .block_erase = spi_block_erase_60,
9286 }, {
9287 .eraseblocks = { {512 * 1024, 1} },
9288 .block_erase = spi_block_erase_c7,
9289 }
9290 },
Nico Huber4da971f2024-03-27 01:18:12 +01009291 .reg_bits =
9292 {
9293 .qe = {STATUS2, 1, RW},
9294 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009295 .printlock = spi_prettyprint_status_register_bp4_srwd,
9296 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9297 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009298 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009299 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009300 .prepare_access = spi_prepare_io,
9301 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009302 },
9303
9304 {
9305 .vendor = "GigaDevice",
9306 .name = "GD25Q512",
9307 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009308 .id.type = ID_SPI_RDID,
9309 .id.manufacture = GIGADEVICE_ID,
9310 .id.model = GIGADEVICE_GD25Q512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009311 .total_size = 64,
9312 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01009313 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009314 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009315 .probe_timing = TIMING_ZERO,
9316 .block_erasers =
9317 {
9318 {
9319 .eraseblocks = { {4 * 1024, 16} },
9320 .block_erase = spi_block_erase_20,
9321 }, {
9322 .eraseblocks = { {32 * 1024, 2} },
9323 .block_erase = spi_block_erase_52,
9324 }, {
9325 .eraseblocks = { {64 * 1024, 1} },
9326 .block_erase = spi_block_erase_60,
9327 }, {
9328 .eraseblocks = { {64 * 1024, 1} },
9329 .block_erase = spi_block_erase_c7,
9330 }
9331 },
Nico Huber4da971f2024-03-27 01:18:12 +01009332 .reg_bits =
9333 {
9334 .qe = {STATUS2, 1, RW},
9335 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009336 .printlock = spi_prettyprint_status_register_bp4_srwd,
9337 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9338 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009339 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009340 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009341 .prepare_access = spi_prepare_io,
9342 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009343 },
9344
9345 {
9346 .vendor = "GigaDevice",
9347 .name = "GD25Q64(B)",
9348 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009349 .id.type = ID_SPI_RDID,
9350 .id.manufacture = GIGADEVICE_ID,
9351 .id.model = GIGADEVICE_GD25Q64,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009352 .total_size = 8192,
9353 .page_size = 256,
9354 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009355 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03009356 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009357 .probe_timing = TIMING_ZERO,
9358 .block_erasers =
9359 {
9360 {
9361 .eraseblocks = { {4 * 1024, 2048} },
9362 .block_erase = spi_block_erase_20,
9363 }, {
9364 .eraseblocks = { {32 * 1024, 256} },
9365 .block_erase = spi_block_erase_52,
9366 }, {
9367 .eraseblocks = { {64 * 1024, 128} },
9368 .block_erase = spi_block_erase_d8,
9369 }, {
9370 .eraseblocks = { {8 * 1024 * 1024, 1} },
9371 .block_erase = spi_block_erase_60,
9372 }, {
9373 .eraseblocks = { {8 * 1024 * 1024, 1} },
9374 .block_erase = spi_block_erase_c7,
9375 }
9376 },
9377 .printlock = spi_prettyprint_status_register_bp4_srwd,
9378 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9379 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009380 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009381 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009382 .reg_bits =
9383 {
Nico Huber4da971f2024-03-27 01:18:12 +01009384 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009385 .srp = {STATUS1, 7, RW},
9386 .srl = {STATUS2, 0, RW},
9387 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
9388 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
9389 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
9390 .cmp = {STATUS2, 6, RW},
9391 },
Nico Huberaabb3e02023-01-13 00:22:30 +01009392 .wp_write_cfg = spi_wp_write_cfg,
9393 .wp_read_cfg = spi_wp_read_cfg,
9394 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009395 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02009396 .prepare_access = spi_prepare_io,
9397 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009398 },
9399
9400 {
9401 .vendor = "GigaDevice",
9402 .name = "GD25Q80(B)",
9403 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009404 .id.type = ID_SPI_RDID,
9405 .id.manufacture = GIGADEVICE_ID,
9406 .id.model = GIGADEVICE_GD25Q80,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009407 .total_size = 1024,
9408 .page_size = 256,
9409 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01009410 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009411 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009412 .probe_timing = TIMING_ZERO,
9413 .block_erasers =
9414 {
9415 {
9416 .eraseblocks = { {4 * 1024, 256} },
9417 .block_erase = spi_block_erase_20,
9418 }, {
9419 .eraseblocks = { {32 * 1024, 32} },
9420 .block_erase = spi_block_erase_52,
9421 }, {
9422 .eraseblocks = { {64 * 1024, 16} },
9423 .block_erase = spi_block_erase_d8,
9424 }, {
9425 .eraseblocks = { {1024 * 1024, 1} },
9426 .block_erase = spi_block_erase_60,
9427 }, {
9428 .eraseblocks = { {1024 * 1024, 1} },
9429 .block_erase = spi_block_erase_c7,
9430 }
9431 },
Nico Huber4da971f2024-03-27 01:18:12 +01009432 .reg_bits =
9433 {
9434 .qe = {STATUS2, 1, RW},
9435 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009436 .printlock = spi_prettyprint_status_register_bp4_srwd,
9437 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9438 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009439 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009440 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009441 .prepare_access = spi_prepare_io,
9442 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009443 },
9444
9445 {
9446 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009447 .name = "GD25B512ME/GD25R512ME",
9448 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009449 .id.type = ID_SPI_RDID,
9450 .id.manufacture = GIGADEVICE_ID,
9451 .id.model = GIGADEVICE_GD25B512ME,
Nico Huber565471c2024-11-08 13:07:52 +01009452 .total_size = 65536,
9453 .page_size = 256,
9454 /* Supports QPI_38, but with non-volatile DC bits
9455 (which probably also affect QIO (0xeb) in SPI mode). */
9456 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9457 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9458 .tested = TEST_UNTESTED,
Nico Huber565471c2024-11-08 13:07:52 +01009459 .probe_timing = TIMING_ZERO,
9460 .block_erasers =
9461 {
9462 {
9463 .eraseblocks = { {4 * 1024, 16384} },
9464 .block_erase = spi_block_erase_21,
9465 }, {
9466 .eraseblocks = { {4 * 1024, 16384} },
9467 .block_erase = spi_block_erase_20,
9468 }, {
9469 .eraseblocks = { {32 * 1024, 2048} },
9470 .block_erase = spi_block_erase_5c,
9471 }, {
9472 .eraseblocks = { {32 * 1024, 2048} },
9473 .block_erase = spi_block_erase_52,
9474 }, {
9475 .eraseblocks = { {64 * 1024, 1024} },
9476 .block_erase = spi_block_erase_dc,
9477 }, {
9478 .eraseblocks = { {64 * 1024, 1024} },
9479 .block_erase = spi_block_erase_d8,
9480 }, {
9481 .eraseblocks = { {65536 * 1024, 1} },
9482 .block_erase = spi_block_erase_60,
9483 }, {
9484 .eraseblocks = { {65536 * 1024, 1} },
9485 .block_erase = spi_block_erase_c7,
9486 }
9487 },
9488 /* Has WPS bit in unsupported register. */
9489 .printlock = spi_prettyprint_status_register_bp4_srwd,
9490 .unlock = spi_disable_blockprotect_bp4_srwd,
9491 .write = spi_chip_write_256,
9492 .read = spi_chip_read,
9493 .voltage = {2700, 3600},
9494 .wp_write_cfg = spi_wp_write_cfg,
9495 .wp_read_cfg = spi_wp_read_cfg,
9496 .wp_get_ranges = spi_wp_get_available_ranges,
9497 .decode_range = decode_range_spi25,
9498 .prepare_access = spi_prepare_io,
9499 .finish_access = spi_finish_io,
9500 },
9501
9502 {
9503 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009504 .name = "GD25B512MF/GD25R512MF",
9505 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009506 .id.type = ID_SPI_RDID,
9507 .id.manufacture = GIGADEVICE_ID,
9508 .id.model = GIGADEVICE_GD25B512MF,
Nico Huber6d728e62024-11-08 13:07:52 +01009509 .total_size = 65536,
9510 .page_size = 256,
9511 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9512 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9513 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9514 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9515 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9516 .tested = TEST_UNTESTED,
Nico Huber6d728e62024-11-08 13:07:52 +01009517 .probe_timing = TIMING_ZERO,
9518 .block_erasers =
9519 {
9520 {
9521 .eraseblocks = { {4 * 1024, 16384} },
9522 .block_erase = spi_block_erase_21,
9523 }, {
9524 .eraseblocks = { {4 * 1024, 16384} },
9525 .block_erase = spi_block_erase_20,
9526 }, {
9527 .eraseblocks = { {32 * 1024, 2048} },
9528 .block_erase = spi_block_erase_5c,
9529 }, {
9530 .eraseblocks = { {32 * 1024, 2048} },
9531 .block_erase = spi_block_erase_52,
9532 }, {
9533 .eraseblocks = { {64 * 1024, 1024} },
9534 .block_erase = spi_block_erase_dc,
9535 }, {
9536 .eraseblocks = { {64 * 1024, 1024} },
9537 .block_erase = spi_block_erase_d8,
9538 }, {
9539 .eraseblocks = { {65536 * 1024, 1} },
9540 .block_erase = spi_block_erase_60,
9541 }, {
9542 .eraseblocks = { {65536 * 1024, 1} },
9543 .block_erase = spi_block_erase_c7,
9544 }
9545 },
9546 .printlock = spi_prettyprint_status_register_bp4_srwd,
9547 .unlock = spi_disable_blockprotect_bp4_srwd,
9548 .write = spi_chip_write_256,
9549 .read = spi_chip_read,
9550 .voltage = {2700, 3600},
9551 .reg_bits =
9552 {
9553 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
9554 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9555 .srp = {STATUS1, 7, RW},
9556 .srl = {STATUS2, 6, RW},
9557 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9558 .tb = {STATUS1, 6, RW},
9559 .cmp = {STATUS3, 3, RW},
9560 },
9561 .wp_write_cfg = spi_wp_write_cfg,
9562 .wp_read_cfg = spi_wp_read_cfg,
9563 .wp_get_ranges = spi_wp_get_available_ranges,
9564 .decode_range = decode_range_spi25,
9565 .prepare_access = spi_prepare_io,
9566 .finish_access = spi_finish_io,
9567 },
9568
9569 {
9570 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009571 .name = "GD55B01GE",
9572 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009573 .id.type = ID_SPI_RDID,
9574 .id.manufacture = GIGADEVICE_ID,
9575 .id.model = GIGADEVICE_GD55B01GE,
Nico Huber565471c2024-11-08 13:07:52 +01009576 .total_size = 128 * 1024,
9577 .page_size = 256,
9578 /* Supports QPI_38, but with non-volatile DC bits
9579 (which probably also affect QIO (0xeb) in SPI mode). */
9580 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9581 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9582 .tested = TEST_UNTESTED,
Nico Huber565471c2024-11-08 13:07:52 +01009583 .probe_timing = TIMING_ZERO,
9584 .block_erasers =
9585 {
9586 {
9587 .eraseblocks = { {4 * 1024, 32768} },
9588 .block_erase = spi_block_erase_21,
9589 }, {
9590 .eraseblocks = { {4 * 1024, 32768} },
9591 .block_erase = spi_block_erase_20,
9592 }, {
9593 .eraseblocks = { {32 * 1024, 4096} },
9594 .block_erase = spi_block_erase_5c,
9595 }, {
9596 .eraseblocks = { {32 * 1024, 4096} },
9597 .block_erase = spi_block_erase_52,
9598 }, {
9599 .eraseblocks = { {64 * 1024, 2048} },
9600 .block_erase = spi_block_erase_dc,
9601 }, {
9602 .eraseblocks = { {64 * 1024, 2048} },
9603 .block_erase = spi_block_erase_d8,
9604 }, {
9605 .eraseblocks = { {128 * 1024 * 1024, 1} },
9606 .block_erase = spi_block_erase_60,
9607 }, {
9608 .eraseblocks = { {128 * 1024 * 1024, 1} },
9609 .block_erase = spi_block_erase_c7,
9610 }
9611 },
9612 /* Has WPS bit in unsupported register. */
9613 .printlock = spi_prettyprint_status_register_bp4_srwd,
9614 .unlock = spi_disable_blockprotect_bp4_srwd,
9615 .write = spi_chip_write_256,
9616 .read = spi_chip_read,
9617 .voltage = {2700, 3600},
9618 .wp_write_cfg = spi_wp_write_cfg,
9619 .wp_read_cfg = spi_wp_read_cfg,
9620 .wp_get_ranges = spi_wp_get_available_ranges,
9621 .decode_range = decode_range_spi25,
9622 .prepare_access = spi_prepare_io,
9623 .finish_access = spi_finish_io,
9624 },
9625
9626 {
9627 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009628 .name = "GD55B01GF",
9629 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009630 .id.type = ID_SPI_RDID,
9631 .id.manufacture = GIGADEVICE_ID,
9632 .id.model = GIGADEVICE_GD55B01GF,
Nico Huber6d728e62024-11-08 13:07:52 +01009633 .total_size = 128 * 1024,
9634 .page_size = 256,
9635 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9636 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9637 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9638 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9639 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9640 .tested = TEST_UNTESTED,
Nico Huber6d728e62024-11-08 13:07:52 +01009641 .probe_timing = TIMING_ZERO,
9642 .block_erasers =
9643 {
9644 {
9645 .eraseblocks = { {4 * 1024, 32768} },
9646 .block_erase = spi_block_erase_21,
9647 }, {
9648 .eraseblocks = { {4 * 1024, 32768} },
9649 .block_erase = spi_block_erase_20,
9650 }, {
9651 .eraseblocks = { {32 * 1024, 4096} },
9652 .block_erase = spi_block_erase_5c,
9653 }, {
9654 .eraseblocks = { {32 * 1024, 4096} },
9655 .block_erase = spi_block_erase_52,
9656 }, {
9657 .eraseblocks = { {64 * 1024, 2048} },
9658 .block_erase = spi_block_erase_dc,
9659 }, {
9660 .eraseblocks = { {64 * 1024, 2048} },
9661 .block_erase = spi_block_erase_d8,
9662 }, {
9663 .eraseblocks = { {128 * 1024 * 1024, 1} },
9664 .block_erase = spi_block_erase_60,
9665 }, {
9666 .eraseblocks = { {128 * 1024 * 1024, 1} },
9667 .block_erase = spi_block_erase_c7,
9668 }
9669 },
9670 .printlock = spi_prettyprint_status_register_bp4_srwd,
9671 .unlock = spi_disable_blockprotect_bp4_srwd,
9672 .write = spi_chip_write_256,
9673 .read = spi_chip_read,
9674 .voltage = {2700, 3600},
9675 .reg_bits =
9676 {
9677 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
9678 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9679 .srp = {STATUS1, 7, RW},
9680 .srl = {STATUS2, 6, RW},
9681 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9682 .tb = {STATUS1, 6, RW},
9683 .cmp = {STATUS3, 3, RW},
9684 },
9685 .wp_write_cfg = spi_wp_write_cfg,
9686 .wp_read_cfg = spi_wp_read_cfg,
9687 .wp_get_ranges = spi_wp_get_available_ranges,
9688 .decode_range = decode_range_spi25,
9689 .prepare_access = spi_prepare_io,
9690 .finish_access = spi_finish_io,
9691 },
9692
9693 {
9694 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009695 .name = "GD55B02GE",
9696 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009697 .id.type = ID_SPI_RDID,
9698 .id.manufacture = GIGADEVICE_ID,
9699 .id.model = GIGADEVICE_GD55B02GE,
Nico Huber565471c2024-11-08 13:07:52 +01009700 .total_size = 256 * 1024,
9701 .page_size = 256,
9702 /* Supports QPI_38, but with non-volatile DC bits
9703 (which probably also affect QIO (0xeb) in SPI mode). */
9704 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9705 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9706 .tested = TEST_UNTESTED,
Nico Huber565471c2024-11-08 13:07:52 +01009707 .probe_timing = TIMING_ZERO,
9708 .block_erasers =
9709 {
9710 {
9711 .eraseblocks = { {4 * 1024, 65536} },
9712 .block_erase = spi_block_erase_21,
9713 }, {
9714 .eraseblocks = { {4 * 1024, 65536} },
9715 .block_erase = spi_block_erase_20,
9716 }, {
9717 .eraseblocks = { {32 * 1024, 8192} },
9718 .block_erase = spi_block_erase_5c,
9719 }, {
9720 .eraseblocks = { {32 * 1024, 8192} },
9721 .block_erase = spi_block_erase_52,
9722 }, {
9723 .eraseblocks = { {64 * 1024, 4096} },
9724 .block_erase = spi_block_erase_dc,
9725 }, {
9726 .eraseblocks = { {64 * 1024, 4096} },
9727 .block_erase = spi_block_erase_d8,
9728 }, {
9729 .eraseblocks = { {256 * 1024 * 1024, 1} },
9730 .block_erase = spi_block_erase_60,
9731 }, {
9732 .eraseblocks = { {256 * 1024 * 1024, 1} },
9733 .block_erase = spi_block_erase_c7,
9734 }
9735 },
9736 /* Has WPS bit in unsupported register. */
9737 .printlock = spi_prettyprint_status_register_bp4_srwd,
9738 .unlock = spi_disable_blockprotect_bp4_srwd,
9739 .write = spi_chip_write_256,
9740 .read = spi_chip_read,
9741 .voltage = {2700, 3600},
9742 .wp_write_cfg = spi_wp_write_cfg,
9743 .wp_read_cfg = spi_wp_read_cfg,
9744 .wp_get_ranges = spi_wp_get_available_ranges,
9745 .decode_range = decode_range_spi25,
9746 .prepare_access = spi_prepare_io,
9747 .finish_access = spi_finish_io,
9748 },
9749
9750 {
9751 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009752 .name = "GD55B02GF",
9753 .bustype = BUS_SPI,
Nico Huber11136c22023-05-01 12:00:09 +02009754 .id.type = ID_SPI_RDID,
9755 .id.manufacture = GIGADEVICE_ID,
9756 .id.model = GIGADEVICE_GD55B02GF,
Nico Huber6d728e62024-11-08 13:07:52 +01009757 .total_size = 256 * 1024,
9758 .page_size = 256,
9759 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9760 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9761 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9762 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9763 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9764 .tested = TEST_UNTESTED,
Nico Huber6d728e62024-11-08 13:07:52 +01009765 .probe_timing = TIMING_ZERO,
9766 .block_erasers =
9767 {
9768 {
9769 .eraseblocks = { {4 * 1024, 65536} },
9770 .block_erase = spi_block_erase_21,
9771 }, {
9772 .eraseblocks = { {4 * 1024, 65536} },
9773 .block_erase = spi_block_erase_20,
9774 }, {
9775 .eraseblocks = { {32 * 1024, 8192} },
9776 .block_erase = spi_block_erase_5c,
9777 }, {
9778 .eraseblocks = { {32 * 1024, 8192} },
9779 .block_erase = spi_block_erase_52,
9780 }, {
9781 .eraseblocks = { {64 * 1024, 4096} },
9782 .block_erase = spi_block_erase_dc,
9783 }, {
9784 .eraseblocks = { {64 * 1024, 4096} },
9785 .block_erase = spi_block_erase_d8,
9786 }, {
9787 .eraseblocks = { {256 * 1024 * 1024, 1} },
9788 .block_erase = spi_block_erase_60,
9789 }, {
9790 .eraseblocks = { {256 * 1024 * 1024, 1} },
9791 .block_erase = spi_block_erase_c7,
9792 }
9793 },
9794 .printlock = spi_prettyprint_status_register_bp4_srwd,
9795 .unlock = spi_disable_blockprotect_bp4_srwd,
9796 .write = spi_chip_write_256,
9797 .read = spi_chip_read,
9798 .voltage = {2700, 3600},
9799 .reg_bits =
9800 {
9801