diff options
author | Edward Hill <ecgh@chromium.org> | 2020-06-02 18:28:26 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-03 05:39:13 +0000 |
commit | 5124d453200ce13dfd8badfcd2c56e57334df2df (patch) | |
tree | b397b594cf13c79c77beeebf7bb7ec5b2c03bb86 /board/dalboz | |
parent | ce804f34ccb7c65fc4711c01eac63ceb8c008e26 (diff) | |
download | chrome-ec-5124d453200ce13dfd8badfcd2c56e57334df2df.tar.gz |
Zork: Switch PS8743 from IOEX_USB_C1_DATA_EN to I2C
Align all Zork devices on using I2C control of PS8743 mux mode, and stop
using IOEX_USB_C1_DATA_EN signal/pin. This matches what we were already
doing for Dalboz, and gives power savings in both S0 and S3 when nothing
is plugged in and mux is set to none.
BUG=b:157951317
BRANCH=none
TEST=external display and i2ctrace on ezkinil
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: Id1c8b172a99bb25bed8b57e90686d933447432f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2227589
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'board/dalboz')
-rw-r--r-- | board/dalboz/board.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/board/dalboz/board.c b/board/dalboz/board.c index 85d7f32b11..3de145881c 100644 --- a/board/dalboz/board.c +++ b/board/dalboz/board.c @@ -161,21 +161,14 @@ void pcal6408_interrupt(enum gpio_signal signal) static int board_ps8743_mux_set(const struct usb_mux *me, mux_state_t mux_state) { - int rv = EC_SUCCESS; - int reg = 0; + if (mux_state & USB_PD_MUX_DP_ENABLED) + /* Enable IN_HPD on the DB */ + ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 1); + else + /* Disable IN_HPD on the DB */ + ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 0); - rv = ps8743_read(me, PS8743_REG_MODE, ®); - if (rv) - return rv; - - /* Disable FLIP pin, enable I2C control. */ - reg |= PS8743_MODE_FLIP_REG_CONTROL; - /* Disable CE_USB pin, enable I2C control. */ - reg |= PS8743_MODE_USB_REG_CONTROL; - /* Disable CE_DP pin, enable I2C control. */ - reg |= PS8743_MODE_DP_REG_CONTROL; - - return ps8743_write(me, PS8743_REG_MODE, reg); + return EC_SUCCESS; } static void setup_fw_config(void) @@ -192,6 +185,7 @@ static void setup_fw_config(void) ccprints("PS8740 USB MUX"); usb_muxes[USBC_PORT_C1].i2c_addr_flags = PS8740_I2C_ADDR0_FLAG; usb_muxes[USBC_PORT_C1].driver = &ps8740_usb_mux_driver; + usb_muxes[USBC_PORT_C1].board_set = NULL; } if (ec_config_get_usb_db() == DALBOZ_DB_D_OPT2_USBA_HDMI) { |