From 569cc718d5bcf025dafd7ade5c45888bb7738534 Mon Sep 17 00:00:00 2001 From: Eric Yilun Lin Date: Tue, 31 Mar 2020 10:05:54 +0800 Subject: baseboard/kukui: correct FUSB302 VBUS turn-on delay TCPC FUSB302 needs more time to raise VBUS to 5V. This CL increases the delay to ensure that in SRC_DISCOVER state, the VBUS is already raised to 5V. BRANCH=kukui BUG=b:152544526 TEST=Tested on kappa, kappa source to servo-v4, and issue hard reset, and ensure they can recover from the hard reset. Change-Id: I5d656c1941c4f75410e51374ba6859d6d29776fe Signed-off-by: Eric Yilun Lin Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2128394 Reviewed-by: Ting Shen --- baseboard/kukui/baseboard.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/baseboard/kukui/baseboard.h b/baseboard/kukui/baseboard.h index 0f091f840e..50f89fe27d 100644 --- a/baseboard/kukui/baseboard.h +++ b/baseboard/kukui/baseboard.h @@ -42,6 +42,12 @@ #define CONFIG_USB_PD_TCPC_LOW_POWER #define CONFIG_USB_PD_DISCHARGE_TCPC #define CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE + +/* TCPC MT6370 */ +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + /* * The Maximum input voltage is 13.5V, need another 5% tolerance. * 12.85V * 1.05 = 13.5V @@ -54,6 +60,12 @@ #define CONFIG_CHARGER_SENSE_RESISTOR 10 /* BOARD_RS2 */ #define CONFIG_CHARGER_OTG #define CONFIG_CHARGE_RAMP_HW + +/* TCPC FUSB302 */ +#define PD_POWER_SUPPLY_TURN_ON_DELAY 160000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + #define PD_MAX_VOLTAGE_MV 20000 #else #error Must define a VARIANT_KUKUI_CHARGER @@ -204,10 +216,6 @@ #define PD_MAX_CURRENT_MA 3000 #endif -#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ -#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */ -#define PD_VCONN_SWAP_DELAY 5000 /* us */ - /* Timer selection */ #define TIM_CLOCK32 2 #define TIM_WATCHDOG 7 -- cgit v1.2.1