mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
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 <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/275072 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
5b2e673948
commit
706fcb19ca
@@ -39,12 +39,13 @@ static void pd_mcu_interrupt(enum gpio_signal signal)
|
||||
void vbus0_evt(enum gpio_signal signal)
|
||||
{
|
||||
CPRINTF("VBUS C0, %d\n", !gpio_get_level(signal));
|
||||
task_wake(TASK_ID_PD);
|
||||
task_wake(TASK_ID_PD_C0);
|
||||
}
|
||||
|
||||
void vbus1_evt(enum gpio_signal signal)
|
||||
{
|
||||
CPRINTF("VBUS C1, %d\n", !gpio_get_level(signal));
|
||||
task_wake(TASK_ID_PD_C1);
|
||||
}
|
||||
|
||||
void usb0_evt(enum gpio_signal signal)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#define CONFIG_USB_PD_ALT_MODE_DFP
|
||||
#define CONFIG_USB_PD_CUSTOM_VDM
|
||||
#define CONFIG_USB_PD_DUAL_ROLE
|
||||
#define CONFIG_USB_PD_PORT_COUNT 1
|
||||
#define CONFIG_USB_PD_PORT_COUNT 2
|
||||
#define CONFIG_USB_PD_TCPM_TCPCI
|
||||
#define CONFIG_SCI_GPIO GPIO_PCH_SCI_L
|
||||
|
||||
|
||||
@@ -26,5 +26,6 @@
|
||||
TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(PD, pd_task, NULL, LARGER_TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) \
|
||||
TASK_ALWAYS(PD_C1, pd_task, NULL, LARGER_TASK_STACK_SIZE) \
|
||||
TASK_NOTEST(PORT80, port80_task, NULL, TASK_STACK_SIZE)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user