Jump to content
Thinh Nguyen

Control USB 3.0 VBus by software.

Recommended Posts

I have a Tinker board 2S and I would like to control USB 3.0 VBUS to turn on/off devices that connected to USB port. Does this board support controlling USB Power?

I also look at schemtic, please look at the picture below (Attached)

image.png

Can USB3_EN be control by software?

 

Share this post


Link to post
Share on other sites

Hello,

I've come across this thread and realized that the original question hasn't been answered yet.
I am also interested in this topic, and I'm wondering if anyone could provide some insights or experiences related to this.

Thank you in advance for any help you can provide.

Share this post


Link to post
Share on other sites

hello @nishi and @Thinh Nguyen

you can control the vbus power through echo commands

1. check the kernel version with command: 

uname -a

keep in mind that if you're using a usb keyboard, the power will be off immediately after you execute the echo off command. if you wish to turn it back on without reboot, please: 1. use a type c keyboard, or 2. connect tinker board to a pc with a ttys dongle so the commands can be executed from the putty console

here are the commands to control the vbus power:

linux4.4 debian10:

TypeA port:

echo on > /sys/kernel/debug/fe900000.dwc3/vbus
echo off > /sys/kernel/debug/fe900000.dwc3/vbus

TypeC port:

echo on > /sys/kernel/debug/fe800000.dwc3/vbus
echo off > /sys/kernel/debug/fe800000.dwc3/vbus

 

linux4.19 debian10:

TypeA port:

echo on > /sys/kernel/debug/fe900000.dwc3/vbus
echo off > /sys/kernel/debug/fe900000.dwc3/vbus

TypeC port (for cc chip fusb302):

echo on > /sys/kernel/debug/fe800000.dwc3/vbus
echo off > /sys/kernel/debug/fe800000.dwc3/vbus

TypeC port (for cc chip rt1715):

echo sink >/sys/class/typec/port0/port_type
echo dual >/sys/class/typec/port0/port_type

 

linux5.10 debian11:

typeA port:

echo on > /sys/kernel/debug/usb/fe900000.usb/hub_vbus
echo off > /sys/kernel/debug/usb/fe900000.usb/hub_vbus

TypeC port (both fusb302 & rt1715 use the same commands):

echo sink >/sys/class/typec/port0/port_type
echo dual >/sys/class/typec/port0/port_type

 

android12:

typeA port:

echo on > /sys/kernel/debug/fe900000.dwc3/hub_vbus
echo off > /sys/kernel/debug/fe900000.dwc3/hub_vbus

typeC port (for cc chip fusb302):

echo on > /sys/kernel/debug/fe800000.dwc3/hub_vbus
echo off > /sys/kernel/debug/fe800000.dwc3/hub_vbus

TypeC port (for cc chip rt1715):

echo sink >/sys/class/typec/port0/port_type
echo dual >/sys/class/typec/port0/port_type

 

Share this post


Link to post
Share on other sites

Thank you for your response! I was able to confirm the behavior as expected.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...