How to use USB0 as OTG in Device and Host Mode without changing device tree after flashing?

Hi,

However, when I unplug the cable, it doesn’t go back to Host mode, just stays disabled. “l4tbr0: port 2(usb0) entered disabled state”

You need to plug another usb device so that it will go into host mode…

There are actually device, none and host modes there. 3 states but not only 2.