[May 21] Slackware (20180508) ROCK64 | [May 18] NextCloudPi (2018_05_10) ROCK64 | [April 06] Volumio (2.390-2018-03-27) ROCK64 | [April 06] Q4OS (2.4-r3) PINE A64(+) Pinebook | [Jan 06] Arch Linux (20171225-1) PINE A64(+) Pinebook A64-LTS/SOPINE | [Jan 04] Linux (0.5.15-136) ROCK64 | [Jan 04] Android (20171204) ROCK64

Project Inspiration | Get Started | IRC Logs | Forum Rules/Policy


unable to switch usb3 ports on
#1
Hi all,

I have a problem with the usb3 ports. I run an arch linux installation on a rock64. I followed the instructions in this thread 
https://forum.pine64.org/showthread.php?tid=5001
and that helped me to get usb2 ports working. But I can't do the same thing for the usb3 ports (toggle the right gpio to switch the regulator for usb3 on). Mostly I don't know, which gpio port belongs to the usb3 regulator.

Maybe someone can give me a hint.

Thanks in advance and

Best regards,
Christoph
Reply
#2
(05-14-2018, 12:15 PM)cglhu Wrote: Hi all,

I have a problem with the usb3 ports. I run an arch linux installation on a rock64. I followed the instructions in this thread 
https://forum.pine64.org/showthread.php?tid=5001
and that helped me to get usb2 ports working. But I can't do the same thing for the usb3 ports (toggle the right gpio to switch the regulator for usb3 on). Mostly I don't know, which gpio port belongs to the usb3 regulator.

Maybe someone can give me a hint.

Thanks in advance and

Best regards,
Christoph

ROCK64 schematic page 15.

http://files.pine64.org/doc/rock64/ROCK6...171019.pdf
Reply
#3
(05-14-2018, 11:20 PM)tllim Wrote:
(05-14-2018, 12:15 PM)cglhu Wrote: Hi all,

I have a problem with the usb3 ports. I run an arch linux installation on a rock64. I followed the instructions in this thread 
https://forum.pine64.org/showthread.php?tid=5001
and that helped me to get usb2 ports working. But I can't do the same thing for the usb3 ports (toggle the right gpio to switch the regulator for usb3 on). Mostly I don't know, which gpio port belongs to the usb3 regulator.

Maybe someone can give me a hint.

Thanks in advance and

Best regards,
Christoph

ROCK64 schematic page 15.

http://files.pine64.org/doc/rock64/ROCK6...171019.pdf

Hi tllim,

Thanks for your hint, but I can't read that. I tried something similar to usb3 that Mark Harris did for usb2 (thanks a lot Mark!):
Code:
#!/bin/bash
# rock64_usb_power_service.sh
#
# Mark H. Harris
# v0.1b
#
#
PWRON=0
PWROFF=1
GP=2
GPOUT="out"
GPPATH="/sys/class/gpio"
GPVALUE="value"
GPMODE="direction"

## remove gpio if already exported
if [ -d $GPPATH/gpio$GP ]
then
  echo $GP > $GPPATH/unexport
  sleep 2
fi

# export the gpio, and set if ready
echo $GP > $GPPATH/export
sleep 2
if [ -e $GPPATH/gpio$GP/$GPMODE ]
then
  echo $GPOUT > $GPPATH/gpio$GP/$GPMODE
  sleep 2
  echo $PWRON > $GPPATH/gpio$GP/$GPVALUE
fi

But I don't know, which gpio port to toggle for usb3 power.

Best regards,
Christoph
Reply
#4
The power supply of three usb-ports (usb-2.0 x 2, usb-3.0 x 1)
is controlled by the same control signal, it is not designed to be individually controllable.
And its control signal is GPIO-2.

If you are controlling the power(V-BUS) of usb-2.0 with the script you presented here
The power(V-BUS) supply of usb-3.0 should also be controlled at the same time.

----
However, the above answers will not solve your problem.
Because you already have control over the power of usb-3.0 .

What image was used
What is the problem in doing so
I think that it is better to present your problem more concretely.
Reply
#5
(05-15-2018, 07:20 PM)t4_4t Wrote: The power supply of three usb-ports (usb-2.0 x 2, usb-3.0 x 1)
is controlled by the same control signal, it is not designed to be individually controllable.
And its control signal is GPIO-2.

If you are controlling the power(V-BUS) of usb-2.0 with the script you presented here
The power(V-BUS) supply of usb-3.0 should also be controlled at the same time.

----
However, the above answers will not solve your problem.
Because you already have control over the power of usb-3.0 .

What image was used
What is the problem in doing so
I think that it is better to present your problem more concretely.

Hi t4_4t,

thanks for your reply. I'm running a arch linux installation from https://archlinuxarm.org as a headless mail server. For backup reasons I would like to use the usb ports. With the script I mentioned, I managed to activate the usb2.0 ports, but the usb3.0 port has still no power. 
Are you quite sure, that both are handled via the same gpio? With the Android image both ports are functioning quite well, so there's no hardware fault.

Best regards,
Christoph
Reply
#6
(05-15-2018, 07:20 PM)t4_4t Wrote: The power supply of three usb-ports (usb-2.0 x 2, usb-3.0 x 1)
is controlled by the same control signal, it is not designed to be individually controllable.
And its control signal is GPIO-2.

No, not quite. It depends on what version of board you have. Whilst all three ports (USB OTG upper, USB lower and USB3) have individual 'power switch' ICs, the two USB2 ports have their enabled pins tied together. Version 1.0 had USB20_HOST_DRV (GPIO0_A2) and the USB3 port was on GPIO0_A0. But it seems that Version 2.0 still has the USB2 ports commoned and on USB20_HOST_DRV (GPIO0_A2), the USB3 port is on PWR_LED, meaning that by rights, the USB3 port for that version should be on as soon as the power is connected.

Since I have both versions of the board, I should be able to test that easily enough...

(05-16-2018, 11:26 AM)cglhu Wrote: thanks for your reply. I'm running a arch linux installation from https://archlinuxarm.org as a headless mail server. For backup reasons I would like to use the usb ports. With the script I mentioned, I managed to activate the usb2.0 ports, but the usb3.0 port has still no power. 

With that variable in mind, can you identify which board version you have? If you haven't seen it already, it's marked on the board just next to the pinecone logo near the RAM and CPU.
Reply
#7
(05-17-2018, 02:25 AM)pfeerick Wrote:
(05-15-2018, 07:20 PM)t4_4t Wrote: The power supply of three usb-ports (usb-2.0 x 2, usb-3.0 x 1)
is controlled by the same control signal, it is not designed to be individually controllable.
And its control signal is GPIO-2.

No, not quite. It depends on what version of board you have. Whilst all three ports (USB OTG upper, USB lower and USB3) have individual 'power switch' ICs, the two USB2 ports have their enabled pins tied together. Version 1.0 had USB20_HOST_DRV (GPIO0_A2) and the USB3 port was on GPIO0_A0. But it seems that Version 2.0 still has the USB2 ports commoned and on USB20_HOST_DRV (GPIO0_A2), the USB3 port is on PWR_LED, meaning that by rights, the USB3 port for that version should be on as soon as the power is connected.

Since I have both versions of the board, I should be able to test that easily enough...

(05-16-2018, 11:26 AM)cglhu Wrote: thanks for your reply. I'm running a arch linux installation from https://archlinuxarm.org as a headless mail server. For backup reasons I would like to use the usb ports. With the script I mentioned, I managed to activate the usb2.0 ports, but the usb3.0 port has still no power. 

With that variable in mind, can you identify which board version you have? If you haven't seen it already, it's marked on the board just next to the pinecone logo near the RAM and CPU.

Hi pfeerick,
I have a Rock64 V2.0 (2017 07/13). Does that help?
Best regards,
Christoph
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Best USB3.0 to SATA bridge mikedhoore 6 1,182 10-02-2017, 07:52 AM
Last Post: mikedhoore

Forum Jump:


Users browsing this thread: 1 Guest(s)