From 706fcb19ca29040a8182861aa2b44ef7496737e4 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Wed, 3 Jun 2015 14:39:24 -0700 Subject: glados: add PD support for type-C port 1 Add USB PD support for port 1 (on the flex cable). BUG=chrome-os-partner:40920 BRANCH=none TEST=load onto glados and test zinger and hoho in both polarities on both ports and verify PD contract established. Change-Id: Ib7ac2e630c0a8f278c8b74c348cc6dc7183f53ec Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/275072 Reviewed-by: Vincent Palatin --- board/glados_pd/board.c | 4 +--- board/glados_pd/board.h | 4 +++- board/glados_pd/ec.tasklist | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'board/glados_pd') diff --git a/board/glados_pd/board.c b/board/glados_pd/board.c index 38853f86db..da6fc82525 100644 --- a/board/glados_pd/board.c +++ b/board/glados_pd/board.c @@ -36,14 +36,12 @@ void pd_send_ec_int(void) void vbus0_evt(enum gpio_signal signal) { - task_wake(TASK_ID_PD); + task_wake(TASK_ID_PD_C0); } void vbus1_evt(enum gpio_signal signal) { -#ifdef HAS_TASK_PD_C1 task_wake(TASK_ID_PD_C1); -#endif } void board_config_pre_init(void) diff --git a/board/glados_pd/board.h b/board/glados_pd/board.h index 660610992b..999cf5802d 100644 --- a/board/glados_pd/board.h +++ b/board/glados_pd/board.h @@ -32,6 +32,8 @@ /* Optional features */ #define CONFIG_ADC #define CONFIG_BOARD_PRE_INIT +#undef CONFIG_CONSOLE_HISTORY +#define CONFIG_CONSOLE_HISTORY 2 #define CONFIG_FORCE_CONSOLE_RESUME #undef CONFIG_HOSTCMD_EVENTS #define CONFIG_HW_CRC @@ -46,7 +48,7 @@ #define CONFIG_UART_TX_BUF_SIZE 128 #define CONFIG_USB_PD_DUAL_ROLE #define CONFIG_USB_PD_INTERNAL_COMP -#define CONFIG_USB_PD_PORT_COUNT 1 +#define CONFIG_USB_PD_PORT_COUNT 2 #define CONFIG_USB_PD_TCPC #define CONFIG_USBC_VCONN #define CONFIG_VBOOT_HASH diff --git a/board/glados_pd/ec.tasklist b/board/glados_pd/ec.tasklist index c001ade46f..676c13e60d 100644 --- a/board/glados_pd/ec.tasklist +++ b/board/glados_pd/ec.tasklist @@ -18,6 +18,7 @@ */ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_NOTEST(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(PD, pd_task, NULL, LARGER_TASK_STACK_SIZE) + TASK_NOTEST(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(PD_C0, pd_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(PD_C1, pd_task, NULL, TASK_STACK_SIZE) -- cgit v1.2.1