diff --git a/chip/npcx/system.c b/chip/npcx/system.c index 46547ff737..0411892214 100644 --- a/chip/npcx/system.c +++ b/chip/npcx/system.c @@ -762,6 +762,17 @@ DECLARE_HOST_COMMAND(EC_CMD_RTC_SET_VALUE, system_rtc_set_value, EC_VER_MASK(0)); +static int system_rtc_set_alarm(struct host_cmd_handler_args *args) +{ + const struct ec_params_rtc *p = args->params; + + system_set_rtc_alarm(p->time, 0); + return EC_RES_SUCCESS; +} +DECLARE_HOST_COMMAND(EC_CMD_RTC_SET_ALARM, + system_rtc_set_alarm, + EC_VER_MASK(0)); + #ifdef CONFIG_EXTERNAL_STORAGE void system_jump_to_booter(void) { diff --git a/util/ectool.c b/util/ectool.c index f5787efcf2..a1210466f5 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -187,6 +187,8 @@ const char help_str[] = " Reads a pattern from the EC via LPC\n" " reboot_ec [at-shutdown]\n" " Reboot EC to RO or RW\n" + " rtcalarm \n" + " Set real-time clock alarm to go off in seconds\n" " rtcget\n" " Print real-time clock\n" " rtcset