summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLin Huang <hl@rock-chips.com>2016-08-30 15:34:42 -0700
committerPatrick Georgi <pgeorgi@google.com>2016-10-07 17:33:32 +0200
commitc9fea5cdec8214703edcea9ea3012f37a37b1c3c (patch)
tree89c43727c1f7bb86713f43708e123f13cdb81a78 /src
parent7d8ccfb9b32cbffca1fb36cc775d399ace1b4cca (diff)
google/gru: pass apio number to arm-trust-firmware
To save power when entering suspend, gpios 2 to 4 need to be set to input and 'pull none' mode. Pass the APIO configuration to ATF so it can do a proper job here. BRANCH=None BUG=chrome-os-partner:56423 TEST=run suspend_stress_test on kevin board Change-Id: Id57fe8f622ae3f9c2bc7e58be89518b2b846cd37 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 9c42082d1ca9a6baa735821382d3e83c1f8dc9ad Original-Change-Id: Iaf441e8e34c5591ffe7c65f6533fcf0b733ff5ac Original-Signed-off-by: Lin Huang <hl@rock-chips.com> Original-Reviewed-on: https://chromium-review.googlesource.com/378475 Original-Commit-Ready: Caesar Wang <wxt@rock-chips.com> Original-Tested-by: Caesar Wang <wxt@rock-chips.com> Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/16720 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/gru/mainboard.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 1812a2ab41..b9d5355bf1 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -43,6 +43,23 @@ static void configure_emmc(void)
rkclk_configure_emmc();
}
+static void register_apio_suspend(void)
+{
+ static struct bl31_apio_param param_apio = {
+ .h = {
+ .type = PARAM_SUSPEND_APIO,
+ },
+ .apio = {
+ .apio1 = 1,
+ .apio2 = 1,
+ .apio3 = 1,
+ .apio4 = 1,
+ .apio5 = 1,
+ },
+ };
+ register_bl31_param(&param_apio.h);
+}
+
static void register_gpio_suspend(void)
{
/*
@@ -228,6 +245,7 @@ static void mainboard_init(device_t dev)
register_reset_to_bl31();
register_poweroff_to_bl31();
register_gpio_suspend();
+ register_apio_suspend();
}
static void enable_backlight_booster(void)