diff options
author | Sanna Parmar <fnu.sanna@intel.com> | 2018-10-12 18:19:37 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-05 22:09:29 -0800 |
commit | c7af4fb76f258368da122aff6dad6bb33a0be12e (patch) | |
tree | 39bf22eb4b0878ca4b420ca871ca8ea4f2554c9b /driver | |
parent | 6fd1d521e4822a3f8da3ec65d408f874d682ee49 (diff) | |
download | chrome-ec-c7af4fb76f258368da122aff6dad6bb33a0be12e.tar.gz |
anx7447:Configure the MUX correctly at init
ANX initializes its muxes to (MUX_USB_ENABLED | MUX_DP_ENABLED)
at init, this is error prone when the display and USB devices are
attached before the ANX chip is powered on hence, overriding the
default mux state to TYPEC_MUX_NONE at init.
BRANCH=none
BUG=b:117789358
TEST=Manually tested on yorp
1. EC command "typec 0" shows 'No Superspeed Connection' when
nothing is connected.
2. Able to get the HDMI display working on ANX before and after
EC reboot.
Change-Id: Ic174ff77fbfac7bb7478f4f92abf80018480c406
Signed-off-by: Sanna Parmar <fnu.sanna@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1282017
Tested-by: Sanna Fnu <fnu.sanna@intel.corp-partner.google.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/tcpm/anx7447.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/driver/tcpm/anx7447.c b/driver/tcpm/anx7447.c index cd06e83b07..37e1342afa 100644 --- a/driver/tcpm/anx7447.c +++ b/driver/tcpm/anx7447.c @@ -41,6 +41,8 @@ struct anx_state { int mux_state; }; +static int anx7447_mux_set(int port, mux_state_t mux_state); + static struct anx_state anx[CONFIG_USB_PD_PORT_COUNT]; /* @@ -472,12 +474,12 @@ void anx7447_tcpc_clear_hpd_status(int port) #ifdef CONFIG_USB_PD_TCPM_MUX static int anx7447_mux_init(int port) { - /* Nothing to do here, ANX initializes its muxes - * as (MUX_USB_ENABLED | MUX_DP_ENABLED) + /* + * ANX initializes its muxes to (MUX_USB_ENABLED | MUX_DP_ENABLED) + * when reinitialized, we need to force initialize it to + * TYPEC_MUX_NONE */ - anx[port].mux_state = MUX_USB_ENABLED | MUX_DP_ENABLED; - - return EC_SUCCESS; + return anx7447_mux_set(port, TYPEC_MUX_NONE); } /* |