a universal serial bus dock is provided . the usb dock includes : a plurality of downstream ports ; and a upstream port , connecting the usb dock to a portable device , wherein the upstream port includes an on - the - go id pin and a differential pair ; and a microcontroller , configured to detect operating states of the portable device , wherein when it is detected that the portable device is in a usb otg host mode and has entered a suspend state , the microcontroller controls the portable device to switch from the usb otg host mode to a usb device mode by toggling a state of the usb otg id pin , thereby charging the portable device via the upstream port .