odroid-c4:application_note:software:hub_reset

USB Hub IC power control command

There are three commands which can control the power of the USB hub chip VL817.
All four USB ports will be affected by these commands.
If you need to do power-cycle to the USB devices on the USB host ports, run below commands.
It needs root permission.

1. RESET

It will reset all the USB devices connected to the USB host ports.

target
echo reset > /sys/devices/platform/gpio-reset/reset-usb_hub/control

If you want to check or adjust the reset cycle, use the file /sys/devices/platform/gpio-reset/reset-usb_hub/duration_ms.

2. POWER OFF

It will power off all the USB devices connected to the USB host ports.

target
echo assert > /sys/devices/platform/gpio-reset/reset-usb_hub/control

3. POWER ON

When did power off using the above command, now this command can power on all the USB devices connected to the USB host ports.

target
echo deassert > /sys/devices/platform/gpio-reset/reset-usb_hub/control

4. The others

This util can control the power of the USB on the C4.
Since the load S/W for USB Power is placed one for two USB ports, two ports will be affected simultaneously by the one port option.
–ports, -p option with 1(one) is for the left two USB ports, and with 3(three) is for the right two USB ports.
–location, -l option will be confirmed at /sys/bus/usb/devices/ folder and the location option with 2-1 also will work.

If there are some host devices present, it could be acting like a reset behavior.
By following experiences with some USB host devices, in the case of UMS would be.
Please check it before trying this command your UMS is NOT mounted. Otherwise, the filesystem in your UMS could be possible to corrupt.
target
# apt install uhubctl udisks2
 
# uhubctl -l 1-1 -p 3 -a 0   # Turn Off the right two USB ports
# uhubctl -l 1-1 -p 3 -a 1   # Turn On the right two USB ports
 
# uhubctl -l 1-1 -p 1 -a 0   # Turn Off the left two USB ports
# uhubctl -l 1-1 -p 1 -a 1   # Turn On the left two USB ports
2020/04/23 16:41 · luke.go
  • odroid-c4/application_note/software/hub_reset.txt
  • Last modified: 2022/08/16 17:39
  • by neal