uboot15/include/configs/ud710_xxx.h
/*7S reset config*/
#define CONFIG_7S_RST_MODULE_EN 1 //0:disable module; 1:enable module
#ifdef DEBUG
#define CONFIG_7S_RST_SW_MODE 1 //0:hw reset,1:arm reset,power keep on //soft for debug version
#else
#define CONFIG_7S_RST_SW_MODE 0 //0:hw reset,1:arm reset,power keep on //hard for user version
#endif
#define CONFIG_7S_RST_SHORT_MODE 1 //0:long press then release key to trigger;1:press key some time to trigger
#define CONFIG_7S_RST_2KEY_MODE 0 //0:1Key--Normal mode; 1:2KEY
#define CONFIG_7S_RST_THRESHOLD 15 //7S, hold key down for this time to trigger
void pmic_misc_init(void)
{
debugf("pmic_misc_init\n");
pbint_7s_rst_cfg(CONFIG_7S_RST_MODULE_EN,
CONFIG_7S_RST_SW_MODE,
CONFIG_7S_RST_SHORT_MODE);
#ifdef CONFIG_SMPL_EN
smpl_config();
#endif
#if defined CONFIG_ADIE_SC2723S || defined CONFIG_ADIE_SC2723
sci_adi_set(ANA_REG_GLB_LDO_SHPT_PD2, BIT_LDO_VIBR_SHPT_PD); //close vibr short protection
#endif
#if defined(CONFIG_ADIE_SC2731) || defined(CONFIG_ADIE_SC2721) \
|| defined(CONFIG_ADIE_SC2720) || defined(CONFIG_ADIE_SC2730)
sci_adi_write(ANA_REG_GLB_OTP_CTRL, (BIT_OTP_EN|BITS_OTP_OP(0)), (BIT_OTP_EN|BITS_OTP_OP(3))); //open otp and set 135C
#endif
#if defined(CONFIG_ADIE_SC2721) || defined(CONFIG_ADIE_SC2720) || defined(CONFIG_ADIE_SC2730)
printf("last shutdown flag ANA_REG_GLB_POR_OFF_FLAG:0x%x\n",ANA_REG_GET(ANA_REG_GLB_POR_OFF_FLAG));
sci_adi_set(ANA_REG_GLB_POR_OFF_FLAG, 0xffff); //clear power off flag
//add begin
if(ANA_REG_GET(ANA_REG_GLB_POR_OFF_FLAG)&BIT(9) == 0x200){
power_down_devices(0);
}
//add end
#endif
regulator_pmic_init();
}