diff options
author | Edward Hill <ecgh@chromium.org> | 2020-07-01 16:32:33 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-03 00:07:57 +0000 |
commit | 6e7f31783acc91e781e93e1712fc9375f8da59eb (patch) | |
tree | 69bd7037cff7fb972182bdda34fc026c7962bc18 /board/woomax | |
parent | 57ef57bd80563e98a1d7361c3852d32674381bb9 (diff) | |
download | chrome-ec-6e7f31783acc91e781e93e1712fc9375f8da59eb.tar.gz |
woomax: Update USB-A and FW_CONFIG
Remove USB-A1 and correct FW_CONFIG.
BUG=b:160293750
BRANCH=none
TEST=none
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I6e415c3dac85905af812ac5ce26ad3bbf4fcf869
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277212
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'board/woomax')
-rw-r--r-- | board/woomax/board.c | 43 | ||||
-rw-r--r-- | board/woomax/board.h | 48 | ||||
-rw-r--r-- | board/woomax/gpio.inc | 4 |
3 files changed, 22 insertions, 73 deletions
diff --git a/board/woomax/board.c b/board/woomax/board.c index 16b9bd38e4..c29b528031 100644 --- a/board/woomax/board.c +++ b/board/woomax/board.c @@ -176,6 +176,10 @@ const struct mft_t mft_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(mft_channels) == MFT_CH_COUNT); +const int usb_port_enable[USBA_PORT_COUNT] = { + IOEX_EN_USB_A0_5V, +}; + /***************************************************************************** * USB-A Retimer tuning */ @@ -189,7 +193,6 @@ static void ps8811_tuning_init(void) /* 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 */ for (retry = 0; retry < PS8811_ACCESS_RETRIES; ++retry) { @@ -205,21 +208,6 @@ static void ps8811_tuning_init(void) ioex_set_level(IOEX_USB_A0_RETIMER_EN, 0); CPRINTSUSB("C0: PS8811 not detected"); } - - /* USB-A1 needs to increase gain to get over MB/DB connector */ - for (retry = 0; retry < PS8811_ACCESS_RETRIES; ++retry) { - rv = i2c_write8(I2C_PORT_USBA1, - PS8811_I2C_ADDR_FLAGS + PS8811_REG_PAGE1, - PS8811_REG1_USB_BEQ_LEVEL, - PS8811_BEQ_I2C_LEVEL_UP_13DB | - PS8811_BEQ_PIN_LEVEL_UP_18DB); - if (!rv) - break; - } - if (rv) { - ioex_set_level(IOEX_USB_A1_RETIMER_EN, 0); - CPRINTSUSB("C1: PS8811 not detected"); - } } DECLARE_HOOK(HOOK_CHIPSET_RESUME, ps8811_tuning_init, HOOK_PRIO_DEFAULT); @@ -227,7 +215,6 @@ 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_SUSPEND, ps8811_retimer_off, HOOK_PRIO_DEFAULT); @@ -273,28 +260,6 @@ static void setup_mux(void) } } -/* TODO(b:151232257) Remove probe code when hardware supports CBI */ -#include "driver/retimer/ps8802.h" -#include "driver/retimer/ps8818.h" -static void probe_setup_mux_backup(void) -{ - if (usb_muxes[USBC_PORT_C1].driver != NULL) - return; - - /* - * Identifying a PS8818 is faster than the PS8802, - * so do it first. - */ - if (ps8818_detect(&usbc1_ps8818) == EC_SUCCESS) { - set_cbi_fw_config(0x00004000); - setup_mux(); - } else if (ps8802_detect(&usbc1_ps8802) == EC_SUCCESS) { - set_cbi_fw_config(0x00004001); - setup_mux(); - } -} -DECLARE_HOOK(HOOK_CHIPSET_STARTUP, probe_setup_mux_backup, HOOK_PRIO_DEFAULT); - const struct pi3dpx1207_usb_control pi3dpx1207_controls[] = { [USBC_PORT_C0] = { .enable_gpio = IOEX_USB_C0_DATA_EN, diff --git a/board/woomax/board.h b/board/woomax/board.h index 8b39b5563c..6c3603d491 100644 --- a/board/woomax/board.h +++ b/board/woomax/board.h @@ -20,6 +20,8 @@ #define CONFIG_SYSTEM_UNLOCKED #define CONFIG_I2C_DEBUG +#undef CONFIG_USB_PORT_POWER_SMART_PORT_COUNT +#define CONFIG_USB_PORT_POWER_SMART_PORT_COUNT 1 #define CONFIG_USBC_RETIMER_PI3DPX1207 #define CONFIG_MKBP_USE_GPIO @@ -93,13 +95,18 @@ enum temp_sensor_id { TEMP_SENSOR_COUNT }; +enum usba_port { + USBA_PORT_A0 = 0, + USBA_PORT_COUNT +}; + /***************************************************************************** * CBI EC FW Configuration */ #include "cbi_ec_fw_config.h" /** - * TREMBYLE_MB_USBAC + * WOOMAX_MB_USBAC * USB-A0 Speed: 10 Gbps * Retimer: PS8811 * USB-C0 Speed: 10 Gbps @@ -109,13 +116,11 @@ enum temp_sensor_id { * IOEX: TCPC */ enum ec_cfg_usb_mb_type { - TREMBYLE_MB_USBAC = 0, + WOOMAX_MB_USBAC = 0, }; /** - * TREMBYLE_DB_T_OPT1_USBAC_HMDI - * USB-A1 Speed: 10 Gbps - * Retimer: PS8811 + * WOOMAX_DB_T_OPT1_USBAC_HMDI * USB-C1 Speed: 10 Gbps * Retimer: PS8818 * TCPC: NCT3807 @@ -125,21 +130,7 @@ enum ec_cfg_usb_mb_type { * Retimer: PI3HDX1204 * MST Hub: none * - * TREMBYLE_DB_T_OPT2_USBAC - * USB-A1 Speed: 10 Gbps - * Retimer: PS8811 - * USB-C1 Speed: 10 Gbps - * Retimer: PS8802 - * TCPC: NCT3807 - * PPC: NX20P3483 - * IOEX: TCPC - * HDMI Exists: no - * Retimer: none - * MST Hub: none - * - * TREMBYLE_DB_T_OPT3_USBAC_HDMI_MSTHUB - * USB-A1 Speed: 10 Gbps - * Retimer: PS8811 + * WOOMAX_DB_T_OPT3_USBAC_HDMI_MSTHUB * USB-C1 Speed: 10 Gbps * Retimer: PS8802 * TCPC: NCT3807 @@ -150,15 +141,12 @@ enum ec_cfg_usb_mb_type { * MST Hub: RTD2141B */ enum ec_cfg_usb_db_type { - TREMBYLE_DB_T_OPT1_USBAC_HMDI = 0, - TREMBYLE_DB_T_OPT2_USBAC = 1, - TREMBYLE_DB_T_OPT3_USBAC_HDMI_MSTHUB = 2, + WOOMAX_DB_T_OPT1_USBAC_HMDI = 0, + WOOMAX_DB_T_OPT3_USBAC_HDMI_MSTHUB = 1, }; - #define HAS_USBC1_RETIMER_PS8802 \ - (BIT(TREMBYLE_DB_T_OPT2_USBAC) | \ - BIT(TREMBYLE_DB_T_OPT3_USBAC_HDMI_MSTHUB)) + (BIT(WOOMAX_DB_T_OPT3_USBAC_HDMI_MSTHUB)) static inline bool ec_config_has_usbc1_retimer_ps8802(void) { @@ -167,7 +155,7 @@ static inline bool ec_config_has_usbc1_retimer_ps8802(void) } #define HAS_USBC1_RETIMER_PS8818 \ - (BIT(TREMBYLE_DB_T_OPT1_USBAC_HMDI)) + (BIT(WOOMAX_DB_T_OPT1_USBAC_HMDI)) static inline bool ec_config_has_usbc1_retimer_ps8818(void) { @@ -176,7 +164,7 @@ static inline bool ec_config_has_usbc1_retimer_ps8818(void) } #define HAS_HDMI_RETIMER_PI3HDX1204 \ - (BIT(TREMBYLE_DB_T_OPT1_USBAC_HMDI)) + (BIT(WOOMAX_DB_T_OPT1_USBAC_HMDI)) static inline bool ec_config_has_hdmi_retimer_pi3hdx1204(void) { @@ -185,7 +173,7 @@ static inline bool ec_config_has_hdmi_retimer_pi3hdx1204(void) } #define HAS_MST_HUB_RTD2141B \ - (BIT(TREMBYLE_DB_T_OPT3_USBAC_HDMI_MSTHUB)) + (BIT(WOOMAX_DB_T_OPT3_USBAC_HDMI_MSTHUB)) static inline bool ec_config_has_mst_hub_rtd2141b(void) { @@ -194,7 +182,7 @@ static inline bool ec_config_has_mst_hub_rtd2141b(void) } #define HAS_HDMI_CONN_HPD \ - (BIT(TREMBYLE_DB_T_OPT1_USBAC_HMDI)) + (BIT(WOOMAX_DB_T_OPT1_USBAC_HMDI)) static inline bool ec_config_has_hdmi_conn_hpd(void) { diff --git a/board/woomax/gpio.inc b/board/woomax/gpio.inc index 973b999a79..c5b92e3b8f 100644 --- a/board/woomax/gpio.inc +++ b/board/woomax/gpio.inc @@ -72,8 +72,6 @@ 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_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(USB_C1_TCPC_FASTSW_CTL_EN, EXPIN(USBC_PORT_C1, 0, 4), GPIO_OUT_LOW) /* C1 FastSwitch Control */ IOEX(USB_C1_MUX_RST_DB, EXPIN(USBC_PORT_C1, 1, 1), GPIO_OUT_LOW) /* C1 Mux Reset */ @@ -81,8 +79,6 @@ IOEX(USB_C1_SBU_FAULT_DB_ODL, EXPIN(USBC_PORT_C1, 1, 2), GPIO_INPUT) /* C1 SBU IOEX(USB_C1_PPC_EN_L, EXPIN(USBC_PORT_C1, 1, 3), GPIO_OUT_LOW) /* C1 PPC Enable */ IOEX(HDMI_DATA_EN_DB, EXPIN(USBC_PORT_C1, 1, 4), GPIO_OUT_HIGH) /* HDMI Retimer Enable */ IOEX(USB_C1_DATA_EN, EXPIN(USBC_PORT_C1, 1, 5), GPIO_OUT_HIGH) /* C1 Retimer Enable */ -IOEX(EN_USB_A1_5V_DB, EXPIN(USBC_PORT_C1, 1, 6), GPIO_OUT_LOW) /* A1 5V Source Enable */ -IOEX(USB_A1_CHARGE_EN_DB_L, EXPIN(USBC_PORT_C1, 1, 7), GPIO_OUT_HIGH) /* A1 5V High Current Enable */ /* * The NPCX LPC driver configures and controls SCI, so PCH_SCI_ODL [PIN(7, 6)] |