diff options
author | Mary Ruthven <mruthven@chromium.org> | 2016-04-05 16:03:30 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-07 13:00:39 -0700 |
commit | 8a0d5ba17e60d83a7479287864b2b6735e91f7e6 (patch) | |
tree | 9b20b513033a55a3de0b7c05a3c11fdf0f266ea4 | |
parent | 8264b91a5b6769d3ed42849befcdcb4e3cbe3448 (diff) | |
download | chrome-ec-8a0d5ba17e60d83a7479287864b2b6735e91f7e6.tar.gz |
cr50: enable AP and EC UART forwarding
Cr50 will be used to debug the EC and AP through USB. This change
enables exporting the EC and AP UART through USB by adding the endpoints
and enabling the UART and USB streams.
BUG=chrome-os-partner:50702
BRANCH=none
TEST=Load the serial driver in ec/extras and verify that the EC and AP
UARTs can be accessed through /dev/google/Cr50*/serial/AP and EC.
Change-Id: I3249b250d0ecc41a206c45c5ca66b5a6a5622e62
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/337294
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | board/cr50/board.h | 11 | ||||
-rw-r--r-- | board/cr50/gpio.inc | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h index 5781e9a22b..8bb7416d02 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -29,6 +29,7 @@ #define CONFIG_USB_HID #define CONFIG_USB_BLOB +#define CONFIG_STREAM_USART #define CONFIG_STREAM_USB #define CONFIG_USB_PID 0x5014 @@ -81,16 +82,22 @@ enum usb_strings { /* USB interface indexes (use define rather than enum to expand them) */ #define USB_IFACE_BLOB 0 #define USB_IFACE_HID 1 -#define USB_IFACE_COUNT 2 +#define USB_IFACE_AP 2 +#define USB_IFACE_EC 3 +#define USB_IFACE_COUNT 4 /* USB endpoint indexes (use define rather than enum to expand them) */ #define USB_EP_CONTROL 0 #define USB_EP_BLOB 1 #define USB_EP_HID 2 -#define USB_EP_COUNT 3 +#define USB_EP_AP 3 +#define USB_EP_EC 4 +#define USB_EP_COUNT 5 /* UART indexes (use define rather than enum to expand them) */ #define UART_CR50 0 +#define UART_AP 1 +#define UART_EC 2 #define UARTN UART_CR50 diff --git a/board/cr50/gpio.inc b/board/cr50/gpio.inc index 0dda8ecb2f..0430d25715 100644 --- a/board/cr50/gpio.inc +++ b/board/cr50/gpio.inc @@ -53,9 +53,9 @@ PINMUX(GPIO(BATT_PRES), M2, 0) /* UARTs */ PINMUX(FUNC(UART0_TX), A0, DIO_OUTPUT) /* Cr50 console */ PINMUX(FUNC(UART0_RX), A1, DIO_INPUT | DIO_WAKE_LOW) -PINMUX(FUNC(UART1_TX), A3, DIO_INPUT) /* AP console */ +PINMUX(FUNC(UART1_TX), A3, DIO_OUTPUT) /* AP console */ PINMUX(FUNC(UART1_RX), A7, DIO_INPUT) -PINMUX(FUNC(UART2_TX), B5, DIO_INPUT) /* EC console */ +PINMUX(FUNC(UART2_TX), B5, DIO_OUTPUT) /* EC console */ PINMUX(FUNC(UART2_RX), B6, DIO_INPUT) /* I2C pins are bi-directional */ |