summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChromeOS Developer <dparker@chromium.org>2014-07-28 13:34:59 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-31 17:44:37 +0000
commita1f12b7610524477fb3f120cae5c6451fc25da48 (patch)
treef46e6f9f821cb62a02d3cfda9f2f5ec64156fdac
parentcd1a1e90fa4ee704c96cfdb75d03978e3bdd8b88 (diff)
downloadchrome-ec-a1f12b7610524477fb3f120cae5c6451fc25da48.tar.gz
Falco: Shut down immediately if 5V regulator trips
This is to prevent the shared 5V/3.3V regulator from latching a fault that requires removing the battery to clear. BUG=chrome-os-partner:30575 BRANCH=falco TEST=Tested with cable that connects +5V to D- through 10Ohms. Plug in during S0 -> no change. Plug in during S0 -> system shuts down. Plug in during S0 and then suspend -> system shuts down. Note that it will take two presses of the power button to boot back up. Change-Id: Ibe6d816ba50e3347afc84ad248fc1ea9e4a089a1 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/210038 Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
-rw-r--r--board/falco/board.c2
-rw-r--r--common/chipset_x86_common.c15
2 files changed, 16 insertions, 1 deletions
diff --git a/board/falco/board.c b/board/falco/board.c
index 486239ae82..511a77f033 100644
--- a/board/falco/board.c
+++ b/board/falco/board.c
@@ -54,7 +54,7 @@ const struct gpio_info gpio_list[] = {
x86_interrupt},
{"PP1350_PGOOD", LM4_GPIO_H, (1<<6), GPIO_INT_BOTH,
x86_interrupt},
- {"PP5000_PGOOD", LM4_GPIO_N, (1<<0), GPIO_INT_BOTH,
+ {"PP5000_PGOOD", LM4_GPIO_N, (1<<0), GPIO_INT_BOTH_DSLEEP,
x86_interrupt},
{"VCORE_PGOOD", LM4_GPIO_C, (1<<6), GPIO_INT_BOTH,
x86_interrupt},
diff --git a/common/chipset_x86_common.c b/common/chipset_x86_common.c
index 34c2647990..1913270381 100644
--- a/common/chipset_x86_common.c
+++ b/common/chipset_x86_common.c
@@ -347,6 +347,21 @@ void x86_interrupt(enum gpio_signal signal)
}
#endif
+#ifdef BOARD_falco
+ /* Catch the PP5000 rail going down unexpectedly as it is likely the
+ * PP3300_EC rail is going down with it. (http://crosbug.com/p/30575)
+ */
+ if (signal == GPIO_PP5000_PGOOD && (gpio_get_level(signal) == 0) &&
+ (gpio_get_level(GPIO_PP5000_EN) == 1)) {
+ gpio_set_level(GPIO_PP5000_EN, 0);
+ usb_port_all_ports_off();
+ CPRINTF("[%T PP5000_PGOOD lost unexpectedly.");
+ CPRINTF(" Disabled 5V regulator and shutting down.]\n");
+ chipset_force_shutdown();
+ return;
+ }
+#endif
+
/* Shadow signals and compare with our desired signal state. */
x86_update_signals();