NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
qspi_flash.h File Reference

Detailed Description

NVIDIA Quickboot Interface: QSPIFLASH Access

Description: This file declares APIs for accessing QSPIFLASH.

Definition in file qspi_flash.h.

Go to the source code of this file.

Data Structures

struct  QspiAsyncIOStatus
 Holds the QSPI Asynchronous transfer descriptor. More...
 
struct  QspiFlashInfo
 QSPI flash info. More...
 
struct  QspiFlashDevice
 Holds the QSPI Flash device context. More...
 

Macros

#define QSPI_FLASH_MAX_INSTANCES   1
 Defines the number of flash chips. More...
 
#define QSPI_READ_ASYNC_PAGE_SIZE   (256 * KB)
 Defines the maximum page size for asynchronous transfer. More...
 
#define QSPI_READ_ASYNC_PAGE_SIZE_LZF   (256 * KB)
 Defines the maximum page size for asynchronous transfer for LZF stream decompression. More...
 
#define QSPI_FLASH_CMD_REMS   0x90U
 Defines Flash Commands. More...
 
#define QSPI_FLASH_CMD_RDID   0x9FU
 
#define QSPI_FLASH_CMD_RES   0xABU
 
#define QSPI_FLASH_CMD_RSFDP   0x5AU
 
#define QSPIFLASH_DDR_QUAD_READ_COMMAND   0xeeU
 
#define QSPIFLASH_SDR_QUAD_READ_COMMAND   0xecU
 
#define QSPI_FLASH_WRITE_COMMAND   0x12U
 
#define QSPI_FLASH_SECTOR_ERASE_COMMAND   0xDCU
 
#define QSPI_FLASH_SUB_SECTOR_ERASE_COMMAND   0x21U
 
#define QSPI_FLASH_QUAD_ENABLE   0x02
 
#define QSPI_FLASH_QUAD_DISABLE   0x0
 
#define QSPI_FLASH_WEL_ENABLE   0x02
 
#define QSPI_FLASH_WEL_DISABLE   0x00
 
#define QSPI_FLASH_PROGRAM_ERR   (1 << 6)
 
#define QSPI_FLASH_ERASE_ERR   (1 << 5)
 
#define QSPI_FLASH_WIP_ENABLE   0x01
 
#define QSPI_FLASH_WIP_ENABLE   0x01
 
#define QSPI_FLASH_WIP_WAIT_TIME   1000
 
#define QSPI_FLASH_CMD_RDSR1   0x5
 
#define QSPI_FLASH_CMD_RDCR   0x35
 
#define QSPI_FLASH_CMD_MODE_RESET   0xFF
 
#define QSPI_FLASH_CMD_WRR   0x1
 
#define QSPI_FLASH_CMD_WRAR   0x71
 
#define QSPI_FLASH_CMD_CLEAR_STATUS   0x82
 
#define QSPI_FLASH_CMD_WRITE_ENABLE   0x06
 
#define QSPI_FLASH_CMD_WRITE_DISABLE   0x04
 
#define QSPI_FLASH_CMD_WRAR_CR1V   0x800002
 
#define QSPI_DEFAULT_DUMMY_CYCLES   0
 
#define QSPI_FLASH_NUM_OF_TRANSFERS   3
 
#define QSPI_FLASH_COMMAND_WIDTH   1
 
#define QSPI_FLASH_ADDRESS_WIDTH   4
 
#define QSPI_FLASH_QSPI_FLASH_DATA_TRANSFER   2
 
#define QSPI_FLASH_MAX_TRANSFER_SIZE(_a)   QSPI_FLASH_SIZE(_a)
 
#define QSPI_FLASH_CMD_MODE_VAL   0x0
 
#define QSPI_FLASH_ADDR_DATA_MODE_VAL   0x0
 
#define QSPI_FLASH_CLEAR_STATUS_WAIT_TIME   100
 
#define QSPI_FLASH_WRITE_ENABLE_WAIT_TIME   100
 
#define QSPI_FLASH_WE_RETRY_COUNT   100
 
#define PAGE_WRITE_SIZE   256
 
#define MANUFACTURE_ID_SPANSION   0x01U
 Manufacturer ID. More...
 
#define MANUFACTURE_ID_WINBOND   0xEFU
 
#define MANUFACTURE_ID_MICRON   0x20U
 
#define MANUFACTURE_ID_MACRONIX   0xC2U
 
#define DEVICE_ID_LEN   3U
 
#define FLAG_PAGE512   0x01U
 Bit definitions of flag in vendor_info. More...
 
#define FLAG_QPI   0x02U
 
#define FLAG_QUAD   0x04U
 
#define FLAG_BULK   0x08U
 
#define FLAG_PAGE_SIZE_512   0x10U
 
#define FLAG_DDR   0x20U
 
#define FLAG_UNIFORM   0x40U
 
#define FLAG_PAGE512_FIXED   0x80U
 
#define QSPI_FLASH_SIZE(_a)   ((1 << (_a)->pFlashInfo->SectorSize) * (1 << (_a)->pFlashInfo->SectorCnt))
 Macro definitions. More...
 
#define QSPI_FLASH_SECTOR_SIZE(_a)   (1 << (_a)->pFlashInfo->SectorSize)
 
#define QSPI_FLASH_SECTORS(_a)   (1 << (_a)->pFlashInfo->SectorCnt)
 
#define QSPI_FLASH_SUB_SECTOR_SIZE(_a)   (1 << (_a)->pFlashInfo->SubSectorSize)
 
#define QSPI_FLASH_SUB_SECTORS(_a)   ((_a)->pFlashInfo->SubSectorCnt)
 
#define QSPI_FLASH_SUB_SECTOR_LOC   0
 

Typedefs

typedef struct QspiAsyncIOStatus QspiAsyncIOStatus_t
 Holds the QSPI Asynchronous transfer descriptor. More...
 
typedef struct QspiFlashInfo QspiFlashInfo_t
 QSPI flash info. More...
 
typedef struct QspiFlashDevice QspiFlashDevice
 Holds the QSPI Flash device context. More...
 

Enumerations

enum  QspiXferStatus_t {
  COMPLETED,
  ONGOING
}
 Defines the QSPI Transfer status, where completed = 0. More...
 

Functions

NvError QbQspiInit (void)
 Performs QSPI flash driver initialization. More...
 

Variables

struct QspiFlashInfo QbFlashInfoList []
 
QspiFlashDeviceps_QspiFlash [QSPI_FLASH_MAX_INSTANCES]