we want to use USB OTG functionality on jetson-tk1 board. we are using L4T 21.4 release.
we can test both host and gadget mode but mode switch(host to gadget or gadget to host) does not happen automatically based on type of cable connected. we need to enable/disable host/gadget mode by software means.
why OTG functionality does not work based on type of cable connected ?
we have noticed that to use gadget mode on OTG port, following commands manually needs to be fired
echo 0 > /sys/devices/platform/tegra-otg/enable_host
echo 1 > /sys/devices/platform/tegra-otg/enable_device
echo connect > /sys/devices/platform/tegra-udc.0/udc/tegra-udc.0/soft_connect
and to use host mode, following commands need to be fired
echo 1 > /sys/devices/platform/tegra-otg/enable_host
echo 0 > /sys/devices/platform/tegra-otg/enable_device
thanks in advance