PDK API Guide for J721E
board.h File Reference

Introduction

The Board Library is a thin utility layer on top of CSL and other board utilities. It provides uniform APIs for all supported boards. It aims to assist user to quickly write portable applications for its supported boards by hiding board level details from the user.

Go to the source code of this file.

Data Structures

struct  Board_IDInfo
 This structure contains board specific information. More...
 
struct  __attribute__
 This structure contains board specific information. More...
 
struct  __attribute__
 This structure contains board specific information. More...
 
struct  __attribute__
 This structure contains board specific information. More...
 
struct  __attribute__
 This structure contains board specific information. More...
 
struct  __attribute__
 This structure contains board specific information. More...
 
struct  Board_SoCInfo
 This structure contains SoC specific information. More...
 

Macros

#define BOARD_CACHE_LINE_SIZE   (128)
 Board Library uses basic C99 data types. The basic types used are uint32_t, int32_t, uint8_t, int8_t, uint16_t and int16_t. The standard C char is used for strings. Complex types (or typdefs) if used are defined within this header file. More...
 
#define board_roundup(n, w)   (((n) + (w) - 1) & ~((w) - 1))
 
#define BOARD_SOK   0
 
#define BOARD_INVALID_PARAM   -1
 
#define BOARD_UNSUPPORTED_FEATURE   -2
 
#define BOARD_I2C_OPEN_FAIL   -3
 
#define BOARD_I2C_TRANSFER_FAIL   -4
 
#define BOARD_PINMUX_BAD_MEM_REGION   -5
 
#define BOARD_INIT_CLOCK_FAIL   -6
 
#define BOARD_INIT_DDR_FAIL   -7
 
#define BOARD_PINMUX_INVALID_MODE   -8
 
#define BOARD_FAIL   -10
 
#define BOARD_MAX_ID_STR_LEN   (20U)
 
#define BOARD_DDR_INFO_MAX   (4U)
 
#define BOARD_BOARD_NAME_LEN   (16U)
 
#define BOARD_DESIGN_REV_LEN   (2U)
 
#define BOARD_PROC_NUM_LEN   (4U)
 
#define BOARD_VARIANT_LEN   (2U)
 
#define BOARD_PCBREV_LEN   (2U)
 
#define BOARD_SCHMBOM_REV_LEN   (2U)
 
#define BOARD_SWREV_LEN   (2U)
 
#define BOARD_VENDORID_LEN   (2U)
 
#define BOARD_BUILD_WEEK_LEN   (2U)
 
#define BOARD_BUILD_YEAR_LEN   (2U)
 
#define BOARD_BOARDID_LEN   (6U)
 
#define BOARD_SERIAL_NUM_LEN   (4U)
 
#define BOARD_MAC_ADDR_LEN   (192U)
 
#define BOARD_SYS_CLK_DEFAULT   (0xFFFFFFFFU)
 
#define BOARD_INIT_ALL   (0xFFFFFFFFU)
 
#define BOARD_INIT_UNLOCK_MMR   (1 << 1U)
 
#define BOARD_INIT_PLL   (1 << 2U)
 
#define BOARD_INIT_PLL_MCU   (1 << 3U)
 
#define BOARD_INIT_PLL_MAIN   (1 << 4U)
 
#define BOARD_INIT_MODULE_CLOCK   (1 << 5U)
 
#define BOARD_INIT_MODULE_CLOCK_MCU   (1 << 6U)
 
#define BOARD_INIT_MODULE_CLOCK_MAIN   (1 << 7U)
 
#define BOARD_INIT_DDR   (1 << 8U)
 
#define BOARD_INIT_WATCHDOG_DISABLE   (1 << 9U)
 
#define BOARD_INIT_PINMUX_CONFIG   (1 << 10U)
 
#define BOARD_INIT_PINMUX_CONFIG_MAIN   (1 << 11U)
 
#define BOARD_INIT_PINMUX_CONFIG_MCU   (1 << 12U)
 
#define BOARD_INIT_UART_STDIO   (1 << 13U)
 
#define BOARD_INIT_ICSS_PINMUX   (1 << 14U)
 
#define BOARD_INIT_ETH_PHY   (1 << 15U)
 
#define BOARD_INIT_ECC   (1 << 16U)
 
#define BOARD_INIT_PLL_OPP_HIGH   (1 << 17U)
 
#define BOARD_INIT_PLL_OPP_OD   (1 << 18U)
 
#define BOARD_INIT_PLL_OPP_NOM   (1 << 19U)
 
#define BOARD_INIT_ICSS_ETH_PHY   (1 << 20U)
 
#define BOARD_INIT_EMIF_PINMUX   (1 << 21U)
 
#define BOARD_INIT_DDR_ECC   (1 << 22U)
 
#define BOARD_INIT_SERDES_PHY   (1 << 23U)
 
#define BOARD_INIT_I2C   (1 << 24U)
 
#define BOARD_DEINIT_I2C   (1 << 25U)
 
#define BOARD_INIT_CPSW9G_ETH_PHY   (1 << 26U)
 
#define BOARD_INIT_ENETCTRL_CPSW3G   (1 << 27U)
 
#define BOARD_INIT_ENETCTRL_CPSW2G   (1 << 27U)
 
#define BOARD_INIT_ENETCTRL_CPSW9G   (1 << 28U)
 
#define BOARD_INIT_ENETCTRL_ICSS   (1 << 29U)
 
#define BOARD_INIT_DEFAULT   BOARD_INIT_ALL
 
#define BOARD_INIT_CPSW5G_ETH_PHY   (BOARD_INIT_CPSW9G_ETH_PHY)
 
#define BOARD_INIT_ENETCTRL_CPSW5G   (BOARD_INIT_ENETCTRL_CPSW9G)
 
#define BOARD_INIT_CPSW2G_MAIN_ETH_PHY   (1 << 24U)
 
#define BOARD_INIT_ENETCTRL_CPSW2G_MAIN   (1 << 25U)
 
#define BOARD_DEINIT_ALL   (0xFFFFFFFFU)
 
#define BOARD_DEINIT_LOCK_MMR   (1 << 1U)
 
#define BOARD_DEINIT_MODULE_CLOCK   (1 << 2U)
 
#define BOARD_DEINIT_UART_STDIO   (1 << 3U)
 
#define BOARD_DEINIT_DEFAULT   BOARD_DEINIT_ALL
 
#define BOARD_RESOURCE_ALL   (0xFFFFU)
 
#define BOARD_RESOURCE_MMR   (1U)
 
#define BOARD_RESOURCE_MODULE_CLOCK   (2U)
 
#define BOARD_RESOURCE_UART_STDIO   (3U)
 
#define BOARD_RESOURCE_SCICLIENT   (4U)
 

Typedefs

typedef uint32_t Board_initCfg
 
typedef void(* Board_thermalMgmtCallbackFunction_t) (Board_DDRTempEventType DDRTempEventType)
 

Enumerations

enum  Board_DDRTempEventType {
  BOARD_DDR_TEMP_EVENT_TEMP_ALERT = 1, BOARD_DDR_TEMP_EVENT_LOW_TEMP_ALARM = 2, BOARD_DDR_TEMP_EVENT_TEMP_CHANGE_4X_REFRESH = 3, BOARD_DDR_TEMP_EVENT_TEMP_CHANGE_2X_REFRESH = 4,
  BOARD_DDR_TEMP_EVENT_TEMP_CHANGE_1X_REFRESH = 5, BOARD_DDR_TEMP_EVENT_TEMP_CHANGE_1_BY_2_REFRESH = 6, BOARD_DDR_TEMP_EVENT_TEMP_CHANGE_1_BY_4_REFRESH = 7, BOARD_DDR_TEMP_EVENT_TEMP_CHANGE_1_BY_4_REFRESH_WITH_DERATING = 8,
  BOARD_DDR_TEMP_EVENT_HIGH_TEMP_ALARM = 9
}
 Enumeration of reported temperature event types. More...
 

Functions

Board_STATUS Board_getIDInfo (Board_IDInfo *info)
 Get board information. More...
 
Board_STATUS Board_getIDInfo_v2 (Board_IDInfo_v2 *info, uint8_t slaveAddress)
 Get board information - v2. More...
 
Board_STATUS Board_writeIDInfo_v2 (Board_IDInfo_v2 *info, uint8_t slaveAddress)
 Set board information - v2. More...
 
Board_STATUS Board_getSoCInfo (Board_SoCInfo *socInfo)
 Get SoC information. More...
 
Board_STATUS Board_init (Board_initCfg cfg)
 Initialization functions for a specific board. More...
 
Board_STATUS Board_initLite (Board_initCfg cfg)
 Board library initialization function with limited module initializations. More...
 
Board_STATUS Board_deinit (Board_initCfg cfg)
 Board library deinitialization function. More...
 
Board_STATUS Board_releaseResource (uint32_t resourceID)
 Board library function to release the resources. More...
 
Board_STATUS Board_DDRTempMonitoringInit (Board_thermalMgmtCallbackFunction_t callbackFunction)
 Initialize Board DDR Temperature monitoring. More...