PDK API Guide for J721E
Pmic_CoreCfg_t Struct Reference

Detailed Description

PMIC configuration structure. Contains various parameters which are needed to prepare PMIC driver handle using Valid params. like, PMIC device type, PMIC interface mode, Slave address, various application defined API function pointers for LLD and Critical sections. Application has to set the corresponding bit in validParams structure member to update the driver with Pmic_CoreCfg_t structure fields. For Example, If the Application needs to configure the PMIC driver pmicDeviceType member of the structure then application has to set PMIC_CFG_DEVICE_TYPE_VALID bit of validParams struct and then call pmic_init().

Parameters
validParamsValidate params Bits. Selection of structure parameters to be set, from the combination of Pmic_ValidParamCfg and the corresponding member value must be updated.
instTypeInstance type. For Valid Values: Pmic_InstType.
pmicDeviceTypePMIC device type. For Valid Values: Pmic_DeviceType Valid only when PMIC_CFG_DEVICE_TYPE_VALID bit of validParams is set.
commModeInterface mode - Single I2C, Dual I2C or SPI. For Valid Values: Pmic_CommMode. Valid only when PMIC_CFG_COMM_MODE_VALID bit of validParams is set.
slaveAddrMain Interface Slave Address. Valid only when PMIC_CFG_SLAVEADDR_VALID bit of validParams is set.
qaSlaveAddrWDOG QA Interface Slave Address. Valid only when PMIC_CFG_QASLAVEADDR_VALID bit of validParams is set.
nvmSlaveAddrNVM Slave Address which provides only read access to CRC status of Page-1 Application shall use this slave address to read only CRC status. Application shall not do any write operations using this slave address Valid only when PMIC_CFG_NVMSLAVEADDR_VALID bit of validParams is set.
i2c1SpeedConfigures I2C1 Speed when commMode is Single or Dual I2C For Valid Values: Pmic_I2CSpeedSel Valid only when PMIC_CFG_I2C1_SPEED_VALID bit is set
i2c2SpeedConfigures I2C2 Speed when commMode is Dual I2C For Valid Values: Pmic_I2CSpeedSel Valid only when PMIC_CFG_I2C2_SPEED_VALID bit is set
pFnPmicCommIoReadPointer to I2C/SPI Comm LLD Read Function. Valid only when PMIC_CFG_COMM_IO_RD_VALID bit of validParams is set.
pFnPmicCommIoWritePointer to I2C/SPI Comm LLD Write Function. Valid only when PMIC_CFG_COMM_IO_WR_VALID bit of validParams is set.
pCommHandlePointer to Handle for I2C1/SPI Main Interface. Valid only when PMIC_CFG_COMM_HANDLE_VALID bit of validParams is set.
pQACommHandlePointer to Handle for I2C2-QA Interface. Valid only when PMIC_CFG_QACOMM_HANDLE_VALID bit of validParams is set.
pFnPmicCritSecStartPointer to Pmic Critical-Section Start Function. Valid only when PMIC_CFG_CRITSEC_START_VALID bit of validParams is set.
pFnPmicCritSecStopPointer to Pmic Critical-Section Stop Function. Valid only when PMIC_CFG_CRITSECSTOP_VALID bit of validParams is set.

Data Fields

uint32_t validParams
 
uint32_t instType
 
uint8_t pmicDeviceType
 
uint8_t commMode
 
uint8_t slaveAddr
 
uint8_t qaSlaveAddr
 
uint8_t nvmSlaveAddr
 
uint8_t i2c1Speed
 
uint8_t i2c2Speed
 
void * pCommHandle
 
void * pQACommHandle
 
int32_t(* pFnPmicCommIoRead )(struct Pmic_CoreHandle_s *pmicCorehandle, uint8_t instType, uint16_t regAddr, uint8_t *pRxBuf, uint8_t bufLen)
 
int32_t(* pFnPmicCommIoWrite )(struct Pmic_CoreHandle_s *pmicCorehandle, uint8_t instType, uint16_t regAddr, uint8_t *pTxBuf, uint8_t bufLen)
 
void(* pFnPmicCritSecStart )(void)
 
void(* pFnPmicCritSecStop )(void)
 

Field Documentation

◆ validParams

uint32_t Pmic_CoreCfg_t::validParams

◆ instType

uint32_t Pmic_CoreCfg_t::instType

◆ pmicDeviceType

uint8_t Pmic_CoreCfg_t::pmicDeviceType

◆ commMode

uint8_t Pmic_CoreCfg_t::commMode

◆ slaveAddr

uint8_t Pmic_CoreCfg_t::slaveAddr

◆ qaSlaveAddr

uint8_t Pmic_CoreCfg_t::qaSlaveAddr

◆ nvmSlaveAddr

uint8_t Pmic_CoreCfg_t::nvmSlaveAddr

◆ i2c1Speed

uint8_t Pmic_CoreCfg_t::i2c1Speed

◆ i2c2Speed

uint8_t Pmic_CoreCfg_t::i2c2Speed

◆ pCommHandle

void* Pmic_CoreCfg_t::pCommHandle

◆ pQACommHandle

void* Pmic_CoreCfg_t::pQACommHandle

◆ pFnPmicCommIoRead

int32_t(* Pmic_CoreCfg_t::pFnPmicCommIoRead) (struct Pmic_CoreHandle_s *pmicCorehandle, uint8_t instType, uint16_t regAddr, uint8_t *pRxBuf, uint8_t bufLen)

◆ pFnPmicCommIoWrite

int32_t(* Pmic_CoreCfg_t::pFnPmicCommIoWrite) (struct Pmic_CoreHandle_s *pmicCorehandle, uint8_t instType, uint16_t regAddr, uint8_t *pTxBuf, uint8_t bufLen)

◆ pFnPmicCritSecStart

void(* Pmic_CoreCfg_t::pFnPmicCritSecStart) (void)

◆ pFnPmicCritSecStop

void(* Pmic_CoreCfg_t::pFnPmicCritSecStop) (void)