Xavier how to chang the USB mode of Host and device

Help!I want to know Xavier how to set the USB mode as device(inclouding USB2.0 and USB3.0)。
Or how to change the USB mode between Host and Device。Thanks very much!

Hi,
On Xavier developer kit, the OTG port is J512. Host and device modes are decided by ID pin. Here is explanation about host/device mode switch: