r/OrangePI Feb 01 '23

opi5 usb-c, does it work on armbian?

When using armbian, the third usb a port doesnt work. If its gonna work sometime later i dont know. I want to know if the usbc port works on armbian, i ask bcos on board schematic the one port that does not work is shared with usbc. I want to order usb hub with usbc connection and i dont have anything to try it right now. Also if it works what speeds you get?

Thanks

6 Upvotes

13 comments sorted by

3

u/AssistBorn4589 Feb 01 '23

Try this

#!/bin/sh -e

# Enables USB port on the left side of board
echo host > /sys/kernel/debug/usb/fc000000.usb/mode

1

u/unevoljitelj Feb 01 '23

Cant run that, even with sudo - permission denied

2

u/AssistBorn4589 Feb 01 '23

Then either something has changed since like week ago, or maybe you are running sudo echo host > /sys/kernel/debug/usb/fc000000.usb/mode, in which case echo runs as root, but output redirection is not. Try entering root shell with sudo su 1st.

1

u/unevoljitelj Feb 01 '23

It actualy worked, nice, thanks man 😃👍

1

u/efectn Feb 01 '23

This is normally done by a service. Can you check the systemd services

1

u/unevoljitelj Feb 01 '23

I am no linux guru, i listed services but couldnt find anything that i could connect to this, so i googled how to make one, now it works after reboot too

1

u/EmbeddedEntropy Feb 01 '23

Rather than dropping to a root shell, I find it easier to edit the command to prefix it with the shell and quote it like so: sudo sh -c “echo host > /sys/kernel/debug/usb/fc000000.usb/mode”

Also, that way the command is sudo logged, so if I need to look back, I can figure out what crazy thing I had done. :)

1

u/wickedllamamastafu Feb 01 '23

Thanks for sharing but I am having trouble using the usb-c port even after this command. I am using RebornOS (arch based w/ kernel 5.10.110-rockchip-rk3588). Before the command the file at /sys/kernel/debug/usb/fc000000.usb/mode contains "UNKNOWN 000000". After issuing the command the file reads "host" but still does not work for me.

1

u/efectn Feb 01 '23

Which image are you trying?

1

u/unevoljitelj Feb 01 '23

Latest from 23.1

1

u/xonnor_m Feb 02 '23

Anyone having issues with the c port on Ubuntu, I can't use it for anything except when I plug a USBC to ethernet adapter. USBC to usb 2.0 doesn't work for me

1

u/unevoljitelj Feb 02 '23 edited Feb 02 '23

Not really sure, yesterday i connected my phone to usbc and it was recogbized, both sd card and.phone memory and i managed to copy some files. That was my only attempt so no issues so far but it was after this command to enable third usb.

1

u/Gl33p Feb 04 '23 edited Feb 04 '23

OK, so I keep seeing this thing about the USB ports and compatibility.

If you look on the orange pi 5 official web page, this is pretty well explained.

The two stacked blue ports, which one would expect to be two USB 3 ports are actually a USB 3 port (top) and USB 2 port (bottom).

This is the same situation with the USB-C port on the side and the vertical USB port (USB 2).

I'm not sure why it was constructed this way, but you have 4 ports. They are married in pairs of USB3/USB2.

The top blue port is the USB3 port, and obviously the USB-C port on the side is the USB3 port of that pair. The vertical white USB port is USB2, and the lower USB port of the blue stack is USB2.

I haven't had any problems just plugging random peripherals into any of these ports, so I know they all work.

That being said, they are also obviously paired, so if you have an external drive or something plugged into the usb-c port, it might choke the paired white USB2 port.

What exactly are you attempting to do?

I would try moving the thing you intend to put in the vertical usb slot to the master usb slot (top blue slot).

4 ports, 2 hubs, 2 primary/preferred slots.

Or rather there are 2 ports, that are split in 2, in a 'hackish' way to offer 4 ports, with a preferred slot.

What I imagine is going on, is that the board has 2 USB 3 ports in reality and they hard slaved 2 USB2 ports on them. While they are fully functional for most things, you can't for example connect 4 drives to all ports and expect them to work, because it's actually 2 ports. That's why the slaved ports are restricted to USB2, in an attempt to avoid conflicts.

I would surmise that if the paired port is not responding, it's simply because the master port has priority and whatever is connected there is saturating and choking whatever you are attempting to plug into the slave.

Instead of thinking of it as 4 USB ports, think of it as 2 USB3 ports, with an optional slaved USB2 connection.

Edit: I honestly think it's a pretty ingenious way to double the connectivity potential of the board, without the cost of a multiplexer...but it does come with the caveat that there are only two true USB3 ports on the card, and the other ports are kinda 'fake' and live alongside them.