Orange Pi R1 USB devices not showing up

Hi!

I am switching from Armbian to OpenWRT on my OrangePI. However, under OpenWRT, I can't see any USB devices I plug in myself (however, the built in "usb" ethernet adapter does show up) using lsusb, and neither are they recognized in dmesg etc. I have tried to google what to install/change, but can't find anything. Is this a devicetree problem? How do you load devicetree overlays in OpenWRT (if it supports this)?

Thanks in advance for any ideas,
Egil

quick check on mine:

root@OrangePi:~# opkg list-installed | grep usb
kmod-mt76-usb - 4.14.131+2019-03-23-a5f5605f-1
kmod-mt76x02-usb - 4.14.131+2019-03-23-a5f5605f-1
kmod-rt2800-usb - 4.14.131+2017-11-01-10
kmod-rt2x00-usb - 4.14.131+2017-11-01-10
kmod-usb-core - 4.14.131-1
libusb-1.0 - 1.0.22-1
rt2800-usb-firmware - 2017-09-06-a61ac5cf-1
usbutils - 007-9

So nothing special, just device drivers. Is the port OK?

I installed the same packages, and still nothing.
This is what surprises me - it works under armbian (just switching the sd card). Same problem on another device too (I have multiple, so just switched the card around).

root@OpenWrt:~# lsusb
Bus 003 Device 002: ID 0bda:8152 Realtek Semiconductor Corp. RTL8152 Fast Ethernet Adapter
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

This is on an OPi R1, with a usb flash drive and an HL-340 serial dongle connected. Both show up fine under armbian.

Linux OpenWrt 4.14.131 #0 SMP PREEMPT Thu Jun 27 12:18:52 2019 armv7l GNU/Linux

Digging a bit deeper, it seems like I have two different problems:

The HL-340 is never visible, regardless of port. The USB ports on the interface board that plugs into the circuit board header, does not work, regardless of device connected to them. However, the flash drive is visible if plugged into the physical usb port on an OPi Zero. All usb devices works on all ports under armbian.

ok, we have different hardware - mine is OrangePi PC

RTL8189ETV is not supported on OpenWrt (no drivers available).

RTL8189ETV != HL-340. It's the usb "serial port" (in reality it's a RS422 dongle, not RS232) I can't get to work...

As this is my first post on the forum: Hello everyone!

I have the same problem as described. The only thing which is detected on the USB port is the internally connected USB/Ethernet chip. Whenever I connect a USB device, it is not detected in any way (no dmesg message, no change in the lsusb output). It looks like there are missing kernel modules. I set up the environment to compile OpenWrt for the device but I can't find the necessary modules. Is there anyone who is more experienced with the Allwinner H2+ and is able to help to get this running?

Hello again, I tried the official OrangePi Debian image and the USB ports are working like a charm. Further the lsusb output is very different:

OrangePi Debian Image:
root@OrangePizero:~# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:8152 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

OpenWRT 19.07:
root@OpenWrt:/etc/hotplug.d# lsusb
Bus 003 Device 002: ID 0bda:8152 Realtek Semiconductor Corp. RTL8152 Fast Ethernet Adapter
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

It looks like the drivers for the additional USB-buses are simply not loaded. Is there anyone who has an idea what might be missing or what might be the problem with the configuration?

Took me some time but I found the problem. The additional USB ports are simply not activated in the device tree. Unfortunately I'm not an expert when it comes to submitting kernel patches. Is there anyone who could submit the following as a patch for the Orange Pi R1:

The following lines should be added to sun8i-h2-plus-orangepi-r1.dts:

&ohci2 {
	status = "okay";
};

&ohci3 {
	status = "okay";
};

&ehci2 {
	status = "okay";
};

&ehci3 {
	status = "okay";
};

I actually fixed it for me by applying the following dirty hack to an existing patch in the 19.07 sources:

./target/linux/sunxi/patches-4.14/201-ARM-dts-sun8i-fix-USB-Ethernet-of-Orange-Pi-R1.patch

@@ -71,3 +85,7 @@
 		reg = <1>;
 	};
 };
+
+&usbphy {
+	usb1_vbus-supply = <&reg_vcc_usb_eth>;
+};

changed to

@@ -71,3 +85,23 @@
 		reg = <1>;
 	};
 };
+
+&usbphy {
+	usb1_vbus-supply = <&reg_vcc_usb_eth>;
+};
+
+&ohci2 {
+	status = "okay";
+};
+
+&ohci3 {
+	status = "okay";
+};
+
+&ehci2 {
+	status = "okay";
+};
+
+&ehci3 {
+	status = "okay";
+};
1 Like