@@ -209,10 +209,30 @@ static int st_nor_four_die_late_init(struct spi_nor *nor)
209
209
return spi_nor_set_4byte_addr_mode (nor , true);
210
210
}
211
211
212
+ static int st_nor_two_die_late_init (struct spi_nor * nor )
213
+ {
214
+ struct spi_nor_flash_parameter * params = nor -> params ;
215
+
216
+ params -> die_erase_opcode = SPINOR_OP_MT_DIE_ERASE ;
217
+ params -> n_dice = 2 ;
218
+
219
+ /*
220
+ * Unfortunately the die erase opcode does not have a 4-byte opcode
221
+ * correspondent for these flashes. The SFDP 4BAIT table fails to
222
+ * consider the die erase too. We're forced to enter in the 4 byte
223
+ * address mode in order to benefit of the die erase.
224
+ */
225
+ return spi_nor_set_4byte_addr_mode (nor , true);
226
+ }
227
+
212
228
static struct spi_nor_fixups n25q00_fixups = {
213
229
.late_init = st_nor_four_die_late_init ,
214
230
};
215
231
232
+ static struct spi_nor_fixups mt25q01_fixups = {
233
+ .late_init = st_nor_two_die_late_init ,
234
+ };
235
+
216
236
static struct spi_nor_fixups mt25q02_fixups = {
217
237
.late_init = st_nor_four_die_late_init ,
218
238
};
@@ -455,6 +475,11 @@ static const struct flash_info st_nor_parts[] = {
455
475
SPI_NOR_BP3_SR_BIT6 ,
456
476
.no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ ,
457
477
.mfr_flags = USE_FSR ,
478
+ }, {
479
+ .id = SNOR_ID (0x20 , 0xbb , 0x21 , 0x10 , 0x44 , 0x00 ),
480
+ .name = "mt25qu01g" ,
481
+ .mfr_flags = USE_FSR ,
482
+ .fixups = & mt25q01_fixups ,
458
483
}, {
459
484
.id = SNOR_ID (0x20 , 0xbb , 0x21 ),
460
485
.name = "n25q00a" ,
0 commit comments