需求:客户需要上电时按下VOL_UP和VOL_DOWN组合键进入强制下载模式,特殊的是RESIN_N被用于了VOL_DOWN。
高通源码默认是有强制下载功能,当按vol-和vol+时键值为SCAN_ESC,abl阶段获取到此键值后进入EDL流程,客户因为VOL-接reset,代码中配置了KEYPWR复位和KEYPWR_AND_RESIN复位,当同时按POWER和VOL-时会一直重启,原因是:
POWER ON by KPDPWR, POWER OFF by S3 reset KPDPWR_ANDOR_RESIN
解决:在pm_device_post_init()中设置以下函数,设置s3重置配置:时间为16s
diff --git a/BOOT.XF.4.1/boot_images/QcomPkg/Library/PmicLib/target/Agatti_pmCocos/system/src/pm_sbl_boot_oem.c b/BOOT.XF.4.1/boot_images/QcomPkg/Library/PmicLib/target/Agatti_pmCocos/system/src/pm_sbl_boot_oem.c
index 31fe073a4..509a8d61b 100755
--- a/BOOT.XF.4.1/boot_images/QcomPkg/Library/PmicLib/target/Agatti_pmCocos/system/src/pm_sbl_boot_oem.c
+++ b/BOOT.XF.4.1/boot_images/QcomPkg/Library/PmicLib/target/Agatti_pmCocos/system/src/pm_sbl_boot_oem.c
@@ -1052,6 +1052,7 @@ pm_device_post_init ( void )
err_flag |= pm_comm_write_byte(1, 0x5046, 0x80, 0);
config_gpio_cam2_standby(INPUT);
err_flag |= pm_comm_write_byte(0, 0x0880, 0xd4, 0);
+ pm_pon_stage3_reset_source_cfg(0, PM_PON_RESET_SOURCE_RESIN, 32);
return err_flag;
}