7.4.3 Power Role Swap
Upon entering the active mode, the power provider and consumer is determined by whether or not TUSB422 is presenting a Rp or a Rd on CC pins. If TUSB422 is presenting a Rp, then TUSB422 is a power provider. If TUSB422 is presenting a Rd, then TUSB422 is a power consumer. Once in the active mode, it may become necessary change power role through performing a power role swap. Key requirements for performing a power role swap by the software are listed below. For additional details on power role swap, consult the USB PD specification.
Transition from power provider to power consumer:
- TCPM state machine needs to transition from Attached.SRC to Attached.SNK.
- Disable VBUS source. TCPM should send DisableSourceVbus command to TUSB422 Command register.
- Once VBUS is at vSafe0V, disable AUTO_DISCHARGE_DISCONNECT in Power Control register and change Role Control register to present a Rd.
- Upon reception of PS_RDY message from port partner, update message header information and send PS_RDY back to port partner.
- Enable Sink VBUS and VBUS presence detection. TCPM should send SinkVbus and EnableVbusDetect commands to TUSB422 Command register.
Transition from power consumer to power provider:
- Disable AUTO_DISCHARGE_DISCONNECT in the Power Control register
- Disable VBUS presence detection. TCPM should send DisableVbusDetect command to TUSB422 Command register.
- Disable system sink VBUS. TCPM should also send DisableSinkVbus command to TUSB422 Command register.
- TCPM state machine needs to transition from Attached.SNK to Attached.SRC.
- Upon reception of PS_RDY message from port partner, change Role Control register to present a Rp.
- Enable system source VBUS. TCPM should send SourceVbusDefaultVoltage command to TUSB422 Command register.
- Once VBUS is at vSafe5V, the TCPM should update message header information and then send PS_RDY to its port partner.
- Upon successful completion of power-role swap, enable AUTO_DISCHARGE_DISCONNECT in the Power Control register
NOTE
During Power-role swap, the TUSB422 will disable its VCONN. Software workaround is to re-enable VCONN and issue error recovery for VCONN powered accessories. This may result in momentary loss of video/data.