[Odroid-C1] How to power off USB Ports?

Moderators: odroid, mdrjr

[Odroid-C1] How to power off USB Ports?

Unread postby ano24 » Fri Sep 23, 2016 6:05 am

Hi, I am on Ubuntu 16.04 and I would like to turn of the USB ports via the sysfs. Goal: USB port should not have any power.

I found this on stackoverflow http://stackoverflow.com/questions/4702 ... with-linux and that is exactly what i want to do. BUT the Kernel (3.10.103-164) does not expose such things to the sysfs?

What possibel solutions are there? Would it be possible to add this things to the kernel?
ano24
 
Posts: 2
Joined: Tue Jul 21, 2015 9:37 pm
languages_spoken: english
ODROIDs: Odroid C1

Re: [Odroid-C1] How to power off USB Ports?

Unread postby odroid » Fri Sep 23, 2016 10:45 am

You can try to turn off/on the USB hub controller with below commands on C1 via controlling the reset pin of the USB hub IC on the C1 board.
It will disable the 5V output too. Note that it will disable all 4 host ports. There is no way to control the port individually.

Code: Select all
echo 4 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio4/direction
sleep 1
echo 0 > /sys/class/gpio/gpio4/value
sleep 1
echo 1 > /sys/class/gpio/gpio4/value
echo 4 > /sys/class/gpio/unexport
User avatar
odroid
Site Admin
 
Posts: 21862
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: [Odroid-C1] How to power off USB Ports?

Unread postby ano24 » Fri Sep 23, 2016 5:56 pm

Thank you for your quick answer. That works perfectly fine for my application. My last quastion would be: Where did you find this information. Is there any kind of documentation for this kind of information?
ano24
 
Posts: 2
Joined: Tue Jul 21, 2015 9:37 pm
languages_spoken: english
ODROIDs: Odroid C1

Re: [Odroid-C1] How to power off USB Ports?

Unread postby odroid » Fri Sep 23, 2016 6:07 pm

You can download the full schematics in this link.
http://www.hardkernel.com/main/products ... &tab_idx=2

Trace the reset signal on the USB hub IC to find a proper GPIO port.
User avatar
odroid
Site Admin
 
Posts: 21862
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Ubuntu

Who is online

Users browsing this forum: hosune7845 and 3 guests