diff options
author | Mary Ruthven <mruthven@google.com> | 2018-04-09 14:33:51 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-04-10 21:55:21 -0700 |
commit | b0f79a70448c8fc3a285f0b4512acc798af9b8dd (patch) | |
tree | acbcc8d8c78c9856ed74fc05e8a239d1852f53c6 | |
parent | f305ec22d62005ca277e077676e45c015919c403 (diff) | |
download | chrome-ec-b0f79a70448c8fc3a285f0b4512acc798af9b8dd.tar.gz |
cr50:usb_spi: add Cheza EC support
The Cheza EC requires EC_RX_H1_TX be held low while the EC is being
reset to enter gang mode. This change adds another programming mode to
ec usb spi programming to do that.
BUG=b:74388083
BRANCH=cr50
TEST=The cheza boards aren't in, so I just tested EC_TX_CR50_RX_OUT
gpioset EC_TX_OUT 0 and 1 setup EC_TX_CR50_RX_OUT correctly as an
output when asserted and an input when deasserted.
Change-Id: I7fc9cba954f2af5a841f00ce5bf8a27251b33bbe
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1003529
Commit-Ready: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | board/cr50/gpio.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/board/cr50/gpio.inc b/board/cr50/gpio.inc index 8c698e549f..532fc67ff3 100644 --- a/board/cr50/gpio.inc +++ b/board/cr50/gpio.inc @@ -116,6 +116,12 @@ GPIO(I2C_SDA_INA, PIN(0, 13), GPIO_INPUT) * up the pinmux in board.c will have to change as well. */ GPIO(I2CS_SDA, PIN(0, 14), GPIO_INPUT) +/* + * Fake open drain on EC_TX_CR50_RX_OUT. When asserted, the signal can be used + * to enable UART programming mode on the EC. The signal needs to fake open + * drain so it can still be used as the cr50 rx signal when it is deasserted. + */ +GPIO(EC_TX_CR50_RX_OUT, PIN(0, 15), GPIO_ODR_HIGH) /* Unimplemented signals which we need to emulate for now */ /* TODO(wfrichar): Half the boards don't use this signal. Take it out. */ @@ -173,10 +179,11 @@ PINMUX(FUNC(UART2_RX), B6, DIO_INPUT) /* EC console */ * driving the cr50 uart TX at the same time as servo is driving those pins may * damage both servo and cr50. */ -PINMUX(GPIO(DETECT_AP), A3, DIO_INPUT) -PINMUX(GPIO(DETECT_EC), B6, DIO_INPUT) -PINMUX(GPIO(EC_TX_CR50_RX), B6, DIO_INPUT) -PINMUX(GPIO(DETECT_SERVO), B5, DIO_INPUT) +PINMUX(GPIO(DETECT_AP), A3, DIO_INPUT) +PINMUX(GPIO(DETECT_EC), B6, DIO_INPUT) +PINMUX(GPIO(EC_TX_CR50_RX), B6, DIO_INPUT) +PINMUX(GPIO(EC_TX_CR50_RX_OUT), B6, DIO_INPUT) +PINMUX(GPIO(DETECT_SERVO), B5, DIO_INPUT) /* * I2CS pins are bi-directional and would be configured here as shown. However, |