summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-10-02 16:17:29 -0700
committerCommit Bot <commit-bot@chromium.org>2020-10-08 02:07:12 +0000
commit75dffd13af1c810d46fca88c9846af4653843145 (patch)
treeb80cd607d80bd8833b20d11250b4a090360c813a
parent37a2a114e66a9832605282b7b14285bcee965e9f (diff)
downloadchrome-ec-75dffd13af1c810d46fca88c9846af4653843145.tar.gz
Trogdor: Assert a GPIO to turn off rails before enter hibernate
We disabled the PSL mode hibernate. We uses another GPIO to control switches, which were originally controlled by PSL_OUT. Add this GPIO, named HIBERNATE_L, such that the non-PSL mode hibernate can retrofit the original design. BRANCH=None BUG=b:169797080 TEST=Triggered EC hibernate and checked the HIBERNATE_L GPIO asserted. Change-Id: I69c0d0296f701f3027adfd4d27fa51bdae0844a5 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2446662 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
-rw-r--r--baseboard/trogdor/baseboard.c6
-rw-r--r--board/coachz/gpio.inc1
-rw-r--r--board/lazor/gpio.inc1
-rw-r--r--board/pompom/gpio.inc1
-rw-r--r--board/trogdor/gpio.inc1
5 files changed, 10 insertions, 0 deletions
diff --git a/baseboard/trogdor/baseboard.c b/baseboard/trogdor/baseboard.c
index ecc8dc59f7..817962dfad 100644
--- a/baseboard/trogdor/baseboard.c
+++ b/baseboard/trogdor/baseboard.c
@@ -19,6 +19,12 @@ const enum gpio_signal hibernate_wake_pins[] = {
};
const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
+void board_hibernate_late(void)
+{
+ /* Set the hibernate GPIO to turn off the rails */
+ gpio_set_level(GPIO_HIBERNATE_L, 0);
+}
+
/* Power signal list. Must match order of enum power_signal. */
const struct power_signal_info power_signal_list[] = {
[SC7180_AP_RST_ASSERTED] = {
diff --git a/board/coachz/gpio.inc b/board/coachz/gpio.inc
index 00c70fc2e8..80a9e59b1c 100644
--- a/board/coachz/gpio.inc
+++ b/board/coachz/gpio.inc
@@ -59,6 +59,7 @@ GPIO(EC_INT_L, PIN(A, 2), GPIO_ODR_HIGH) /* Interrupt line between
GPIO(QSIP_ON, PIN(5, 0), GPIO_OUT_LOW) /* Not used, for non-switchcap testing */
/* Power enables */
+GPIO(HIBERNATE_L, PIN(5, 2), GPIO_OUT_HIGH) /* EC hibernate */
GPIO(SWITCHCAP_ON, PIN(D, 5), GPIO_OUT_LOW) /* Enable switch cap; will be configured in the board init */
/* TODO(waihong): Remove it. The VBOB switch is for backup. */
GPIO(VBOB_EN, PIN(D, 3), GPIO_OUT_LOW) /* Enable VBOB */
diff --git a/board/lazor/gpio.inc b/board/lazor/gpio.inc
index e15587c121..5b0fb5e522 100644
--- a/board/lazor/gpio.inc
+++ b/board/lazor/gpio.inc
@@ -65,6 +65,7 @@ GPIO(EC_INT_L, PIN(A, 2), GPIO_ODR_HIGH) /* Interrupt line between
GPIO(QSIP_ON, PIN(5, 0), GPIO_OUT_LOW) /* Not used, for non-switchcap testing */
/* Power enables */
+GPIO(HIBERNATE_L, PIN(5, 2), GPIO_OUT_HIGH) /* EC hibernate */
GPIO(SWITCHCAP_ON, PIN(D, 5), GPIO_OUT_LOW) /* Enable switch cap; will be configured in the board init */
/* TODO(waihong): Remove it. The VBOB switch is for backup. */
GPIO(VBOB_EN, PIN(D, 3), GPIO_OUT_LOW) /* Enable VBOB */
diff --git a/board/pompom/gpio.inc b/board/pompom/gpio.inc
index 80753d9d42..4d731686a0 100644
--- a/board/pompom/gpio.inc
+++ b/board/pompom/gpio.inc
@@ -55,6 +55,7 @@ GPIO(EC_INT_L, PIN(A, 2), GPIO_ODR_HIGH) /* Interrupt line between
GPIO(QSIP_ON, PIN(5, 0), GPIO_OUT_LOW) /* Not used, for non-switchcap testing */
/* Power enables */
+GPIO(HIBERNATE_L, PIN(5, 2), GPIO_OUT_HIGH) /* EC hibernate */
GPIO(SWITCHCAP_ON, PIN(D, 5), GPIO_OUT_LOW) /* Enable switch cap */
/* TODO(waihong): Remove it. The VBOB switch is for backup. */
GPIO(VBOB_EN, PIN(D, 3), GPIO_OUT_LOW) /* Enable VBOB */
diff --git a/board/trogdor/gpio.inc b/board/trogdor/gpio.inc
index acc8633e05..753c944a66 100644
--- a/board/trogdor/gpio.inc
+++ b/board/trogdor/gpio.inc
@@ -57,6 +57,7 @@ GPIO(EC_INT_L, PIN(A, 2), GPIO_ODR_HIGH) /* Interrupt line between
GPIO(QSIP_ON, PIN(5, 0), GPIO_OUT_LOW) /* Not used, for non-switchcap testing */
/* Power enables */
+GPIO(HIBERNATE_L, PIN(5, 2), GPIO_OUT_HIGH) /* EC hibernate */
GPIO(SWITCHCAP_ON, PIN(D, 5), GPIO_OUT_LOW) /* Enable switch cap */
/* TODO(waihong): Remove it. The VBOB switch is for backup. */
GPIO(VBOB_EN, PIN(D, 3), GPIO_OUT_LOW) /* Enable VBOB */