Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
spiFlash_list.h File Reference
#include <stdint.h>
#include <stddef.h>
#include "type.h"
#include "soc.h"

Go to the source code of this file.

Overview

SPI Flash Device Database and Capability Flags.

Author
Efinix Inc

This file defines the supported Flash devices, their JEDEC IDs, and capability flags (Profiles) used by the driver to handle vendor-specific quirks (Winbond vs Macronix vs ISSI).

Definition in file spiFlash_list.h.

Data Structures

struct  spiFlash_info_t
 SPI Flash Device Descriptor. More...

Macros

Addressing & Boot Flags

Capabilities related to memory size and startup state.

#define FLAG_4BYTE_SUPPORT   (1 << 0)
 Supports 4-Byte Addressing Mode.
#define FLAG_4BYTE_EXIT_ISSI   (1 << 1)
 Quirk: ISSI-Specific 4-Byte Exit.
#define FLAG_UNLOCK_ON_PROBE   (1 << 2)
 Quirk: Auto-Lock on Power Up.
Quad Enable (QE) Method Flags

Defines how to enable QSPI mode (Quad I/O).

There is no standard JEDEC command to enable Quad mode. Each vendor implements this differently.

#define FLAG_QE_SR2_BIT1   (1 << 3)
 Method A: Winbond Style (Status Register 2).
#define FLAG_QE_SR1_BIT6   (1 << 4)
 Method B: Macronix/ISSI Style (Status Register 1).
#define FLAG_QE_CMD_38   (1 << 5)
 Method C: GigaDevice Command.
Read Mode Capabilities

Supported high-speed read commands.

#define FLAG_DREAD_SUPPORT   (1 << 6)
 Supports Dual Output Read (1-1-2).
#define FLAG_QREAD_SUPPORT   (1 << 7)
 Supports Quad Output Read (1-1-4).
Helper Masks

Macros for internal logic simplification.

#define FLAG_QE_ENABLE_VIA_SR   (FLAG_QE_SR2_BIT1 | FLAG_QE_SR1_BIT6)
 Check if QE requires a Status Register Write.
Vendor Profiles
#define PROFILE_WINBOND_64   (FLAG_DREAD_SUPPORT | FLAG_QREAD_SUPPORT | FLAG_QE_SR2_BIT1)
#define PROFILE_WINBOND_128   (FLAG_DREAD_SUPPORT | FLAG_QE_SR2_BIT1)
#define PROFILE_MACRONIX_LARGE
#define PROFILE_ISSI_LARGE
#define PROFILE_GIGA_LARGE   (FLAG_QREAD_SUPPORT | FLAG_4BYTE_SUPPORT | FLAG_QE_CMD_38 )
GigaDevice IDs
#define JEDEC_ID_GD25LB512MEYIGR   0xC8671A00
 GigaDevice 512Mb (Ti375N1156).
Winbond IDs
#define JEDEC_ID_W25Q128JVSIQ   0xEF401800
 Winbond 128Mb (T120F576/T120F324).
#define JEDEC_ID_W25Q64JWSSIQ   0xEF601700
 Winbond 64Mb (Ti60F225).
Macronix IDs
#define JEDEC_ID_MX25U25645GZ4I00   0xC2253900
 Macronix 256Mb (Ti180J484).
ISSI IDs
#define JEDEC_ID_IS25WP512M   0x9D701A00
 ISSI 512Mb (Ti375C529).
Generic / Error Codes
#define JEDEC_ID_UNSupported   0xFFFFFFFF

Typedefs

typedef int(* flash_hook) (void *flash_instance)
 Post-Initialization Hook Function Pointer.

Variables

const spiFlash_info_t known_flash []
 Supported Flash Info.