blob: 393a24b31622040642bc0e5e4b086feef67f8609 [file] [log] [blame]
Vignesh R3f5fb8b2019-02-05 11:29:25 +05301// SPDX-License-Identifier: GPL-2.0+
2/*
3 *
4 * Copyright (C) 2013 Jagannadha Sutradharudu Teki, Xilinx Inc.
5 * Copyright (C) 2016 Jagan Teki <jagan@openedev.com>
6 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
7 */
8
9#include <common.h>
10#include <spi.h>
11#include <spi_flash.h>
12
13#include "sf_internal.h"
14
15/* Exclude chip names for SPL to save space */
16#if !CONFIG_IS_ENABLED(SPI_FLASH_TINY)
17#define INFO_NAME(_name) .name = _name,
18#else
19#define INFO_NAME(_name)
20#endif
21
22/* Used when the "_ext_id" is two bytes at most */
23#define INFO(_name, _jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
24 INFO_NAME(_name) \
25 .id = { \
26 ((_jedec_id) >> 16) & 0xff, \
27 ((_jedec_id) >> 8) & 0xff, \
28 (_jedec_id) & 0xff, \
29 ((_ext_id) >> 8) & 0xff, \
30 (_ext_id) & 0xff, \
31 }, \
32 .id_len = (!(_jedec_id) ? 0 : (3 + ((_ext_id) ? 2 : 0))), \
33 .sector_size = (_sector_size), \
34 .n_sectors = (_n_sectors), \
35 .page_size = 256, \
36 .flags = (_flags),
37
38#define INFO6(_name, _jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
39 INFO_NAME(_name) \
40 .id = { \
41 ((_jedec_id) >> 16) & 0xff, \
42 ((_jedec_id) >> 8) & 0xff, \
43 (_jedec_id) & 0xff, \
44 ((_ext_id) >> 16) & 0xff, \
45 ((_ext_id) >> 8) & 0xff, \
46 (_ext_id) & 0xff, \
47 }, \
48 .id_len = 6, \
49 .sector_size = (_sector_size), \
50 .n_sectors = (_n_sectors), \
51 .page_size = 256, \
52 .flags = (_flags),
53
54/* NOTE: double check command sets and memory organization when you add
55 * more nor chips. This current list focusses on newer chips, which
56 * have been converging on command sets which including JEDEC ID.
57 *
58 * All newly added entries should describe *hardware* and should use SECT_4K
59 * (or SECT_4K_PMC) if hardware supports erasing 4 KiB sectors. For usage
60 * scenarios excluding small sectors there is config option that can be
Vignesh Raghavendraa5cf6132019-09-26 19:04:27 +053061 * disabled: CONFIG_SPI_FLASH_USE_4K_SECTORS.
Vignesh R3f5fb8b2019-02-05 11:29:25 +053062 * For historical (and compatibility) reasons (before we got above config) some
63 * old entries may be missing 4K flag.
64 */
65const struct flash_info spi_nor_ids[] = {
66#ifdef CONFIG_SPI_FLASH_ATMEL /* ATMEL */
67 /* Atmel -- some are (confusingly) marketed as "DataFlash" */
68 { INFO("at26df321", 0x1f4700, 0, 64 * 1024, 64, SECT_4K) },
69 { INFO("at25df321a", 0x1f4701, 0, 64 * 1024, 64, SECT_4K) },
70
71 { INFO("at45db011d", 0x1f2200, 0, 64 * 1024, 4, SECT_4K) },
72 { INFO("at45db021d", 0x1f2300, 0, 64 * 1024, 8, SECT_4K) },
73 { INFO("at45db041d", 0x1f2400, 0, 64 * 1024, 8, SECT_4K) },
74 { INFO("at45db081d", 0x1f2500, 0, 64 * 1024, 16, SECT_4K) },
75 { INFO("at45db161d", 0x1f2600, 0, 64 * 1024, 32, SECT_4K) },
76 { INFO("at45db321d", 0x1f2700, 0, 64 * 1024, 64, SECT_4K) },
77 { INFO("at45db641d", 0x1f2800, 0, 64 * 1024, 128, SECT_4K) },
Fabio Estevam7d252f42019-10-21 10:51:16 -030078 { INFO("at25sl321", 0x1f4216, 0, 64 * 1024, 64, SECT_4K) },
Wolfgang Denk62fb2b42021-09-27 17:42:39 +020079 { INFO("at26df081a", 0x1f4501, 0, 64 * 1024, 16, SECT_4K) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +053080#endif
81#ifdef CONFIG_SPI_FLASH_EON /* EON */
82 /* EON -- en25xxx */
83 { INFO("en25q32b", 0x1c3016, 0, 64 * 1024, 64, 0) },
84 { INFO("en25q64", 0x1c3017, 0, 64 * 1024, 128, SECT_4K) },
85 { INFO("en25qh128", 0x1c7018, 0, 64 * 1024, 256, 0) },
86 { INFO("en25s64", 0x1c3817, 0, 64 * 1024, 128, SECT_4K) },
87#endif
88#ifdef CONFIG_SPI_FLASH_GIGADEVICE /* GIGADEVICE */
89 /* GigaDevice */
90 {
91 INFO("gd25q16", 0xc84015, 0, 64 * 1024, 32,
92 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
93 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
94 },
95 {
96 INFO("gd25q32", 0xc84016, 0, 64 * 1024, 64,
97 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
98 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
99 },
100 {
101 INFO("gd25lq32", 0xc86016, 0, 64 * 1024, 64,
102 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
103 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
104 },
105 {
106 INFO("gd25q64", 0xc84017, 0, 64 * 1024, 128,
107 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
108 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
109 },
Neil Armstrong3f83d7d2019-04-12 11:50:10 +0200110 {
Alper Nebi Yasak43a51bf2020-10-31 19:20:12 +0300111 INFO("gd25lq64c", 0xc86017, 0, 64 * 1024, 128,
112 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
113 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
114 },
115 {
Peter Robinson231855e2019-11-14 00:01:22 +0000116 INFO("gd25q128", 0xc84018, 0, 64 * 1024, 256,
117 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
118 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
119 },
120 {
Neil Armstrong3f83d7d2019-04-12 11:50:10 +0200121 INFO("gd25lq128", 0xc86018, 0, 64 * 1024, 256,
Niklas Casseld813e182022-03-03 18:26:39 +0000122 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
Neil Armstrong3f83d7d2019-04-12 11:50:10 +0200123 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
124 },
Yanhong Wangb6881982021-09-30 19:53:01 +0800125 {
126 INFO("gd25lq256d", 0xc86019, 0, 64 * 1024, 512,
127 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
128 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
129 },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530130#endif
131#ifdef CONFIG_SPI_FLASH_ISSI /* ISSI */
132 /* ISSI */
133 { INFO("is25lq040b", 0x9d4013, 0, 64 * 1024, 8,
134 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
135 { INFO("is25lp032", 0x9d6016, 0, 64 * 1024, 64, 0) },
136 { INFO("is25lp064", 0x9d6017, 0, 64 * 1024, 128, 0) },
137 { INFO("is25lp128", 0x9d6018, 0, 64 * 1024, 256,
138 SECT_4K | SPI_NOR_DUAL_READ) },
139 { INFO("is25lp256", 0x9d6019, 0, 64 * 1024, 512,
140 SECT_4K | SPI_NOR_DUAL_READ) },
Kris Chaplin077afbd2021-10-18 03:26:50 -0700141 { INFO("is25lp512", 0x9d601a, 0, 64 * 1024, 1024,
142 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530143 { INFO("is25wp032", 0x9d7016, 0, 64 * 1024, 64,
144 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
145 { INFO("is25wp064", 0x9d7017, 0, 64 * 1024, 128,
146 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
147 { INFO("is25wp128", 0x9d7018, 0, 64 * 1024, 256,
148 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Jagan Tekiae047942019-09-29 13:12:37 +0530149 { INFO("is25wp256", 0x9d7019, 0, 64 * 1024, 512,
Jagan Tekie7190702020-04-20 15:36:07 +0530150 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
151 SPI_NOR_4B_OPCODES) },
Kris Chaplin077afbd2021-10-18 03:26:50 -0700152 { INFO("is25wp512", 0x9d701a, 0, 64 * 1024, 1024,
153 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530154#endif
155#ifdef CONFIG_SPI_FLASH_MACRONIX /* MACRONIX */
156 /* Macronix */
157 { INFO("mx25l2005a", 0xc22012, 0, 64 * 1024, 4, SECT_4K) },
158 { INFO("mx25l4005a", 0xc22013, 0, 64 * 1024, 8, SECT_4K) },
159 { INFO("mx25l8005", 0xc22014, 0, 64 * 1024, 16, 0) },
160 { INFO("mx25l1606e", 0xc22015, 0, 64 * 1024, 32, SECT_4K) },
161 { INFO("mx25l3205d", 0xc22016, 0, 64 * 1024, 64, SECT_4K) },
162 { INFO("mx25l6405d", 0xc22017, 0, 64 * 1024, 128, SECT_4K) },
163 { INFO("mx25u2033e", 0xc22532, 0, 64 * 1024, 4, SECT_4K) },
164 { INFO("mx25u1635e", 0xc22535, 0, 64 * 1024, 32, SECT_4K) },
Tom Warrena599cb62020-03-20 14:20:09 -0700165 { INFO("mx25u3235f", 0xc22536, 0, 4 * 1024, 1024, SECT_4K) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530166 { INFO("mx25u6435f", 0xc22537, 0, 64 * 1024, 128, SECT_4K) },
Robert Marko94311d12020-10-23 14:22:38 +0530167 { INFO("mx25l12805d", 0xc22018, 0, 64 * 1024, 256, SECT_4K) },
Vladimir Vidc388d952020-09-07 08:54:58 +0200168 { INFO("mx25u12835f", 0xc22538, 0, 64 * 1024, 256, SECT_4K) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530169 { INFO("mx25l12855e", 0xc22618, 0, 64 * 1024, 256, 0) },
170 { INFO("mx25l25635e", 0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
171 { INFO("mx25u25635f", 0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) },
Frieder Schrempf4f4f6552021-06-07 14:36:41 +0200172 { INFO("mx25v8035f", 0xc22314, 0, 64 * 1024, 16, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
173 { INFO("mx25r1635f", 0xc22815, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530174 { INFO("mx25l25655e", 0xc22619, 0, 64 * 1024, 512, 0) },
175 { INFO("mx66l51235l", 0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
176 { INFO("mx66u51235f", 0xc2253a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
Marek Vasut942a4202019-03-07 23:27:46 +0100177 { INFO("mx66u2g45g", 0xc2253c, 0, 64 * 1024, 4096, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530178 { INFO("mx66l1g45g", 0xc2201b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
179 { INFO("mx25l1633e", 0xc22415, 0, 64 * 1024, 32, SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES | SECT_4K) },
Ye Liefd11b92020-05-03 21:02:56 +0800180 { INFO("mx25r6435f", 0xc22817, 0, 64 * 1024, 128, SECT_4K) },
zhengxunc8c95282021-03-23 13:16:47 +0000181 { INFO("mx66uw2g345g", 0xc2943c, 0, 64 * 1024, 4096, SECT_4K | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530182#endif
183
184#ifdef CONFIG_SPI_FLASH_STMICRO /* STMICRO */
185 /* Micron */
186 { INFO("n25q016a", 0x20bb15, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_QUAD_READ) },
187 { INFO("n25q032", 0x20ba16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) },
188 { INFO("n25q032a", 0x20bb16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) },
189 { INFO("n25q064", 0x20ba17, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_QUAD_READ) },
190 { INFO("n25q064a", 0x20bb17, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_QUAD_READ) },
191 { INFO("n25q128a11", 0x20bb18, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_QUAD_READ) },
192 { INFO("n25q128a13", 0x20ba18, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_QUAD_READ) },
Vignesh Raghavendra49736212019-10-11 13:28:20 +0530193 { INFO6("mt25ql256a", 0x20ba19, 0x104400, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES | USE_FSR) },
194 { INFO("n25q256a", 0x20ba19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_FSR) },
195 { INFO6("mt25qu256a", 0x20bb19, 0x104400, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES | USE_FSR) },
196 { INFO("n25q256ax1", 0x20bb19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ | USE_FSR) },
Ashish Kumar8a201a02019-07-17 11:45:00 +0530197 { INFO6("mt25qu512a", 0x20bb20, 0x104400, 64 * 1024, 1024,
Kris Chaplin40154192021-10-18 03:30:18 -0700198 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES |
Vignesh Raghavendra49736212019-10-11 13:28:20 +0530199 USE_FSR) },
Vignesh Raghavendra84acf732019-10-11 13:28:18 +0530200 { INFO("n25q512a", 0x20bb20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) },
Vignesh Raghavendraf53bd812019-10-11 13:28:19 +0530201 { INFO6("mt25ql512a", 0x20ba20, 0x104400, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
Vignesh Raghavendra84acf732019-10-11 13:28:18 +0530202 { INFO("n25q512ax3", 0x20ba20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530203 { INFO("n25q00", 0x20ba21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
204 { INFO("n25q00a", 0x20bb21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
Hongwei Zhangeaca92c2020-12-07 17:40:01 -0500205 { INFO("mt25ql01g", 0x21ba20, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530206 { INFO("mt25qu02g", 0x20bb22, 0, 64 * 1024, 4096, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) },
Marek Vasut2c3620f2021-10-05 10:58:47 +0200207 { INFO("mt25ql02g", 0x20ba22, 0, 64 * 1024, 4096, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE | SPI_NOR_4B_OPCODES) },
Pratyush Yadav9c35a612021-06-26 00:47:29 +0530208#ifdef CONFIG_SPI_FLASH_MT35XU
209 { INFO("mt35xu512aba", 0x2c5b1a, 0, 128 * 1024, 512, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES | SPI_NOR_OCTAL_DTR_READ) },
210#endif /* CONFIG_SPI_FLASH_MT35XU */
Kuldeep Singh10675512020-03-14 18:23:54 +0530211 { INFO("mt35xu02g", 0x2c5b1c, 0, 128 * 1024, 2048, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530212#endif
213#ifdef CONFIG_SPI_FLASH_SPANSION /* SPANSION */
214 /* Spansion/Cypress -- single (large) sector size only, at least
215 * for the chips listed here (without boot sectors).
216 */
217 { INFO("s25sl032p", 0x010215, 0x4d00, 64 * 1024, 64, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
218 { INFO("s25sl064p", 0x010216, 0x4d00, 64 * 1024, 128, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Bacem Daassi74412ab2020-03-27 19:58:14 +0100219 { INFO("s25fl256s0", 0x010219, 0x4d00, 256 * 1024, 128, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530220 { INFO("s25fl256s1", 0x010219, 0x4d01, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
Kuldeep Singhe8a14f52020-04-03 12:27:42 +0530221 { INFO6("s25fl512s", 0x010220, 0x4d0080, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
222 { INFO6("s25fs512s", 0x010220, 0x4d0081, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530223 { INFO("s25fl512s_256k", 0x010220, 0x4d00, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
224 { INFO("s25fl512s_64k", 0x010220, 0x4d01, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
225 { INFO("s25fl512s_512k", 0x010220, 0x4f00, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
226 { INFO("s25sl12800", 0x012018, 0x0300, 256 * 1024, 64, 0) },
227 { INFO("s25sl12801", 0x012018, 0x0301, 64 * 1024, 256, 0) },
228 { INFO6("s25fl128s", 0x012018, 0x4d0180, 64 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
229 { INFO("s25fl129p0", 0x012018, 0x4d00, 256 * 1024, 64, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
230 { INFO("s25fl129p1", 0x012018, 0x4d01, 64 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
231 { INFO("s25sl008a", 0x010213, 0, 64 * 1024, 16, 0) },
232 { INFO("s25sl016a", 0x010214, 0, 64 * 1024, 32, 0) },
233 { INFO("s25sl032a", 0x010215, 0, 64 * 1024, 64, 0) },
234 { INFO("s25sl064a", 0x010216, 0, 64 * 1024, 128, 0) },
235 { INFO("s25fl116k", 0x014015, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
236 { INFO("s25fl164k", 0x014017, 0, 64 * 1024, 128, SECT_4K) },
237 { INFO("s25fl208k", 0x014014, 0, 64 * 1024, 16, SECT_4K | SPI_NOR_DUAL_READ) },
Heiko Schocher50aad822019-02-08 11:03:39 +0100238 { INFO("s25fl064l", 0x016017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530239 { INFO("s25fl128l", 0x016018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
Takahiro Kuwano5f46ddc2021-09-30 11:23:37 +0900240 { INFO("s25fl256l", 0x016019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
Takahiro Kuwanoa3814fd2021-06-29 15:00:57 +0900241 { INFO6("s25hl512t", 0x342a1a, 0x0f0390, 256 * 1024, 256,
242 SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES |
243 USE_CLSR) },
244 { INFO6("s25hl01gt", 0x342a1b, 0x0f0390, 256 * 1024, 512,
245 SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES |
246 USE_CLSR) },
247 { INFO6("s25hl02gt", 0x342a1c, 0x0f0090, 256 * 1024, 1024,
248 SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
249 { INFO6("s25hs512t", 0x342b1a, 0x0f0390, 256 * 1024, 256,
250 SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES |
251 USE_CLSR) },
252 { INFO6("s25hs01gt", 0x342b1b, 0x0f0390, 256 * 1024, 512,
253 SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES |
254 USE_CLSR) },
255 { INFO6("s25hs02gt", 0x342b1c, 0x0f0090, 256 * 1024, 1024,
256 SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
Pratyush Yadavcaee9a62021-06-26 00:47:28 +0530257#ifdef CONFIG_SPI_FLASH_S28HS512T
258 { INFO("s28hs512t", 0x345b1a, 0, 256 * 1024, 256, SPI_NOR_OCTAL_DTR_READ) },
259#endif
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530260#endif
261#ifdef CONFIG_SPI_FLASH_SST /* SST */
262 /* SST -- large erase sizes are "overlays", "sectors" are 4K */
263 { INFO("sst25vf040b", 0xbf258d, 0, 64 * 1024, 8, SECT_4K | SST_WRITE) },
264 { INFO("sst25vf080b", 0xbf258e, 0, 64 * 1024, 16, SECT_4K | SST_WRITE) },
265 { INFO("sst25vf016b", 0xbf2541, 0, 64 * 1024, 32, SECT_4K | SST_WRITE) },
266 { INFO("sst25vf032b", 0xbf254a, 0, 64 * 1024, 64, SECT_4K | SST_WRITE) },
267 { INFO("sst25vf064c", 0xbf254b, 0, 64 * 1024, 128, SECT_4K) },
268 { INFO("sst25wf512", 0xbf2501, 0, 64 * 1024, 1, SECT_4K | SST_WRITE) },
269 { INFO("sst25wf010", 0xbf2502, 0, 64 * 1024, 2, SECT_4K | SST_WRITE) },
270 { INFO("sst25wf020", 0xbf2503, 0, 64 * 1024, 4, SECT_4K | SST_WRITE) },
271 { INFO("sst25wf020a", 0x621612, 0, 64 * 1024, 4, SECT_4K) },
272 { INFO("sst25wf040b", 0x621613, 0, 64 * 1024, 8, SECT_4K) },
273 { INFO("sst25wf040", 0xbf2504, 0, 64 * 1024, 8, SECT_4K | SST_WRITE) },
274 { INFO("sst25wf080", 0xbf2505, 0, 64 * 1024, 16, SECT_4K | SST_WRITE) },
Eugeniy Paltsev9c9d8d52019-09-09 22:33:15 +0300275 { INFO("sst26vf064b", 0xbf2643, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_HAS_SST26LOCK | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
276 { INFO("sst26wf016", 0xbf2651, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_HAS_SST26LOCK) },
277 { INFO("sst26wf032", 0xbf2622, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_SST26LOCK) },
278 { INFO("sst26wf064", 0xbf2643, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_HAS_SST26LOCK) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530279#endif
280#ifdef CONFIG_SPI_FLASH_STMICRO /* STMICRO */
281 /* ST Microelectronics -- newer production may have feature updates */
282 { INFO("m25p10", 0x202011, 0, 32 * 1024, 4, 0) },
283 { INFO("m25p20", 0x202012, 0, 64 * 1024, 4, 0) },
284 { INFO("m25p40", 0x202013, 0, 64 * 1024, 8, 0) },
285 { INFO("m25p80", 0x202014, 0, 64 * 1024, 16, 0) },
286 { INFO("m25p16", 0x202015, 0, 64 * 1024, 32, 0) },
287 { INFO("m25p32", 0x202016, 0, 64 * 1024, 64, 0) },
288 { INFO("m25p64", 0x202017, 0, 64 * 1024, 128, 0) },
289 { INFO("m25p128", 0x202018, 0, 256 * 1024, 64, 0) },
290 { INFO("m25pe16", 0x208015, 0, 64 * 1024, 32, SECT_4K) },
291 { INFO("m25px16", 0x207115, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
292 { INFO("m25px64", 0x207117, 0, 64 * 1024, 128, 0) },
293#endif
294#ifdef CONFIG_SPI_FLASH_WINBOND /* WINBOND */
295 /* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */
296 { INFO("w25p80", 0xef2014, 0x0, 64 * 1024, 16, 0) },
297 { INFO("w25p16", 0xef2015, 0x0, 64 * 1024, 32, 0) },
298 { INFO("w25p32", 0xef2016, 0x0, 64 * 1024, 64, 0) },
299 { INFO("w25x05", 0xef3010, 0, 64 * 1024, 1, SECT_4K) },
300 { INFO("w25x40", 0xef3013, 0, 64 * 1024, 8, SECT_4K) },
301 { INFO("w25x16", 0xef3015, 0, 64 * 1024, 32, SECT_4K) },
302 {
303 INFO("w25q16dw", 0xef6015, 0, 64 * 1024, 32,
304 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
305 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
306 },
307 { INFO("w25x32", 0xef3016, 0, 64 * 1024, 64, SECT_4K) },
308 { INFO("w25q20cl", 0xef4012, 0, 64 * 1024, 4, SECT_4K) },
309 { INFO("w25q20bw", 0xef5012, 0, 64 * 1024, 4, SECT_4K) },
310 { INFO("w25q20ew", 0xef6012, 0, 64 * 1024, 4, SECT_4K) },
311 { INFO("w25q32", 0xef4016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
312 {
313 INFO("w25q32dw", 0xef6016, 0, 64 * 1024, 64,
314 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
315 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
316 },
317 {
318 INFO("w25q32jv", 0xef7016, 0, 64 * 1024, 64,
319 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
320 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
321 },
Michael Walle2d7266a2020-12-01 00:12:39 +0100322 {
323 INFO("w25q32jwm", 0xef8016, 0, 64 * 1024, 64,
324 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
325 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
326 },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530327 { INFO("w25x64", 0xef3017, 0, 64 * 1024, 128, SECT_4K) },
328 {
329 INFO("w25q64dw", 0xef6017, 0, 64 * 1024, 128,
330 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
331 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
332 },
333 {
334 INFO("w25q64jv", 0xef7017, 0, 64 * 1024, 128,
335 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
336 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
337 },
338 {
339 INFO("w25q128fw", 0xef6018, 0, 64 * 1024, 256,
340 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
341 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
342 },
343 {
344 INFO("w25q128jv", 0xef7018, 0, 64 * 1024, 256,
345 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
346 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
347 },
348 {
Marek Vasutb6f92372022-04-24 23:39:17 +0200349 INFO("w25q128jw", 0xef8018, 0, 64 * 1024, 256,
350 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
351 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
352 },
353 {
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530354 INFO("w25q256fw", 0xef6019, 0, 64 * 1024, 512,
355 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
356 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
357 },
358 {
359 INFO("w25q256jw", 0xef7019, 0, 64 * 1024, 512,
360 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
361 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
362 },
Ram Narayanana54dce72021-11-29 21:54:58 -0800363 {
364 INFO("w25q01jv", 0xef4021, 0, 64 * 1024, 2048,
365 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
366 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
367 },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530368 { INFO("w25q80", 0xef5014, 0, 64 * 1024, 16, SECT_4K) },
369 { INFO("w25q80bl", 0xef4014, 0, 64 * 1024, 16, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
370 { INFO("w25q16cl", 0xef4015, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
371 { INFO("w25q64cv", 0xef4017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Su Baochengf453a1c2021-01-25 10:59:05 +0800372 { INFO("w25q128", 0xef4018, 0, 64 * 1024, 256,
373 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
374 SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
375 },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530376 { INFO("w25q256", 0xef4019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Biju Dasd0b8df32020-09-29 11:04:02 +0100377 { INFO("w25m512jw", 0xef6119, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Lad Prabhakar80f89de2020-09-17 15:50:30 +0100378 { INFO("w25m512jv", 0xef7119, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530379#endif
380#ifdef CONFIG_SPI_FLASH_XMC
381 /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
382 { INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Reto Schneider78b498c2021-06-17 18:26:51 +0200383 { INFO("XM25QH64C", 0x204017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530384 { INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
385#endif
Chris Morganb242db12021-08-05 16:26:41 +0800386#ifdef CONFIG_SPI_FLASH_XTX
387 /* XTX Technology (Shenzhen) Limited */
388 { INFO("xt25f128b", 0x0b4018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
389#endif
Vignesh R3f5fb8b2019-02-05 11:29:25 +0530390 { },
391};