diff --git a/drivers/usb/typec/mmi_tcpc/pd_policy_engine_snk.c b/drivers/usb/typec/mmi_tcpc/pd_policy_engine_snk.c index f9ade6e40f20..b7151f8ca5a5 100644 --- a/drivers/usb/typec/mmi_tcpc/pd_policy_engine_snk.c +++ b/drivers/usb/typec/mmi_tcpc/pd_policy_engine_snk.c @@ -161,7 +161,14 @@ void pe_snk_ready_entry(struct pd_port *pd_port) void pe_snk_hard_reset_entry(struct pd_port *pd_port) { + int rv = 0; + uint32_t chip_id = 0; + pd_send_hard_reset(pd_port); + rv = tcpci_get_chip_id(pd_port->tcpc, &chip_id); + if (!rv && (SC2150A_DID == chip_id)) { + pd_enable_timer(pd_port,PD_TIMER_HARD_RESET_COMPLETE); + } } void pe_snk_transition_to_default_entry(struct pd_port *pd_port) diff --git a/drivers/usb/typec/mmi_tcpc/tcpci_timer.c b/drivers/usb/typec/mmi_tcpc/tcpci_timer.c index ce36ba320d68..b32516ad8b57 100644 --- a/drivers/usb/typec/mmi_tcpc/tcpci_timer.c +++ b/drivers/usb/typec/mmi_tcpc/tcpci_timer.c @@ -369,6 +369,8 @@ static inline void on_pe_timer_timeout( struct tcpc_device *tcpc, uint32_t timer_id) { struct pd_event pd_event = {0}; + int rv = 0; + uint32_t chip_id = 0; pd_event.event_type = PD_EVT_TIMER_MSG; pd_event.msg = timer_id; @@ -426,6 +428,13 @@ static inline void on_pe_timer_timeout( pd_put_pe_event(&tcpc->pd_port, PD_PE_IDLE); break; + case PD_TIMER_HARD_RESET_COMPLETE: + rv = tcpci_get_chip_id(tcpc, &chip_id); + if (!rv && (SC2150A_DID == chip_id)) { + pd_put_sent_hard_reset_event(tcpc); + } + break; + default: pd_put_event(tcpc, &pd_event, false); break;