diff options
Diffstat (limited to 'zephyr/projects/corsola/src/usb_pd_policy.c')
-rw-r--r-- | zephyr/projects/corsola/src/usb_pd_policy.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/zephyr/projects/corsola/src/usb_pd_policy.c b/zephyr/projects/corsola/src/usb_pd_policy.c index 9d126e9962..cdcb49ff2e 100644 --- a/zephyr/projects/corsola/src/usb_pd_policy.c +++ b/zephyr/projects/corsola/src/usb_pd_policy.c @@ -110,6 +110,20 @@ __override int svdm_dp_config(int port, uint32_t *payload) __override void svdm_dp_post_config(int port) { + mux_state_t mux_mode = svdm_dp_get_mux_mode(port); + + /* + * Prior to post-config, the mux will be reset to safe mode, and this + * will break mux config and aux path config we did in the first DP + * status command. Only enable this if the port is the current aux-port. + */ + if (port == active_aux_port) { + usb_mux_set(port, mux_mode, USB_SWITCH_CONNECT, + polarity_rm_dts(pd_get_polarity(port))); + usb_mux_hpd_update(port, USB_PD_MUX_HPD_LVL | + USB_PD_MUX_HPD_IRQ_DEASSERTED); + } + dp_flags[port] |= DP_FLAGS_DP_ON; } |