spiFlash: added Macronix MX25L6405
This commit is contained in:
parent
db7bd4770c
commit
c4d26da89f
|
|
@ -421,19 +421,21 @@ bool SPIFlash::prepare_flash(const int base_addr, const int len)
|
||||||
_must_relock = true;
|
_must_relock = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const uint32_t jedec = _jedec_id >> 8;
|
||||||
/* ISSI IS25LP032 seems have a bug:
|
/* ISSI IS25LP032 seems have a bug:
|
||||||
* block protection is always in top mode regardless of
|
* block protection is always in top mode regardless of
|
||||||
* the TB bit: if write is not at offset 0 -> force unlock
|
* the TB bit: if write is not at offset 0 -> force unlock
|
||||||
*/
|
*/
|
||||||
if ((_jedec_id >> 8) == 0x9d6016 && tb == 1 && base_addr != 0) {
|
if (jedec == 0x9d6016 && tb == 1 && base_addr != 0) {
|
||||||
_unprotect = true;
|
_unprotect = true;
|
||||||
_must_relock = true;
|
_must_relock = true;
|
||||||
}
|
}
|
||||||
/* ST M25P16 has not TB bit:
|
/* ST M25P16 / MX25L6045 have not TB bit:
|
||||||
* block protection is always in top mode:
|
* block protection is always in top mode:
|
||||||
* if write is not at offset 0 -> force unlock
|
* if write is not at offset 0 -> force unlock
|
||||||
*/
|
*/
|
||||||
if ((_jedec_id >> 8) == 0x202015 && tb == 1 && base_addr != 0) {
|
if (((jedec == 0x202015) || (jedec == 0xC22017))
|
||||||
|
&& tb == 1 && base_addr != 0) {
|
||||||
_unprotect = true;
|
_unprotect = true;
|
||||||
_must_relock = true;
|
_must_relock = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -500,6 +500,23 @@ static std::map <uint32_t, flash_t> flash_list = {
|
||||||
.quad_mask = (1 << 6),
|
.quad_mask = (1 << 6),
|
||||||
.global_lock = false,
|
.global_lock = false,
|
||||||
}},
|
}},
|
||||||
|
{0xc22017, {
|
||||||
|
/* https://www.macronix.com/Lists/Datasheet/Attachments/8554/MX25L1605D,%203V,%2016Mb,%20v1.5.pdf */
|
||||||
|
.manufacturer = "Macronix",
|
||||||
|
.model = "MX25L6405",
|
||||||
|
.nr_sector = 128,
|
||||||
|
.sector_erase = true,
|
||||||
|
.subsector_erase = true,
|
||||||
|
.has_extended = false,
|
||||||
|
.tb_otp = true,
|
||||||
|
.tb_offset = 0,
|
||||||
|
.tb_register = NONER,
|
||||||
|
.bp_len = 5,
|
||||||
|
.bp_offset = {(1 << 2), (1 << 3), (1 << 4), (1 << 5)},
|
||||||
|
.quad_register = NONER,
|
||||||
|
.quad_mask = 0,
|
||||||
|
.global_lock = false,
|
||||||
|
}},
|
||||||
{0xc22018, {
|
{0xc22018, {
|
||||||
/* https://www.macronix.com/Lists/Datasheet/Attachments/8934/MX25L12833F,%203V,%20128Mb,%20v1.0.pdf */
|
/* https://www.macronix.com/Lists/Datasheet/Attachments/8934/MX25L12833F,%203V,%20128Mb,%20v1.0.pdf */
|
||||||
.manufacturer = "Macronix",
|
.manufacturer = "Macronix",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue