diff options
author | Diana Z <dzigterman@chromium.org> | 2021-08-12 14:54:13 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-26 18:17:16 +0000 |
commit | 9914aa96fdecbbca84fc011c30e2925c6bf199e5 (patch) | |
tree | 820f4595bb941ca5a4ad113c22e5826aaa5f76d4 | |
parent | ab6a9a47c8822014faed8a4114e126f41b9abbbc (diff) | |
download | chrome-ec-9914aa96fdecbbca84fc011c30e2925c6bf199e5.tar.gz |
ANX7451: Report failure to set mux in G3
Since the ANX7451 is unpowered in Z1/G3, return an error for mux sets
during this time. This will let the usb_mux.c code know that any set it
attempted to perform was unsuccessful. Otherwise, it will be assumed
that setting mux mode of None succeeded, when we'll actually power up to
default USB mode.
BRANCH=None
BUG=b:195045790
TEST=on guybrush, power on board and ensure that C1 is put into None
mode successfully after its powered
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ic98be3bc15e8f0affeda25d7d7170b89e3aecf10
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3093087
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | driver/usb_mux/anx7451.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/driver/usb_mux/anx7451.c b/driver/usb_mux/anx7451.c index 52318eee29..42fdb1f078 100644 --- a/driver/usb_mux/anx7451.c +++ b/driver/usb_mux/anx7451.c @@ -97,10 +97,13 @@ static int anx7451_set_mux(const struct usb_mux *me, mux_state_t mux_state, /* This driver does not use host command ACKs */ *ack_required = false; - /* Mux is not powered in Z1 */ + /* + * Mux is not powered in Z1, and will start up in USB mode. Ensure any + * mux sets when off get run again so we don't leave the retimer on with + * the None mode set + */ if (chipset_in_state(CHIPSET_STATE_HARD_OFF)) - return (mux_state == USB_PD_MUX_NONE) ? EC_SUCCESS - : EC_ERROR_NOT_POWERED; + return EC_ERROR_NOT_POWERED; /* To disable both DP and USB the mux must be powered off. */ if (!(mux_state & (USB_PD_MUX_USB_ENABLED | USB_PD_MUX_DP_ENABLED))) |