From 5818cdc7286a37cf06d2f2c0d79b0f4ae5ee664c Mon Sep 17 00:00:00 2001 From: Divya Sasidharan Date: Fri, 16 Sep 2016 14:20:38 -0700 Subject: [PATCH] reef: Fix FAFT failure for firmware_ECUsbPorts Modify USB enable GPIO name to comply with FAFT test. It uses this name format USB%d_ENABLE to power on/off all the USB ports. BRANCH=none BUG=none TEST=on Reef FAFT test firmware_ECUsbPorts passes Change-Id: I9b3b5d1668acfca5505dcff6708800f409555040 Signed-off-by: Divya Sasidharan Reviewed-on: https://chromium-review.googlesource.com/386854 Commit-Ready: Divya S Sasidharan Tested-by: Divya S Sasidharan Reviewed-by: Shawn N --- board/reef/board.c | 4 ++-- board/reef/board.h | 4 ++-- board/reef/gpio.inc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/board/reef/board.c b/board/reef/board.c index 76402ac5f7..07024025ba 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -613,7 +613,7 @@ static void enable_input_devices(void) static void board_chipset_startup(void) { /* Enable USB-A port. */ - gpio_set_level(GPIO_EN_USB_A_5V, 1); + gpio_set_level(GPIO_USB1_ENABLE, 1); hook_call_deferred(&enable_input_devices_data, 0); } @@ -639,7 +639,7 @@ DECLARE_HOOK(HOOK_CHIPSET_RESUME, drive_sys_rst_odl_high, HOOK_PRIO_DEFAULT); static void board_chipset_shutdown(void) { /* Disable USB-A port. */ - gpio_set_level(GPIO_EN_USB_A_5V, 0); + gpio_set_level(GPIO_USB1_ENABLE, 0); hook_call_deferred(&enable_input_devices_data, 0); /* FIXME(dhendrix): Drive USB_PD_RST_ODL low to prevent diff --git a/board/reef/board.h b/board/reef/board.h index b4da30c9ea..8ed35be00b 100644 --- a/board/reef/board.h +++ b/board/reef/board.h @@ -61,8 +61,8 @@ /* USB-A config */ #define CONFIG_USB_PORT_POWER_SMART #define CONFIG_USB_PORT_POWER_SMART_SIMPLE -#define GPIO_USB1_ENABLE GPIO_EN_USB_A_5V -#define GPIO_USB2_ENABLE GPIO_EN_USB_A_5V +#undef CONFIG_USB_PORT_POWER_SMART_PORT_COUNT +#define CONFIG_USB_PORT_POWER_SMART_PORT_COUNT 1 #define GPIO_USB_ILIM_SEL GPIO_USB_A_CHARGE_EN_L #define GPIO_USB_CTL1 GPIO_EN_PP5000 diff --git a/board/reef/gpio.inc b/board/reef/gpio.inc index 08d77ea7c7..e7c5e8674c 100644 --- a/board/reef/gpio.inc +++ b/board/reef/gpio.inc @@ -131,7 +131,7 @@ GPIO(PCH_RCIN_L, PIN(6, 1), GPIO_ODR_HIGH) /* SYS_RST_ODL */ GPIO(CHARGER_RST_ODL, PIN(C, 0), GPIO_ODR_HIGH) GPIO(USB_A_CHARGE_EN_L, PIN(4, 2), GPIO_OUT_HIGH) GPIO(EN_USB_TCPC_PWR, PIN(C, 3), GPIO_OUT_LOW) -GPIO(EN_USB_A_5V, PIN(4, 1), GPIO_OUT_LOW) +GPIO(USB1_ENABLE, PIN(4, 1), GPIO_OUT_LOW) GPIO(USB_C0_PD_RST_L, PIN(0, 3), GPIO_OUT_LOW) /* USB_C0_PD_RST_L */ #if IS_PROTO == 0