diff options
Diffstat (limited to 'power')
-rw-r--r-- | power/rockchip.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/power/rockchip.c b/power/rockchip.c index 2397ef9d6a..62ec073675 100644 --- a/power/rockchip.c +++ b/power/rockchip.c @@ -164,6 +164,17 @@ static void set_pmic_source(int asserted) } /** + * Power on or off the VCC_5V + * + * @param asserted Assert (=1) or deassert (=0) the signal. + */ +static void set_5v_power(int asserted) +{ + /* Signal is active-high */ + gpio_set_level(GPIO_5V_DRV, asserted ? 1 : 0); +} + +/** * Check for some event triggering the shutdown. * * It can be either a long power button press or a shutdown triggered from the @@ -400,6 +411,7 @@ static void power_on(void) /* Call hooks now that AP is running */ hook_notify(HOOK_CHIPSET_STARTUP); + set_5v_power(1); CPRINTS("AP running ..."); } @@ -439,6 +451,7 @@ static int wait_for_power_button_release(unsigned int timeout_us) */ static void power_off(void) { + set_5v_power(0); /* Call hooks before we drop power rails */ hook_notify(HOOK_CHIPSET_SHUTDOWN); /* switch off all rails */ |