summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorLu Zhang <lu.zhang@bitland.corp-partner.google.com>2020-06-10 16:03:23 +0800
committerCommit Bot <commit-bot@chromium.org>2020-06-11 09:57:16 +0000
commitf8f4a60129ca984b6c1e95ba57f68c74d82ba045 (patch)
treee00e245c2c1f9895d238eda41f4900d7672079c3 /baseboard
parent2dd31c0c7e4f23233830ceb09724896cfe50541c (diff)
downloadchrome-ec-f8f4a60129ca984b6c1e95ba57f68c74d82ba045.tar.gz
vilboz: Remove ioex C1 and config the ioexpander gpio
BUG=b:158125500 BRANCH=none TEST=make buildall -j Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: Ica8cdd8f0b14f612f17018a3a95df5a23a6ad43f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2239593 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/zork/baseboard.c15
-rw-r--r--baseboard/zork/baseboard.h8
-rw-r--r--baseboard/zork/variant_trembyle.c17
3 files changed, 21 insertions, 19 deletions
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c
index 41fda62343..204a133f32 100644
--- a/baseboard/zork/baseboard.c
+++ b/baseboard/zork/baseboard.c
@@ -114,21 +114,6 @@ int board_aoz1380_set_vbus_source_current_limit(int port,
return rv;
}
-int board_tcpc_fast_role_swap_enable(int port, int enable)
-{
- int rv = EC_SUCCESS;
-
- /* Use the TCPC to enable fast switch when FRS included */
- if (port == USBC_PORT_C0) {
- rv = ioex_set_level(IOEX_USB_C0_TCPC_FASTSW_CTL_EN,
- !!enable);
- } else {
- rv = ioex_set_level(IOEX_USB_C1_TCPC_FASTSW_CTL_EN,
- !!enable);
- }
-
- return rv;
-}
static void baseboard_chipset_suspend(void)
{
/* Disable display and keyboard backlights. */
diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h
index 287f6293c9..6de9bf2296 100644
--- a/baseboard/zork/baseboard.h
+++ b/baseboard/zork/baseboard.h
@@ -165,7 +165,6 @@
#define CONFIG_USBC_VCONN
#define CONFIG_USBC_VCONN_SWAP
#define CONFIG_USB_MUX_AMD_FP5
-#define CONFIG_USB_MUX_RUNTIME_CONFIG
#if defined(VARIANT_ZORK_TREMBYLE)
#define CONFIG_USB_PD_PORT_MAX_COUNT 2
@@ -173,9 +172,12 @@
#define CONFIG_USBC_RETIMER_PS8802
#define CONFIG_USBC_RETIMER_PS8818
#define CONFIG_IO_EXPANDER_PORT_COUNT USBC_PORT_COUNT
+ #define CONFIG_USB_MUX_RUNTIME_CONFIG
+ /* USB-A config */
+ #define GPIO_USB1_ILIM_SEL IOEX_USB_A0_CHARGE_EN_L
+ #define GPIO_USB2_ILIM_SEL IOEX_USB_A1_CHARGE_EN_DB_L
#elif defined(VARIANT_ZORK_DALBOZ)
#define CONFIG_IO_EXPANDER_PORT_COUNT IOEX_PORT_COUNT
- #define CONFIG_USB_PORT_ENABLE_DYNAMIC
#endif
/* USB-A config */
@@ -184,8 +186,6 @@
#define CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY
#define CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE USB_CHARGE_MODE_CDP
#define CONFIG_USB_PORT_POWER_SMART_INVERTED
-#define GPIO_USB1_ILIM_SEL IOEX_USB_A0_CHARGE_EN_L
-#define GPIO_USB2_ILIM_SEL IOEX_USB_A1_CHARGE_EN_DB_L
#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c
index 3e76cc2bdf..00204ca523 100644
--- a/baseboard/zork/variant_trembyle.c
+++ b/baseboard/zork/variant_trembyle.c
@@ -342,6 +342,23 @@ void tcpc_alert_event(enum gpio_signal signal)
schedule_deferred_pd_interrupt(port);
}
+
+int board_tcpc_fast_role_swap_enable(int port, int enable)
+{
+ int rv = EC_SUCCESS;
+
+ /* Use the TCPC to enable fast switch when FRS included */
+ if (port == USBC_PORT_C0) {
+ rv = ioex_set_level(IOEX_USB_C0_TCPC_FASTSW_CTL_EN,
+ !!enable);
+ } else {
+ rv = ioex_set_level(IOEX_USB_C1_TCPC_FASTSW_CTL_EN,
+ !!enable);
+ }
+
+ return rv;
+}
+
void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {