summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-07-01 16:32:33 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-03 00:07:57 +0000
commit6e7f31783acc91e781e93e1712fc9375f8da59eb (patch)
tree69bd7037cff7fb972182bdda34fc026c7962bc18
parent57ef57bd80563e98a1d7361c3852d32674381bb9 (diff)
downloadchrome-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>
-rw-r--r--baseboard/zork/baseboard.h6
-rw-r--r--baseboard/zork/variant_trembyle.c9
-rw-r--r--board/berknip/board.c5
-rw-r--r--board/berknip/board.h5
-rw-r--r--board/dalboz/board.h18
-rw-r--r--board/ezkinil/board.c5
-rw-r--r--board/ezkinil/board.h5
-rw-r--r--board/morphius/board.c5
-rw-r--r--board/morphius/board.h5
-rw-r--r--board/trembyle/board.c5
-rw-r--r--board/trembyle/board.h5
-rw-r--r--board/vilboz/board.h16
-rw-r--r--board/woomax/board.c43
-rw-r--r--board/woomax/board.h48
-rw-r--r--board/woomax/gpio.inc4
15 files changed, 83 insertions, 101 deletions
diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h
index 57667760ad..46497dbdc9 100644
--- a/baseboard/zork/baseboard.h
+++ b/baseboard/zork/baseboard.h
@@ -284,12 +284,6 @@ enum fan_channel {
FAN_CH_COUNT,
};
-enum usba_port {
- USBA_PORT_A0 = 0,
- USBA_PORT_A1,
- USBA_PORT_COUNT
-};
-
#ifdef VARIANT_ZORK_TREMBYLE
enum usbc_port {
USBC_PORT_C0 = 0,
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c
index 4249944760..6ec0eb404f 100644
--- a/baseboard/zork/variant_trembyle.c
+++ b/baseboard/zork/variant_trembyle.c
@@ -397,15 +397,6 @@ BUILD_ASSERT(ARRAY_SIZE(ioex_config) == USBC_PORT_COUNT);
BUILD_ASSERT(CONFIG_IO_EXPANDER_PORT_COUNT == USBC_PORT_COUNT);
/*****************************************************************************
- * USB-A Power
- */
-
-const int usb_port_enable[USBA_PORT_COUNT] = {
- IOEX_EN_USB_A0_5V,
- IOEX_EN_USB_A1_5V_DB,
-};
-
-/*****************************************************************************
* Custom Zork USB-C1 Retimer/MUX driver
*/
diff --git a/board/berknip/board.c b/board/berknip/board.c
index b91ee5af3d..27cadd5dd8 100644
--- a/board/berknip/board.c
+++ b/board/berknip/board.c
@@ -154,6 +154,11 @@ 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,
+ IOEX_EN_USB_A1_5V_DB,
+};
+
/*****************************************************************************
* Retimers
*/
diff --git a/board/berknip/board.h b/board/berknip/board.h
index c3f27a7e79..03624c2758 100644
--- a/board/berknip/board.h
+++ b/board/berknip/board.h
@@ -108,6 +108,11 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT
};
+enum usba_port {
+ USBA_PORT_A0 = 0,
+ USBA_PORT_A1,
+ USBA_PORT_COUNT
+};
/*****************************************************************************
* CBI EC FW Configuration
diff --git a/board/dalboz/board.h b/board/dalboz/board.h
index 08c7a5aa42..8e43aac31e 100644
--- a/board/dalboz/board.h
+++ b/board/dalboz/board.h
@@ -119,6 +119,17 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT
};
+enum usba_port {
+ USBA_PORT_A0 = 0,
+ USBA_PORT_A1,
+ USBA_PORT_COUNT
+};
+
+enum usbc_port {
+ USBC_PORT_C0 = 0,
+ USBC_PORT_C1,
+ USBC_PORT_COUNT
+};
/*****************************************************************************
* CBI EC FW Configuration
@@ -166,12 +177,6 @@ enum ec_cfg_usb_db_type {
DALBOZ_DB_D_OPT2_USBA_HDMI = 1,
};
-enum usbc_port {
- USBC_PORT_C0 = 0,
- USBC_PORT_C1,
- USBC_PORT_COUNT
-};
-
#define HAS_USBC1 \
(BIT(DALBOZ_DB_D_OPT1_USBAC))
@@ -181,7 +186,6 @@ static inline bool ec_config_has_usbc1(void)
HAS_USBC1);
}
-
#define HAS_USBC1_RETIMER_PS8740 \
(BIT(DALBOZ_DB_D_OPT1_USBAC))
diff --git a/board/ezkinil/board.c b/board/ezkinil/board.c
index 8ce907af12..3a3507c1eb 100644
--- a/board/ezkinil/board.c
+++ b/board/ezkinil/board.c
@@ -183,6 +183,11 @@ 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,
+ IOEX_EN_USB_A1_5V_DB,
+};
+
/*****************************************************************************
* Retimers
*/
diff --git a/board/ezkinil/board.h b/board/ezkinil/board.h
index 7233a9e3ef..00bb6b935f 100644
--- a/board/ezkinil/board.h
+++ b/board/ezkinil/board.h
@@ -98,6 +98,11 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT
};
+enum usba_port {
+ USBA_PORT_A0 = 0,
+ USBA_PORT_A1,
+ USBA_PORT_COUNT
+};
/*****************************************************************************
* CBI EC FW Configuration
diff --git a/board/morphius/board.c b/board/morphius/board.c
index 5c44130733..0aadb88849 100644
--- a/board/morphius/board.c
+++ b/board/morphius/board.c
@@ -173,6 +173,11 @@ 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,
+ IOEX_EN_USB_A1_5V_DB,
+};
+
/*****************************************************************************
* USB-C MUX/Retimer dynamic configuration
*/
diff --git a/board/morphius/board.h b/board/morphius/board.h
index c176bb4775..8aed02128c 100644
--- a/board/morphius/board.h
+++ b/board/morphius/board.h
@@ -114,6 +114,11 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT
};
+enum usba_port {
+ USBA_PORT_A0 = 0,
+ USBA_PORT_A1,
+ USBA_PORT_COUNT
+};
/*****************************************************************************
* CBI EC FW Configuration
diff --git a/board/trembyle/board.c b/board/trembyle/board.c
index 5fec7c71db..baedf1c030 100644
--- a/board/trembyle/board.c
+++ b/board/trembyle/board.c
@@ -176,6 +176,11 @@ 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,
+ IOEX_EN_USB_A1_5V_DB,
+};
+
/*****************************************************************************
* USB-A Retimer tuning
*/
diff --git a/board/trembyle/board.h b/board/trembyle/board.h
index 5be32fff01..ee490f3261 100644
--- a/board/trembyle/board.h
+++ b/board/trembyle/board.h
@@ -93,6 +93,11 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT
};
+enum usba_port {
+ USBA_PORT_A0 = 0,
+ USBA_PORT_A1,
+ USBA_PORT_COUNT
+};
/*****************************************************************************
* CBI EC FW Configuration
diff --git a/board/vilboz/board.h b/board/vilboz/board.h
index 3af2e95a4e..5eb81b2cf2 100644
--- a/board/vilboz/board.h
+++ b/board/vilboz/board.h
@@ -110,6 +110,16 @@ enum temp_sensor_id {
TEMP_SENSOR_COUNT
};
+enum usba_port {
+ USBA_PORT_A0 = 0,
+ USBA_PORT_A1,
+ USBA_PORT_COUNT
+};
+
+enum usbc_port {
+ USBC_PORT_C0 = 0,
+ USBC_PORT_COUNT
+};
/*****************************************************************************
* CBI EC FW Configuration
@@ -157,11 +167,6 @@ enum ec_cfg_usb_db_type {
DALBOZ_DB_D_OPT2_USBA_HDMI = 1,
};
-enum usbc_port {
- USBC_PORT_C0 = 0,
- USBC_PORT_COUNT
-};
-
#define HAS_USBC1 \
(BIT(DALBOZ_DB_D_OPT1_USBAC))
@@ -171,7 +176,6 @@ static inline bool ec_config_has_usbc1(void)
HAS_USBC1);
}
-
#define HAS_USBC1_RETIMER_PS8740 \
(BIT(DALBOZ_DB_D_OPT1_USBAC))
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)]