It mainly depends on whether the physical interface is type-c or OTG's AB interface. If it is Type-c, then you need to refer to the development board and add a ptn5110. If it is the AB interface of OTG, then the ID pin needs to be connected to a GPIO, software Here you need to use a GPIO-based exton driver.
&usb_dwc3_0 {
dr_mode = "otg";
hnp-disable;
srp-disable;
adp-disable;
extcon = <&extcon_usb0>;
status = "okay";
};
extcon_usb0: extcon-usb0 {
compatible = "linux,extcon-usb-gpio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb0_extcon>;
id-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
};
arch\arm64\boot\dts\freescale\imx8mp-msc-sm2s.dtsi Example of third-party boards, it requires the OTG ID pin to generate an interrupt. USB_DNUx cannot be used as GPIO and cannot generate interrupts, so the OTG Driver cannot run.
Regards
Harvey