PDK API Guide for J721E
PMIC FSM Driver API

Introduction

This Module explains about PMIC FSM driver parameters and APIs usage. PMIC FSM Driver module covers all FSM features APIs. Like, set/get FSM states, enable FSM I2C Triggers, Mask and Unmask NSLEEP Signals and trigger Runtime BIST

Supported PMIC devices for FSM Module:

  1. TPS6594x (Leo PMIC Device)
  2. LP8764x (Hera PMIC Device)

Files

file  pmic_fsm.h
 PMIC Low Level Driver API/interface file for FSM API.
 

Data Structures

struct  Pmic_FsmCfg_t
 PMIC FSM configuration structure. Note: validParams is input param for all Set and Get APIs. other params except validParams is input param for Set APIs and output param for Get APIs. More...
 

Functions

int32_t Pmic_fsmDeviceOffRequestCfg (Pmic_CoreHandle_t *pPmicCoreHandle, uint8_t eventType, uint8_t fsmState)
 API to initiate OFF Request FSM transition. More...
 
int32_t Pmic_fsmDeviceOnRequest (Pmic_CoreHandle_t *pPmicCoreHandle)
 API to initiate ON Request FSM transition. More...
 
int32_t Pmic_fsmSetMissionState (Pmic_CoreHandle_t *pPmicCoreHandle, const uint8_t pmicState)
 API to Set FSM mission States. More...
 
int32_t Pmic_fsmSetNsleepSignalMask (Pmic_CoreHandle_t *pPmicCoreHandle, const bool nsleepType, const bool maskEnable)
 API to MASK/UNMASK NSLEEP1B or 2B Signal. More...
 
int32_t Pmic_fsmGetNsleepSignalMaskStat (Pmic_CoreHandle_t *pPmicCoreHandle, const bool nsleepType, bool *pNsleepStat)
 API to read the status of the NSLEEP1B/2B Signal is masked or not. More...
 
int32_t Pmic_fsmRequestRuntimeBist (Pmic_CoreHandle_t *pPmicCoreHandle)
 API to initiate Runtime BIST. More...
 
int32_t Pmic_fsmSetConfiguration (Pmic_CoreHandle_t *pPmicCoreHandle, const Pmic_FsmCfg_t fsmCfg)
 API to set PMIC FSM configuration. More...
 
int32_t Pmic_fsmGetConfiguration (Pmic_CoreHandle_t *pPmicCoreHandle, Pmic_FsmCfg_t *pFsmCfg)
 API to get PMIC FSM configuration. More...
 
int32_t Pmic_fsmSetPfsmDelay (Pmic_CoreHandle_t *pPmicCoreHandle, const uint8_t pFsmDelayType, const uint8_t pfsmDelay)
 API to configure PFSM Delay. More...
 
int32_t Pmic_fsmGetPfsmDelay (Pmic_CoreHandle_t *pPmicCoreHandle, uint8_t pFsmDelayType, uint8_t *pPfsmDelay)
 API to read PFSM Delay. More...
 
int32_t Pmic_fsmSetNsleepSignalVal (Pmic_CoreHandle_t *pPmicCoreHandle, const bool nsleepType, const uint8_t nsleepVal)
 API to set PMIC Nsleep1B/2B Signal value. More...
 
int32_t Pmic_fsmGetNsleepSignalVal (Pmic_CoreHandle_t *pPmicCoreHandle, const bool nsleepType, uint8_t *pNsleepVal)
 API to get PMIC Nsleep1B/2B Signal value. More...
 
int32_t Pmic_fsmRecoverSocPwrErr (Pmic_CoreHandle_t *pPmicCoreHandle, const uint8_t nsleepVal)
 API to recover from SOC Power Error using Nsleep1B and Nsleep2B signal. More...
 
int32_t Pmic_fsmEnableI2cTrigger (Pmic_CoreHandle_t *pPmicCoreHandle, const uint8_t i2cTriggerType, const uint8_t i2cTriggerVal)
 API to initiate FSM I2C trigger for given FSM I2C trigger type. More...
 
int32_t Pmic_fsmGetI2cTriggerVal (Pmic_CoreHandle_t *pPmicCoreHandle, const uint8_t i2cTriggerType, uint8_t *pI2cTriggerVal)
 API to get FSM I2C trigger Value for given FSM I2C trigger type. More...
 
int32_t Pmic_fsmRequestDdrGpioRetentionMode (Pmic_CoreHandle_t *pPmicCoreHandle, const uint8_t retentionMode, const uint8_t i2cTriggerVal)
 API to initiate DDR/GPIO Retention Mode. More...
 

PMIC FSM Off Request Type

#define PMIC_FSM_I2C_TRIGGER0_TYPE   (0U)
 
#define PMIC_FSM_ENABLE_PIN_TYPE   (1U)
 
#define PMIC_FSM_NPWRON_PIN_TYPE   (2U)
 

To Select PMIC FSM State

#define PMIC_FSM_STANBY_STATE   (0U)
 
#define PMIC_FSM_LP_STANBY_STATE   (1U)
 
#define PMIC_FSM_ACTIVE_STATE   (2U)
 
#define PMIC_FSM_MCU_ONLY_STATE   (3U)
 
#define PMIC_FSM_S2R_STATE   (4U)
 

PMIC Nsleep Signals

#define PMIC_NSLEEP1_SIGNAL   (bool)false
 
#define PMIC_NSLEEP2_SIGNAL   (bool)true
 

PMIC Nsleep Masking/Unmasking

#define PMIC_NSLEEPX_MASK   1U
 
#define PMIC_NSLEEPX_UNMASK   0U
 

PMIC Fast BIST Enable/Disable

   This affects whether or not LBIST can be skipped to save boot up time
   from LP_STANDBY state.
   Application need to configure this before the device is turned off
   (using ENABLE pin or TRIGGER_I2C_0 bit) and enters LP_STANDBY state
#define PMIC_FSM_FAST_BIST_ENABLE   1U
 Only analog BIST is run at BOOT BIST. More...
 
#define PMIC_FSM_FAST_BIST_DISABLE   0U
 Logic and analog BIST is run at BOOT BIST. More...
 

PMIC Nsleep FSM configuration

#define PMIC_NSLEEP1B_FSM_UNMASK   (0U)
 
#define PMIC_NSLEEP1B_FSM_MASK   (1U)
 
#define PMIC_NSLEEP2B_FSM_UNMASK   (0U)
 
#define PMIC_NSLEEP2B_FSM_MASK   (1U)
 

Select PMIC FSM Startup Destination

#define PMIC_FSM_STARTUPDEST_STANDBY_LPSTANDBY   (0U)
 Selects PMIC FSM Startup Destination as STANDBY state or LPSTANDBY state based on LP_STANDBY_SEL. More...
 
#define PMIC_FSM_STARTUPDEST_MCUONLY   (2U)
 Selects PMIC FSM Startup Destination as MCU only state. More...
 
#define PMIC_FSM_STARTUPDEST_ACTIVE   (3U)
 Selects PMIC FSM Startup Destination as Active state. More...
 

PMIC LPSTANDBY State Selection

#define PMIC_FSM_SELECT_LPSTANDBY_STATE   1U
 
#define PMIC_FSM_SELECT_STANDBY_STATE   0U
 

To Enable/Disable PMIC Buck/LDO regulators ILIM interrupts affect

FSM triggers

#define PMIC_FSM_ILIM_INT_FSMCTRL_ENABLE   1U
 
#define PMIC_FSM_ILIM_INT_FSMCTRL_DISABLE   0U
 

PMIC PFSM Delay Type

#define PMIC_PFSM_DELAY1   (0U)
 
#define PMIC_PFSM_DELAY2   (1U)
 
#define PMIC_PFSM_DELAY3   (2U)
 
#define PMIC_PFSM_DELAY4   (3U)
 

PMIC FSM Configuration Structure Param Bits

PMIC FSM valid params configuration type for the structure member validParams of Pmic_FsmCfg_t structure

#define PMIC_FSM_CFG_FAST_BIST_EN_VALID   (0U)
 validParams value used to set/get to Enable/Disable Fast BIST More...
 
#define PMIC_FSM_CFG_LP_STANDBYSEL_VALID   (1U)
 validParams value used to set/get Low Power Standby State Selection More...
 
#define PMIC_FSM_CFG_ILIM_INT_FSMCTRL_EN_VALID   (2U)
 validParams value used to set/get to Enable/Disable Buck/LDO regulators ILIM interrupts affect FSM triggers More...
 
#define PMIC_FSM_CFG_FSM_STARTUP_DEST_SEL_VALID   (3U)
 validParams value used to set/get to Select FSM Startup Destination More...
 

PMIC FSM Configuration valid param bit shift values

Application can use below shifted values to set the validParam member defined in Pmic_FsmCfg_t structure

#define PMIC_FSM_CFG_FAST_BIST_EN_VALID_SHIFT   (1U << PMIC_FSM_CFG_FAST_BIST_EN_VALID)
 
#define PMIC_FSM_CFG_LP_STANDBYSEL_VALID_SHIFT   (1U << PMIC_FSM_CFG_LP_STANDBYSEL_VALID)
 
#define PMIC_FSM_CFG_ILIM_INT_FSMCTRL_EN_VALID_SHIFT   (1U << PMIC_FSM_CFG_ILIM_INT_FSMCTRL_EN_VALID)
 
#define PMIC_FSM_CFG_FSM_STARTUP_DEST_SEL_VALID_SHIFT   (1U << PMIC_FSM_CFG_FSM_STARTUP_DEST_SEL_VALID)
 

PMIC Nsleep 1B/2B signal level

#define PMIC_NSLEEP_LOW   (0U)
 
#define PMIC_NSLEEP_HIGH   (1U)
 

PMIC FSM I2C Trigger Type

#define PMIC_FSM_I2C_TRIGGER0   (0x0U)
 
#define PMIC_FSM_I2C_TRIGGER1   (0x1U)
 Valid only for TPS6594x Leo PMIC PG2.0 and LP8764x Hera PMIC PG2.0. More...
 
#define PMIC_FSM_I2C_TRIGGER2   (0x2U)
 Valid only for TPS6594x Leo PMIC PG2.0 and LP8764x Hera PMIC PG2.0. More...
 
#define PMIC_FSM_I2C_TRIGGER3   (0x3U)
 Configuration of PMIC_FSM_I2C_TRIGGER3 is not supported for TPS6594x Leo and LP8764x Hera PMIC. More...
 
#define PMIC_FSM_I2C_TRIGGER4   (0x4U)
 
#define PMIC_FSM_I2C_TRIGGER5   (0x5U)
 
#define PMIC_FSM_I2C_TRIGGER6   (0x6U)
 
#define PMIC_FSM_I2C_TRIGGER7   (0x7U)
 

PMIC FSM I2C Trigger Value

#define PMIC_FSM_I2C_TRIGGER_VAL_0   (0x0U)
 Valid only for I2C4/ I2C5/ I2C6/ I2C7. More...
 
#define PMIC_FSM_I2C_TRIGGER_VAL_1   (0x1U)
 

PMIC FSM Retention Mode

#define PMIC_FSM_DDR_RETENTION_MODE   (0x0U)
 
#define PMIC_FSM_GPIO_RETENTION_MODE   (0x1U)
 Valid only for J7200 SOC. More...
 

Macro Definition Documentation

◆ PMIC_FSM_I2C_TRIGGER0_TYPE

#define PMIC_FSM_I2C_TRIGGER0_TYPE   (0U)

◆ PMIC_FSM_ENABLE_PIN_TYPE

#define PMIC_FSM_ENABLE_PIN_TYPE   (1U)

◆ PMIC_FSM_NPWRON_PIN_TYPE

#define PMIC_FSM_NPWRON_PIN_TYPE   (2U)

◆ PMIC_FSM_STANBY_STATE

#define PMIC_FSM_STANBY_STATE   (0U)

◆ PMIC_FSM_LP_STANBY_STATE

#define PMIC_FSM_LP_STANBY_STATE   (1U)

◆ PMIC_FSM_ACTIVE_STATE

#define PMIC_FSM_ACTIVE_STATE   (2U)

◆ PMIC_FSM_MCU_ONLY_STATE

#define PMIC_FSM_MCU_ONLY_STATE   (3U)

◆ PMIC_FSM_S2R_STATE

#define PMIC_FSM_S2R_STATE   (4U)

◆ PMIC_NSLEEP1_SIGNAL

#define PMIC_NSLEEP1_SIGNAL   (bool)false

◆ PMIC_NSLEEP2_SIGNAL

#define PMIC_NSLEEP2_SIGNAL   (bool)true

◆ PMIC_NSLEEPX_MASK

#define PMIC_NSLEEPX_MASK   1U

◆ PMIC_NSLEEPX_UNMASK

#define PMIC_NSLEEPX_UNMASK   0U

◆ PMIC_FSM_FAST_BIST_ENABLE

#define PMIC_FSM_FAST_BIST_ENABLE   1U

Only analog BIST is run at BOOT BIST.

◆ PMIC_FSM_FAST_BIST_DISABLE

#define PMIC_FSM_FAST_BIST_DISABLE   0U

Logic and analog BIST is run at BOOT BIST.

◆ PMIC_NSLEEP1B_FSM_UNMASK

#define PMIC_NSLEEP1B_FSM_UNMASK   (0U)

◆ PMIC_NSLEEP1B_FSM_MASK

#define PMIC_NSLEEP1B_FSM_MASK   (1U)

◆ PMIC_NSLEEP2B_FSM_UNMASK

#define PMIC_NSLEEP2B_FSM_UNMASK   (0U)

◆ PMIC_NSLEEP2B_FSM_MASK

#define PMIC_NSLEEP2B_FSM_MASK   (1U)

◆ PMIC_FSM_STARTUPDEST_STANDBY_LPSTANDBY

#define PMIC_FSM_STARTUPDEST_STANDBY_LPSTANDBY   (0U)

Selects PMIC FSM Startup Destination as STANDBY state or LPSTANDBY state based on LP_STANDBY_SEL.

◆ PMIC_FSM_STARTUPDEST_MCUONLY

#define PMIC_FSM_STARTUPDEST_MCUONLY   (2U)

Selects PMIC FSM Startup Destination as MCU only state.

◆ PMIC_FSM_STARTUPDEST_ACTIVE

#define PMIC_FSM_STARTUPDEST_ACTIVE   (3U)

Selects PMIC FSM Startup Destination as Active state.

◆ PMIC_FSM_SELECT_LPSTANDBY_STATE

#define PMIC_FSM_SELECT_LPSTANDBY_STATE   1U

◆ PMIC_FSM_SELECT_STANDBY_STATE

#define PMIC_FSM_SELECT_STANDBY_STATE   0U

◆ PMIC_FSM_ILIM_INT_FSMCTRL_ENABLE

#define PMIC_FSM_ILIM_INT_FSMCTRL_ENABLE   1U

◆ PMIC_FSM_ILIM_INT_FSMCTRL_DISABLE

#define PMIC_FSM_ILIM_INT_FSMCTRL_DISABLE   0U

◆ PMIC_PFSM_DELAY1

#define PMIC_PFSM_DELAY1   (0U)

◆ PMIC_PFSM_DELAY2

#define PMIC_PFSM_DELAY2   (1U)

◆ PMIC_PFSM_DELAY3

#define PMIC_PFSM_DELAY3   (2U)

◆ PMIC_PFSM_DELAY4

#define PMIC_PFSM_DELAY4   (3U)

◆ PMIC_FSM_CFG_FAST_BIST_EN_VALID

#define PMIC_FSM_CFG_FAST_BIST_EN_VALID   (0U)

validParams value used to set/get to Enable/Disable Fast BIST

◆ PMIC_FSM_CFG_LP_STANDBYSEL_VALID

#define PMIC_FSM_CFG_LP_STANDBYSEL_VALID   (1U)

validParams value used to set/get Low Power Standby State Selection

◆ PMIC_FSM_CFG_ILIM_INT_FSMCTRL_EN_VALID

#define PMIC_FSM_CFG_ILIM_INT_FSMCTRL_EN_VALID   (2U)

validParams value used to set/get to Enable/Disable Buck/LDO regulators ILIM interrupts affect FSM triggers

◆ PMIC_FSM_CFG_FSM_STARTUP_DEST_SEL_VALID

#define PMIC_FSM_CFG_FSM_STARTUP_DEST_SEL_VALID   (3U)

validParams value used to set/get to Select FSM Startup Destination

◆ PMIC_FSM_CFG_FAST_BIST_EN_VALID_SHIFT

#define PMIC_FSM_CFG_FAST_BIST_EN_VALID_SHIFT   (1U << PMIC_FSM_CFG_FAST_BIST_EN_VALID)

◆ PMIC_FSM_CFG_LP_STANDBYSEL_VALID_SHIFT

#define PMIC_FSM_CFG_LP_STANDBYSEL_VALID_SHIFT   (1U << PMIC_FSM_CFG_LP_STANDBYSEL_VALID)

◆ PMIC_FSM_CFG_ILIM_INT_FSMCTRL_EN_VALID_SHIFT

#define PMIC_FSM_CFG_ILIM_INT_FSMCTRL_EN_VALID_SHIFT   (1U << PMIC_FSM_CFG_ILIM_INT_FSMCTRL_EN_VALID)

◆ PMIC_FSM_CFG_FSM_STARTUP_DEST_SEL_VALID_SHIFT

#define PMIC_FSM_CFG_FSM_STARTUP_DEST_SEL_VALID_SHIFT   (1U << PMIC_FSM_CFG_FSM_STARTUP_DEST_SEL_VALID)

◆ PMIC_NSLEEP_LOW

#define PMIC_NSLEEP_LOW   (0U)

◆ PMIC_NSLEEP_HIGH

#define PMIC_NSLEEP_HIGH   (1U)

◆ PMIC_FSM_I2C_TRIGGER0

#define PMIC_FSM_I2C_TRIGGER0   (0x0U)

◆ PMIC_FSM_I2C_TRIGGER1

#define PMIC_FSM_I2C_TRIGGER1   (0x1U)

Valid only for TPS6594x Leo PMIC PG2.0 and LP8764x Hera PMIC PG2.0.

◆ PMIC_FSM_I2C_TRIGGER2

#define PMIC_FSM_I2C_TRIGGER2   (0x2U)

Valid only for TPS6594x Leo PMIC PG2.0 and LP8764x Hera PMIC PG2.0.

◆ PMIC_FSM_I2C_TRIGGER3

#define PMIC_FSM_I2C_TRIGGER3   (0x3U)

Configuration of PMIC_FSM_I2C_TRIGGER3 is not supported for TPS6594x Leo and LP8764x Hera PMIC.

◆ PMIC_FSM_I2C_TRIGGER4

#define PMIC_FSM_I2C_TRIGGER4   (0x4U)

◆ PMIC_FSM_I2C_TRIGGER5

#define PMIC_FSM_I2C_TRIGGER5   (0x5U)

◆ PMIC_FSM_I2C_TRIGGER6

#define PMIC_FSM_I2C_TRIGGER6   (0x6U)

◆ PMIC_FSM_I2C_TRIGGER7

#define PMIC_FSM_I2C_TRIGGER7   (0x7U)

◆ PMIC_FSM_I2C_TRIGGER_VAL_0

#define PMIC_FSM_I2C_TRIGGER_VAL_0   (0x0U)

Valid only for I2C4/ I2C5/ I2C6/ I2C7.

◆ PMIC_FSM_I2C_TRIGGER_VAL_1

#define PMIC_FSM_I2C_TRIGGER_VAL_1   (0x1U)

◆ PMIC_FSM_DDR_RETENTION_MODE

#define PMIC_FSM_DDR_RETENTION_MODE   (0x0U)

◆ PMIC_FSM_GPIO_RETENTION_MODE

#define PMIC_FSM_GPIO_RETENTION_MODE   (0x1U)

Valid only for J7200 SOC.

Function Documentation

◆ Pmic_fsmDeviceOffRequestCfg()

int32_t Pmic_fsmDeviceOffRequestCfg ( Pmic_CoreHandle_t pPmicCoreHandle,
uint8_t  eventType,
uint8_t  fsmState 
)

API to initiate OFF Request FSM transition.

Requirement: REQ_TAG(PDK-5851), REQ_TAG(PDK-9159), REQ_TAG(PDK-9329) Design: did_pmic_lpstandby_cfg Architecture: aid_pmic_fsm_cfg

    This function initiate OFF Request FSM transition from any other
    mission state to the STANDBY state or the LP_STANDBY state
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle.
eventType[IN] Event Type used to initiate OFF Request Valid values: Pmic_Fsm_Off_Request_Type
fsmState[IN] FSM state. Only Valid for: PMIC_FSM_STANBY_STATE and PMIC_FSM_LP_STANBY_STATE
Return values
PMIC_ST_SUCCESSin case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmDeviceOnRequest()

int32_t Pmic_fsmDeviceOnRequest ( Pmic_CoreHandle_t pPmicCoreHandle)

API to initiate ON Request FSM transition.

Requirement: REQ_TAG(PDK-5837) Design: did_pmic_fsm_cfg_readback Architecture: aid_pmic_fsm_cfg

    This function setup nSLEEP signal bits with STARTUP_DEST
    Which is common for all supported PMICs. This API needs to be called
    at PMIC init before clearing Enable and Start-Up interrupts.
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
    Note: In this API, the default PMIC device is assumed as TPS6594x
          LEO PMIC. While adding support for New PMIC device, developer
          need to update the API functionality for New PMIC device
          accordingly.

◆ Pmic_fsmSetMissionState()

int32_t Pmic_fsmSetMissionState ( Pmic_CoreHandle_t pPmicCoreHandle,
const uint8_t  pmicState 
)

API to Set FSM mission States.

Requirement: REQ_TAG(PDK-5837), REQ_TAG(PDK-5851) Design: did_pmic_fsm_cfg_readback, did_pmic_lpstandby_cfg Architecture: aid_pmic_fsm_cfg

    This function is used for set/change the FSM mission states for PMIC
    using Nsleep1B and Nsleep2B signals in absence of GPIO pins
    Note: Application need to unmask Nsleep1B and Nsleep2B signals for
          FSM state transitions except for Standby/LpStandby State
          Application need to mask Nsleep1B and Nsleep2B signals for
          Standby/LpStandby State transition
          Application has to ensure the wakeup pins or RTC Timer/Alarm
          Interrupts are configured properly before triggering the PMIC
          device to Standby/LP Standby state.If not configured properly
          then PMIC device can't resume from sleep state
          Application has to ensure to connect/access the peripherals
          connected to only MCU Power lines when PMIC switch from Active
          to MCU state. If Application connects/access the peripherals
          connected to SOC Power lines when PMIC switch from Active to
          MCU state, then Application behaviour is unexpected.
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
pmicState[IN] PMIC FSM mission state Valid values: Pmic_Fsm_Mission_State
Return values
PMIC_ST_SUCCESSin case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmSetNsleepSignalMask()

int32_t Pmic_fsmSetNsleepSignalMask ( Pmic_CoreHandle_t pPmicCoreHandle,
const bool  nsleepType,
const bool  maskEnable 
)

API to MASK/UNMASK NSLEEP1B or 2B Signal.

Requirement: REQ_TAG(PDK-5837) Design: did_pmic_fsm_cfg_readback Architecture: aid_pmic_fsm_cfg

    This function is used for Masking/Unmasking for NSLEEP2B or NSLEEP1B
    signal.
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
nsleepType[IN] NSLEEP signal Valid values: Pmic_Nsleep_Signals
maskEnable[IN] Parameter to select masking/unmasking
Return values
PMIC_ST_SUCCESSin case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmGetNsleepSignalMaskStat()

int32_t Pmic_fsmGetNsleepSignalMaskStat ( Pmic_CoreHandle_t pPmicCoreHandle,
const bool  nsleepType,
bool *  pNsleepStat 
)

API to read the status of the NSLEEP1B/2B Signal is masked or not.

Requirement: REQ_TAG(PDK-9151) Design: did_pmic_fsm_cfg_readback Architecture: aid_pmic_fsm_cfg

    This function is used to read the status of the NSLEEP1B/2B Signal is
    masked or not
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
nsleepType[IN] NSLEEP signal Valid values: Pmic_Nsleep_Signals
pNsleepStat[OUT] Pointer to store Nsleep Signal is masked or not
Return values
PMIC_ST_SUCCESSin case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmRequestRuntimeBist()

int32_t Pmic_fsmRequestRuntimeBist ( Pmic_CoreHandle_t pPmicCoreHandle)

API to initiate Runtime BIST.

Requirement: REQ_TAG(PDK-5849) Design: did_pmic_runtime_bist_cfg Architecture: aid_pmic_fsm_cfg

    This function initiates a request to exercise runtime BIST on the
    device
    Valid only for TPS6594x Leo PMIC PG2.0 and LP8764x Hera PMIC PG2.0
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle.
Return values
PMIC_ST_SUCCESSin case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmSetConfiguration()

int32_t Pmic_fsmSetConfiguration ( Pmic_CoreHandle_t pPmicCoreHandle,
const Pmic_FsmCfg_t  fsmCfg 
)

API to set PMIC FSM configuration.

Requirement: REQ_TAG(PDK-9144), REQ_TAG(PDK-9134), REQ_TAG(PDK-9128) Design: did_pmic_fsm_cfg_readback Architecture: aid_pmic_fsm_cfg

     This function is used to set the required FSM configuration when
     corresponding bit field is set.
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle.
fsmCfg[IN] Set required FSM configuration
Returns
PMIC_ST_SUCCESS in case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmGetConfiguration()

int32_t Pmic_fsmGetConfiguration ( Pmic_CoreHandle_t pPmicCoreHandle,
Pmic_FsmCfg_t pFsmCfg 
)

API to get PMIC FSM configuration.

Requirement: REQ_TAG(PDK-9144), REQ_TAG(PDK-9134), REQ_TAG(PDK-9128) Design: did_pmic_fsm_cfg_readback Architecture: aid_pmic_fsm_cfg

     This function is used to get the FSM configuration when
     corresponding validParam bit fields are set in Pmic_FsmCfg_t
     structure
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
pFsmCfg[IN/OUT] Pointer to store FSM configuration
Returns
PMIC_ST_SUCCESS in case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmSetPfsmDelay()

int32_t Pmic_fsmSetPfsmDelay ( Pmic_CoreHandle_t pPmicCoreHandle,
const uint8_t  pFsmDelayType,
const uint8_t  pfsmDelay 
)

API to configure PFSM Delay.

Requirement: REQ_TAG(PDK-9136) Design: did_pmic_pfsm_cfg_readback Architecture: aid_pmic_fsm_cfg

    This function is used to configure PFSM Delay. PFSM Delay will affect
    the total power up sequence time before the system is released from
    reset
    Consider If the PFSM_Delay value is 'x' then Delay will calculated as
     Delay = x *(50ns * 2^PFSM_DELAY_STEP)
    Note: In this API, the default delay Type is assumed as
    PMIC_PFSM_DELAY1
    While adding support for New PMIC, developer need to update the API
    functionality for New PMIC device accordingly.
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
pFsmDelayType[IN] PFSM Delay Type Valid values: Pmic_Pfsm_Delay_Type
pfsmDelay[IN] Delay for PFSM
Return values
PMIC_ST_SUCCESSin case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmGetPfsmDelay()

int32_t Pmic_fsmGetPfsmDelay ( Pmic_CoreHandle_t pPmicCoreHandle,
uint8_t  pFsmDelayType,
uint8_t *  pPfsmDelay 
)

API to read PFSM Delay.

Requirement: REQ_TAG(PDK-9136) Design: did_pmic_pfsm_cfg_readback Architecture: aid_pmic_fsm_cfg

    This function is used to read PFSM Delay
    Note: In this API, the default delay Type is assumed as
    PMIC_PFSM_DELAY1
    While adding support for New PMIC, developer need to update the API
    functionality for New PMIC device accordingly.
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
pFsmDelayType[IN] PFSM Delay Type Valid values: Pmic_Pfsm_Delay_Type
pPfsmDelay[OUT] Pointer to store the Delay for PFSM
Return values
PMIC_ST_SUCCESSin case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmSetNsleepSignalVal()

int32_t Pmic_fsmSetNsleepSignalVal ( Pmic_CoreHandle_t pPmicCoreHandle,
const bool  nsleepType,
const uint8_t  nsleepVal 
)

API to set PMIC Nsleep1B/2B Signal value.

Requirement: REQ_TAG(PDK-9146) Design: did_pmic_fsm_cfg_readback Architecture: aid_pmic_fsm_cfg

     This function is used to configure the Nsleep1B/2B signal level
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle.
nsleepType[IN] NSLEEP signal Valid values: Pmic_Nsleep_Signals
nsleepVal[IN] PMIC Nsleep signal level High/Low to be configured. Valid values Pmic_Nsleep_SignalLvl
Returns
PMIC_ST_SUCCESS in case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmGetNsleepSignalVal()

int32_t Pmic_fsmGetNsleepSignalVal ( Pmic_CoreHandle_t pPmicCoreHandle,
const bool  nsleepType,
uint8_t *  pNsleepVal 
)

API to get PMIC Nsleep1B/2B Signal value.

Requirement: REQ_TAG(PDK-9146) Design: did_pmic_fsm_cfg_readback Architecture: aid_pmic_fsm_cfg

     This function is used to read the signal level of the Nsleep1B/2B
     signal
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
nsleepType[IN] NSLEEP signal Valid values: Pmic_Nsleep_Signals
pNsleepVal[OUT] Pointer to store PMIC Nsleep signal level High/Low. Valid values Pmic_Nsleep_SignalLvl
Returns
PMIC_ST_SUCCESS in case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmRecoverSocPwrErr()

int32_t Pmic_fsmRecoverSocPwrErr ( Pmic_CoreHandle_t pPmicCoreHandle,
const uint8_t  nsleepVal 
)

API to recover from SOC Power Error using Nsleep1B and Nsleep2B signal.

Requirement: REQ_TAG(PDK-9123) Design: did_pmic_fsm_recover_soc_pwr_err Architecture: aid_pmic_fsm_cfg

     This function is used to recover from SOC Power Error without
     rebooting the system
     Note: Application need to call this API from MCU domain when SOC
     Power Error on Primary PMIC
     Step-1 - PMIC LLD has to configure NSLEEP2 & NSLEEP1 signals to ‘10’
     Step-2 - Application has to wait for 9us
     Step-3 - PMIC LLD has to configure NSLEEP2 & NSLEEP1 signals to ‘11’

     Note: Valid only for TPS6594x Leo PMIC PG2.0 and LP8764x Hera PMIC
     PG2.0
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
nsleepVal[IN] PMIC Nsleep signal level High/Low to be configured. Valid values Pmic_Nsleep_SignalLvl
Returns
PMIC_ST_SUCCESS in case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmEnableI2cTrigger()

int32_t Pmic_fsmEnableI2cTrigger ( Pmic_CoreHandle_t pPmicCoreHandle,
const uint8_t  i2cTriggerType,
const uint8_t  i2cTriggerVal 
)

API to initiate FSM I2C trigger for given FSM I2C trigger type.

Requirement: REQ_TAG(PDK-9330) Design: did_pmic_fsm_i2c_trigger Architecture: aid_pmic_fsm_cfg

     This function is used to to initiate FSM I2C trigger for given FSM
     I2C trigger type
     Note: In this API, the default i2cTriggerType is assumed as
           PMIC_FSM_I2C_TRIGGER0. While adding support for New PMIC
           device, developer need to update the API functionality for
           New PMIC device accordingly.
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
i2cTriggerType[IN] FSM I2C Trigger Type Valid values: Pmic_Fsm_I2c_Trigger_Type
i2cTriggerVal[IN] FSM I2C Trigger Value Valid values: Pmic_Fsm_I2c_Trigger_Val
Returns
PMIC_ST_SUCCESS in case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmGetI2cTriggerVal()

int32_t Pmic_fsmGetI2cTriggerVal ( Pmic_CoreHandle_t pPmicCoreHandle,
const uint8_t  i2cTriggerType,
uint8_t *  pI2cTriggerVal 
)

API to get FSM I2C trigger Value for given FSM I2C trigger type.

Requirement: REQ_TAG(PDK-9330) Design: did_pmic_fsm_i2c_trigger Architecture: aid_pmic_fsm_cfg

     This function is used to read the FSM I2C trigger Value of the
     FSM Trigger Type
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
i2cTriggerType[IN] FSM I2C Trigger Type Valid values: Pmic_Fsm_I2c_Trigger_Type
pI2cTriggerVal[OUT] Pointer to store FSM I2C Trigger Value Valid values Pmic_Fsm_I2c_Trigger_Val
Returns
PMIC_ST_SUCCESS in case of success or appropriate error code For valid values Pmic_ErrorCodes

◆ Pmic_fsmRequestDdrGpioRetentionMode()

int32_t Pmic_fsmRequestDdrGpioRetentionMode ( Pmic_CoreHandle_t pPmicCoreHandle,
const uint8_t  retentionMode,
const uint8_t  i2cTriggerVal 
)

API to initiate DDR/GPIO Retention Mode.

Requirement: REQ_TAG(PDK-9563), REQ_TAG(PDK-9564) Design: did_pmic_ddr_gpio_retention_cfg Architecture: aid_pmic_fsm_cfg

    This function initiates a request to exercise DDR/GPIO Retention Mode
    on the device based on the Retention Mode
    Note: PMIC_FSM_GPIO_RETENTION_MODE is valid only for J7200 SOC
          Application has to ensure to connect/access the peripherals
          connected to only MCU Power lines except EN_GPIORET_LDSW,
          VDD_WK_0V8 Power lines when PMIC switch from Active to MCU
          state in GPIO Rentention mode with FSM i2c6 trigger value as
          '0'. If Application connects/access the peripherals connected
          to EN_GPIORET_LDSW, VDD_WK_0V8 Power lines when PMIC switch
          from Active to MCU state in GPIO Rentention mode with FSM i2c6
          trigger value as '0', then Application behaviour is unexpected.
          Application has to ensure to connect/access the peripherals
          connected to only MCU Power lines except VDD1_LPDDR4_1V8,
          VDD_DDR_1V1, GPIO_EN_VDDR_IO Power lines when PMIC switch from
          Active to MCU state in DDR Rentention mode with FSM i2c7
          trigger value as '0'. If Application connects/access the
          peripherals connected to VDD1_LPDDR4_1V8, VDD_DDR_1V1,
          GPIO_EN_VDDR_IO Power lines when PMIC switch from Active to MCU
          state in DDR Rentention mode with FSM i2c7 trigger value as
          '0', then Application behaviour is unexpected.
Parameters
pPmicCoreHandle[IN] PMIC Interface Handle
retentionMode[IN] Retention Mode Valid values: Pmic_Fsm_Retention_Mode PMIC_FSM_GPIO_RETENTION_MODE is valid only for J7200 SOC
i2cTriggerVal[IN] FSM I2C Trigger Value Valid values: Pmic_Fsm_I2c_Trigger_Val
Return values
PMIC_ST_SUCCESSin case of success or appropriate error code For valid values Pmic_ErrorCodes