From: Mohammad Odeh <[email protected]> Add the 64-Mbit Macronix MX25R6435F serial NOR flash model, its SFDP data, and the 1-4-4 quad page-program command used by the device.
Signed-off-by: Mohammad Odeh <[email protected]> --- hw/block/m25p80.c | 5 +++++ hw/block/m25p80_sfdp.c | 20 ++++++++++++++++++++ hw/block/m25p80_sfdp.h | 1 + 3 files changed, 26 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index baf798c6b5..9b931f5861 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -243,6 +243,8 @@ static const FlashPartInfo known_devices[] = { { INFO6("mx25l25635f", 0xc22019, 0xc22019, 64 << 10, 512, ER_4K | ER_32K), .sfdp_read = m25p80_sfdp_mx25l25635f }, { INFO("mx25l25655e", 0xc22619, 0, 64 << 10, 512, 0) }, + { INFO("mx25r6435", 0xc22817, 0, 64 << 10, 128, ER_4K | ER_32K), + .sfdp_read = m25p80_sfdp_mx25r6435 }, { INFO("mx66l51235f", 0xc2201a, 0, 64 << 10, 1024, ER_4K | ER_32K) }, { INFO("mx66u51235f", 0xc2253a, 0, 64 << 10, 1024, ER_4K | ER_32K) }, { INFO("mx66u1g45g", 0xc2253b, 0, 64 << 10, 2048, ER_4K | ER_32K) }, @@ -405,6 +407,7 @@ typedef enum { PP = 0x02, PP4 = 0x12, PP4_4 = 0x3e, + QPP_1_4_4 = 0x38, DPP = 0xa2, QPP = 0x32, QPP_4 = 0x34, @@ -759,6 +762,7 @@ static void complete_collecting_data(Flash *s) switch (s->cmd_in_progress) { case DPP: + case QPP_1_4_4: case QPP: case QPP_4: case PP: @@ -1255,6 +1259,7 @@ static void decode_new_cmd(Flash *s, uint32_t value) "QIO mode\n", s->cmd_in_progress); } break; + case QPP_1_4_4: case QPP: case QPP_4: case PP4_4: diff --git a/hw/block/m25p80_sfdp.c b/hw/block/m25p80_sfdp.c index 8ac603e212..29fc6aa5af 100644 --- a/hw/block/m25p80_sfdp.c +++ b/hw/block/m25p80_sfdp.c @@ -135,6 +135,26 @@ define_sfdp_read(mt35xu02g); * Matronix */ +static const uint8_t sfdp_mx25r6435[] = { + 0x53, 0x46, 0x44, 0x50, 0x06, 0x01, 0x00, 0xff, + 0x00, 0x06, 0x01, 0x10, 0x10, 0x00, 0x00, 0xff, + 0xe5, 0x20, 0xf1, 0xff, 0xff, 0xff, 0xff, 0x03, + 0x44, 0xeb, 0x08, 0x6b, 0x08, 0x3b, 0x04, 0xbb, + 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, + 0xff, 0xff, 0x00, 0xff, 0x0c, 0x20, 0x0f, 0x52, + 0x10, 0xd8, 0x00, 0xff, 0x23, 0x72, 0xf5, 0x00, + 0x82, 0xed, 0x04, 0xcc, 0x44, 0x83, 0x68, 0x44, + 0x30, 0xb0, 0x30, 0xb0, 0xf7, 0xc4, 0xd5, 0x5c, + 0x00, 0xbe, 0x29, 0xff, 0xf0, 0xd0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; +define_sfdp_read(mx25r6435) + /* mx25l25635e. No 4B opcodes */ static const uint8_t sfdp_mx25l25635e[] = { 0x53, 0x46, 0x44, 0x50, 0x00, 0x01, 0x01, 0xff, diff --git a/hw/block/m25p80_sfdp.h b/hw/block/m25p80_sfdp.h index 61544fb7cc..da3e7d74bc 100644 --- a/hw/block/m25p80_sfdp.h +++ b/hw/block/m25p80_sfdp.h @@ -19,6 +19,7 @@ uint8_t m25p80_sfdp_n25q256a(uint32_t addr); uint8_t m25p80_sfdp_mt35xu01g(uint32_t addr); uint8_t m25p80_sfdp_mt35xu02g(uint32_t addr); +uint8_t m25p80_sfdp_mx25r6435(uint32_t addr); uint8_t m25p80_sfdp_mx25l25635e(uint32_t addr); uint8_t m25p80_sfdp_mx25l25635f(uint32_t addr); uint8_t m25p80_sfdp_mx66l1g45g(uint32_t addr); -- 2.49.1
