diff options
author | Denis Brockus <dbrockus@chromium.org> | 2020-02-10 12:39:47 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-11 04:16:33 +0000 |
commit | 9473c61ff528ce45bda479027f5011297faaa5da (patch) | |
tree | 1809ab3573fbfa292e4b85799b8c447cc0d55e53 | |
parent | 02e0cabe5d9462d36a1df50d392d8a7d3b543ef7 (diff) | |
download | chrome-ec-9473c61ff528ce45bda479027f5011297faaa5da.tar.gz |
trembyle: initialize PS8811 after AP rail is high
BUG=b:138600008
BRANCH=none
TEST=verify USB-A1 runs USB3.1g2 speeds
Change-Id: I688f02bfbabd53e69a1d7d7a08526db6ddad77b0
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2047629
Commit-Queue: Edward Hill <ecgh@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | baseboard/zork/baseboard.c | 14 | ||||
-rw-r--r-- | baseboard/zork/baseboard.h | 3 | ||||
-rw-r--r-- | board/trembyle/gpio.inc | 4 |
3 files changed, 16 insertions, 5 deletions
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c index b7bbb7b676..fb4d00a1f8 100644 --- a/baseboard/zork/baseboard.c +++ b/baseboard/zork/baseboard.c @@ -482,6 +482,10 @@ static void ps8811_tuning_init(void) { int rv; + /* Turn on the retimers */ + ioex_set_level(IOEX_USB_A0_RETIMER_EN, 1); + ioex_set_level(IOEX_USB_A1_RETIMER_EN, 1); + /* USB-A0 can run with default settings */ /* USB-A1 needs to increase gain to get over MB/DB connector */ @@ -495,7 +499,15 @@ static void ps8811_tuning_init(void) return; } } -DECLARE_HOOK(HOOK_INIT, ps8811_tuning_init, HOOK_PRIO_INIT_I2C + 1); +DECLARE_HOOK(HOOK_CHIPSET_STARTUP, ps8811_tuning_init, HOOK_PRIO_DEFAULT); + +static void ps8811_retimer_off(void) +{ + /* Turn on the retimers */ + ioex_set_level(IOEX_USB_A0_RETIMER_EN, 0); + ioex_set_level(IOEX_USB_A1_RETIMER_EN, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, ps8811_retimer_off, HOOK_PRIO_DEFAULT); /***************************************************************************** * Custom Zork USB-C1 Retimer/MUX driver diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h index 693ee1507d..ae112e744f 100644 --- a/baseboard/zork/baseboard.h +++ b/baseboard/zork/baseboard.h @@ -110,9 +110,8 @@ */ #define CONFIG_USB_PID 0x5040 -/* TODO(b/142284905): Enable new PD stack */ #if 0 -/* Enable the new USB-C PD stack */ +/* TODO(b/142284905): Enable the TCPMv2 PD stack */ #define CONFIG_USB_PE_SM #define CONFIG_USB_PRL_SM #define CONFIG_USB_SM_FRAMEWORK diff --git a/board/trembyle/gpio.inc b/board/trembyle/gpio.inc index 70c861b83e..ad8ae7c738 100644 --- a/board/trembyle/gpio.inc +++ b/board/trembyle/gpio.inc @@ -54,7 +54,7 @@ GPIO(DP2_HPD, PIN(C, 1), GPIO_OUT_LOW) /* C1 DP Hotplug Detect */ GPIO(LED_FULL_L, PIN(6, 0), GPIO_OUT_HIGH) GPIO(LED_CHRG_L, PIN(C, 0), GPIO_OUT_HIGH) -IOEX(USB_A0_RETIMER_EN, EXPIN(USBC_PORT_C0, 0, 0), GPIO_OUT_HIGH) /* A0 Retimer Enable */ +IOEX(USB_A0_RETIMER_EN, EXPIN(USBC_PORT_C0, 0, 0), GPIO_OUT_LOW) /* A0 Retimer Enable */ IOEX(USB_A0_RETIMER_RST, EXPIN(USBC_PORT_C0, 0, 1), GPIO_OUT_LOW) /* A0 Retimer Reset */ IOEX(USB_C0_FAULT_ODL, EXPIN(USBC_PORT_C0, 0, 3), GPIO_ODR_HIGH) /* C0 Fault to SOC */ IOEX(USB_C0_TCPC_FASTSW_CTL_EN, EXPIN(USBC_PORT_C0, 0, 4), GPIO_OUT_LOW) /* C0 FastSwitch Control */ @@ -66,7 +66,7 @@ IOEX(USB_C0_DATA_EN, EXPIN(USBC_PORT_C0, 1, 4), GPIO_OUT_LOW) /* C0 Data Enable IOEX(EN_USB_A0_5V, EXPIN(USBC_PORT_C0, 1, 5), GPIO_OUT_LOW) /* A0 5V Source Enable */ IOEX(USB_A0_CHARGE_EN_L, EXPIN(USBC_PORT_C0, 1, 6), GPIO_OUT_HIGH) /* A0 5V High Current Enable */ -IOEX(USB_A1_RETIMER_EN, EXPIN(USBC_PORT_C1, 0, 0), GPIO_OUT_HIGH) /* A1 Retimer Enable */ +IOEX(USB_A1_RETIMER_EN, EXPIN(USBC_PORT_C1, 0, 0), GPIO_OUT_LOW) /* A1 Retimer Enable */ IOEX(USB_A1_RETIMER_RST_DB, EXPIN(USBC_PORT_C1, 0, 1), GPIO_OUT_LOW) /* A1 Retimer Reset */ IOEX(USB_C1_HPD_IN_DB, EXPIN(USBC_PORT_C1, 0, 2), GPIO_OUT_LOW) /* C1 HPD */ IOEX(MST_HPD_OUT, EXPIN(USBC_PORT_C1, 0, 3), GPIO_INPUT) /* HPD from MST Hub */ |