summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-11-18 11:16:40 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-11-21 16:07:43 -0800
commita6cbc2b868f166dc388c8252807b53178c2677ad (patch)
tree2c046963b3d5cbf3ff804ab679837c9de5746942
parent94843eca31c85ceaf4b8f9da127216ef45f278eb (diff)
downloadchrome-ec-a6cbc2b868f166dc388c8252807b53178c2677ad.tar.gz
cr50: remove the pull down on uart2 tx
The pulldown on diob5 is used to detect when servo is detached. It is unnecessary during deep sleep and when the EC console is active because servo detection is disabled. Having the pull-down enabled during these times can increase power consumption. This change disables the pulldown when the EC console and deep sleep are enabled. It also disables the diob5 input during deep sleep. BUG=chrome-os-partner:60020 BRANCH=none TEST=manual Disconnect servo Use the suzyq consoles to turn off the AP. Enable deep sleep. Measure the power consumed by vddiob and make sure it is around 0.3mW when the EC is in hibernate and when it is not. Change-Id: I8a653c28800cfbeeb1b4b8598d166846124c6b53 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/412940 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r--board/cr50/board.c4
-rw-r--r--board/cr50/rdd.c16
2 files changed, 17 insertions, 3 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index 37f2f4dc9e..0f801de447 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -178,6 +178,10 @@ void board_configure_deep_sleep_wakepins(void)
GWRITE_FIELD(PINMUX, EXITEN0, DIOA12, 0); /* SPS_CS_L */
/* TODO remove i2cs wake event */
+ /* Remove the pulldown on EC uart tx and disable the input */
+ GWRITE_FIELD(PINMUX, DIOB5_CTL, PD, 0);
+ GWRITE_FIELD(PINMUX, DIOB5_CTL, IE, 0);
+
/*
* DIOA3 is GPIO_DETECT_AP which is used to detect if the AP is in S0.
* If the AP is in s0, cr50 should not be in deep sleep so wake up.
diff --git a/board/cr50/rdd.c b/board/cr50/rdd.c
index a9ed843f78..1275b0dcde 100644
--- a/board/cr50/rdd.c
+++ b/board/cr50/rdd.c
@@ -52,13 +52,23 @@ int uartn_enabled(int uart)
return GREAD(PINMUX, DIOB5_SEL);
}
-/* Connect the UART pin to the given signal */
+/**
+ * Connect the UART pin to the given signal
+ *
+ * @param uart the uart peripheral number
+ * @param signal the pinmux selector value for the gpio or peripheral
+ * function. 0 to disable the output.
+ */
static void uart_select_tx(int uart, int signal)
{
- if (uart == UART_AP)
+ if (uart == UART_AP) {
GWRITE(PINMUX, DIOA7_SEL, signal);
- else
+ } else {
GWRITE(PINMUX, DIOB5_SEL, signal);
+
+ /* Remove the pulldown when we are driving the signal */
+ GWRITE_FIELD(PINMUX, DIOB5_CTL, PD, signal ? 0 : 1);
+ }
}
static int servo_is_connected(void)