summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)