Skip to content

Commit 6790448

Browse files
committed
fix vsys droop on boot when no battery
I think we need to set PL values right after we reach S0 as the CPU will use default values. which can be too high for the charger/input current limit which was previously causing vsys to droop down to 6V or so. Signed-off-by: Kieran Levin <ktl@frame.work>
1 parent a99d334 commit 6790448

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

board/hx30/cpu_power.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,19 @@ DECLARE_HOOK(HOOK_BATTERY_SOC_CHANGE, update_soc_power_limit_hook, HOOK_PRIO_DEF
100100

101101

102102

103+
void update_soc_power_on_boot_deferred(void)
104+
{
105+
update_soc_power_limit(true, false);
106+
}
107+
DECLARE_DEFERRED(update_soc_power_on_boot_deferred);
108+
109+
void update_soc_power_limit_boot(void)
110+
{
111+
hook_call_deferred(&update_soc_power_on_boot_deferred_data, MSEC*1000);
112+
}
113+
DECLARE_HOOK(HOOK_CHIPSET_RESUME, update_soc_power_limit_boot, HOOK_PRIO_DEFAULT);
114+
115+
103116
static int cmd_cpupower(int argc, char **argv)
104117
{
105118
uint32_t pl1, pl2, pl4, psys;

0 commit comments

Comments
 (0)