You have to write your own extcon in device tree (if you need to use OTG).
example
vbus_id_extcon: extcon@1 {
compatible = "extcon-gpio-states";
extcon-gpio,name = "VBUS_ID";
extcon-gpio,wait-for-gpio-scan = <0>;
extcon-gpio,cable-states = <0x3 0x0
0x0 0x2
0x1 0x2
0x2 0x1>;
gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(M, 3) 0
&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 0) 0>;
//GPIO_M3 is VBUS_DETECT pin and GPIO_Q0 is ID pin.
extcon-gpio,out-cable-names = <EXTCON_USB EXTCON_USB_HOST EXTCON_NONE>;
#extcon-cells = <1>;
};
For extcon node, please refer to “kernel/kernel-4.9/Documentation/devicetree/bindings/extcon/extcon-gpio-states.txt”
Since we don’t know your design, we cannot tell what should be the correct value in your extcon node.
After creating this node, please set below property node under xhci/xudc
under xhci
extcon-cables = <&vbus_id_extcon 1>;
extcon-cable-names = "id";
#extcon-cells = <1>;
under xudc
extcon-cables = <&vbus_id_extcon 0>;
extcon-cable-names = "vbus";
#extcon-cells = <1>;
Some notes for the property:
extcon-cables: OTG support. Must contains an extcon-cable entry which detects USB ID pin. When the extcon cable state is 0, OTG port will transition to host mode.
extcon-cable-names: Must be “id” for xhci and “vbus” for xudc.
#extcon-cells: Number of cells in extcon specifier. Always should be 1.
If you don’t need OTG, please just remove the extcon related properties under xhci/xudc