TS-7970 USB Host
The i.MX6 provides 1 USB Host with supporting USB 2.0 (480Mbit/s). The TS-7970 includes a USB Hub expanding this to 4 USB host ports.
Typically USB is interfaced with by using standard Linux drivers, but low level USB communication is possible using libusb.
The TS-7970 USB 5V rail can be toggled on/off through a GPIO. This can be used to save power, or to reset USB devices that get stuck in a bad state.
# Power disabled
echo 1 > /sys/class/leds/en-usb-5v/brightness
sleep 2 # let any devices reset
# Enable power
echo 0 > /sys/class/leds/en-usb-5v/brightness
Note: | The USB OTG which can act as a host does not always use the same controllable 5V supply. Refer to the schematic's EN_USB_5V/USB_5V for more information on this control. |
The TS-7970 also has a USB port on the HD1 header (11 data-, 13 data+). This is used for some off the shelf daughter cards like the DC767-MT which supports Multitech cellular modems. To use this USB port you must toggle a GPIO which switches a USB mux onboard. This switches one of the USB hosts from the top port next to the Ethernet connector to HD1.
# Set USB4 to HD1
echo 1 > /sys/class/leds/sel_dc_usb/brightness
# Set USB4 to J1 (default)
echo 0 > /sys/class/leds/sel_dc_usb/brightness