From d1138722dd6096a067b089b49229c6fe5d15b1c7 Mon Sep 17 00:00:00 2001 From: Wonjoon Lee Date: Thu, 9 Jun 2016 23:21:31 +0900 Subject: kevin: re-define for changed GPIO - swap M10/J6 to avoid SHI interrupt priority contention - USB-C power enable signal to active high BUG=none BRANCH=none TEST=get proper working on kevin-rev3 Change-Id: I52b71636779cad8975cef5921e9c9a1b7da8645e Signed-off-by: Wonjoon Lee Reviewed-on: https://chromium-review.googlesource.com/351151 Commit-Ready: Shawn N Reviewed-by: Shawn N --- board/kevin/board.h | 1 - board/kevin/gpio.inc | 8 ++++---- board/kevin/usb_pd_policy.c | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/board/kevin/board.h b/board/kevin/board.h index 2dc334228a..d6fa88b97c 100644 --- a/board/kevin/board.h +++ b/board/kevin/board.h @@ -69,7 +69,6 @@ /* USB PD config */ #define CONFIG_CHARGE_MANAGER #define CONFIG_USB_POWER_DELIVERY -#define CONFIG_USB_PD_5V_EN_ACTIVE_LOW #define CONFIG_USB_PD_ALT_MODE #define CONFIG_USB_PD_ALT_MODE_DFP #define CONFIG_USB_PD_CUSTOM_VDM diff --git a/board/kevin/gpio.inc b/board/kevin/gpio.inc index 7f45432fd9..33cd30d30b 100644 --- a/board/kevin/gpio.inc +++ b/board/kevin/gpio.inc @@ -31,7 +31,7 @@ GPIO_INT(PP5000_PG, PIN(7, 1), GPIO_INT_BOTH | GPIO_PULL_UP, GPIO_INT(TPS65261_PG, PIN(7, 5), GPIO_INT_BOTH | GPIO_PULL_UP, power_signal_interrupt) /* TODO: Remove PD in S3 for power savings */ -GPIO_INT(AP_EC_S3_S0_L, PIN(5, 4), GPIO_INT_BOTH | GPIO_PULL_DOWN, +GPIO_INT(AP_EC_S3_S0_L, PIN(C, 1), GPIO_INT_BOTH | GPIO_PULL_DOWN, power_signal_interrupt) GPIO_INT(AP_CORE_PG, PIN(6, 7), GPIO_INT_BOTH | GPIO_PULL_UP, power_signal_interrupt) @@ -50,7 +50,7 @@ GPIO(PPVAR_LOGIC_EN, PIN(8, 5), GPIO_OUT_LOW) GPIO(PP900_AP_EN, PIN(B, 7), GPIO_OUT_LOW) GPIO(PP900_DDRPLL_EN, PIN(C, 0), GPIO_OUT_LOW) -GPIO(PP900_PLL_EN, PIN(C, 1), GPIO_OUT_LOW) +GPIO(PP900_PLL_EN, PIN(5, 4), GPIO_OUT_LOW) GPIO(PP900_PMU_EN, PIN(C, 2), GPIO_OUT_LOW) GPIO(PP900_USB_EN, PIN(A, 5), GPIO_OUT_LOW) GPIO(PP900_PCIE_EN, PIN(0, 0), GPIO_OUT_LOW) @@ -95,8 +95,8 @@ GPIO(LID_ACCEL_INT_L, PIN(C, 7), GPIO_INPUT | GPIO_PULL_UP) /* KSO2 is inverted */ GPIO(KBD_KSO2, PIN(1, 7), GPIO_OUT_LOW) -GPIO(USB_C0_5V_EN_L, PIN(D, 3), GPIO_OUT_HIGH | GPIO_OPEN_DRAIN) -GPIO(USB_C1_5V_EN_L, PIN(D, 2), GPIO_OUT_HIGH | GPIO_OPEN_DRAIN) +GPIO(USB_C0_5V_EN, PIN(D, 3), GPIO_OUT_LOW) +GPIO(USB_C1_5V_EN, PIN(D, 2), GPIO_OUT_LOW) GPIO(ENTERING_RW, PIN(7, 6), GPIO_OUT_LOW) GPIO(SYS_RST_L, PIN(6, 1), GPIO_OUT_HIGH | GPIO_OPEN_DRAIN) diff --git a/board/kevin/usb_pd_policy.c b/board/kevin/usb_pd_policy.c index 94b48b37d6..ca3aa12337 100644 --- a/board/kevin/usb_pd_policy.c +++ b/board/kevin/usb_pd_policy.c @@ -55,8 +55,8 @@ int pd_set_power_supply_ready(int port) bd99955_select_input_port(BD99955_CHARGE_PORT_NONE); /* Provide VBUS */ - gpio_set_level(port ? GPIO_USB_C1_5V_EN_L : - GPIO_USB_C0_5V_EN_L, 0); + gpio_set_level(port ? GPIO_USB_C1_5V_EN : + GPIO_USB_C0_5V_EN, 1); /* notify host of power info change */ pd_send_host_event(PD_EVENT_POWER_CHANGE); @@ -67,8 +67,8 @@ int pd_set_power_supply_ready(int port) void pd_power_supply_reset(int port) { /* Disable VBUS */ - gpio_set_level(port ? GPIO_USB_C1_5V_EN_L : - GPIO_USB_C0_5V_EN_L, 1); + gpio_set_level(port ? GPIO_USB_C1_5V_EN : + GPIO_USB_C0_5V_EN, 0); /* notify host of power info change */ pd_send_host_event(PD_EVENT_POWER_CHANGE); -- cgit v1.2.1