summaryrefslogtreecommitdiff
path: root/board/cr50
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@google.com>2018-10-15 16:43:42 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-04 05:40:00 -0700
commitfd2a6277b4b2262efda3d22e46ec9a48bc7339b2 (patch)
tree5aa32b343c83acae02943523bea51fb50f3c66a9 /board/cr50
parent4b5cbd49cc11ad3f341c6aea9f372da1c390c0e5 (diff)
downloadchrome-ec-fd2a6277b4b2262efda3d22e46ec9a48bc7339b2.tar.gz
cr50: make ccd_mode_l pseudo open drain
gpio.c has support for making pins open drain. This implementation will prevent the signals from being driven high. Use the gpio.c support instead of the hack we were using before. BUG=none BRANCH=cr50 TEST=the EC can assert CCD_MODE_L when cr50 has it deasserted. Verify this on a ARM and x86 device in the lab. Change-Id: I7f2a465782f2c60a850c25153fb65eb96fff0712 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1282019 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'board/cr50')
-rw-r--r--board/cr50/gpio.inc11
1 files changed, 3 insertions, 8 deletions
diff --git a/board/cr50/gpio.inc b/board/cr50/gpio.inc
index cd9348fd2c..7a8fc11787 100644
--- a/board/cr50/gpio.inc
+++ b/board/cr50/gpio.inc
@@ -100,8 +100,9 @@ GPIO(SYS_RST_L_OUT, PIN(0, 4), GPIO_INPUT)
/*
* Indicate to EC when CCD is enabled. EC can pull this down too, to tell us if
* it decided instead.
+ * This is pseudo open drain.
*/
-GPIO(CCD_MODE_L, PIN(0, 5), GPIO_INPUT | GPIO_PULL_UP)
+GPIO(CCD_MODE_L, PIN(0, 5), GPIO_ODR_HIGH | GPIO_PULL_UP)
/* Battery present signal is active low */
GPIO(BATT_PRES_L, PIN(0, 6), GPIO_INPUT)
@@ -175,13 +176,7 @@ PINMUX(GPIO(EN_PP3300_INA_L), B7, DIO_INPUT)
* only change it to an output when we want to assert the signal.
*/
PINMUX(GPIO(SYS_RST_L_OUT), M0, DIO_INPUT)
-/*
- * CCD_MODE_L is an input above, but we need to be able to drive it as
- * an output if Rdd detects the debug cable. So set DIO_OUTPUT as
- * well. It will be tristated initially, because we don't set
- * GPIO_OUTPUT above.
- */
-PINMUX(GPIO(CCD_MODE_L), M1, DIO_INPUT | DIO_OUTPUT)
+PINMUX(GPIO(CCD_MODE_L), M1, DIO_INPUT)
PINMUX(GPIO(BATT_PRES_L), M2, 0)
/*
* Update closed_source_set1.c if pinmux for I2C_SCL_INA or I2C_SDA_INA is