Orange Pi Zero, dev kernel does not see expansion USB ports
1 1

17 posts in this topic

Recommended Posts

Orange Pi Zero with the small expansion board (2x USB, audio out, mic, IR). Legacy 3.4.113-sun8i  kernel sees all USB hubs, and the USB ports on the expansion board work fine:

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 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

With the nightly build, the number of root hubs is less, and also the expansion board USB ports give only power, but no USB signaling:

root@orangepizero:~# lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 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 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I guess it's the same story as with wifi driver...

Share this post


Link to post
Share on other sites
10 hours ago, Stanislav Sinyagin said:

I guess it's the same story as with wifi driver...

Care to elaborate on this 'story' a bit?

 

Regarding USB ports it's a decision made by upstream kernel maintainers to not enable anything that's not directly present on the board. We used a patch months ago that enabled the USB ports on all those small H2+/H3 boards but in the meantime Zador rearranged everything as DT overlays. So this is where you should look for (remember: Nightly images are for developers who know what they do and who want to help improve things)

Share this post


Link to post
Share on other sites
6 hours ago, tkaiser said:

Care to elaborate on this 'story' a bit?

I was referring to the fact that the vendor delivered a poorly documented piece of hardware with a binary module for Linux kernel. I thought it's the same issue here.

6 hours ago, tkaiser said:

Regarding USB ports it's a decision made by upstream kernel maintainers to not enable anything that's not directly present on the board. We used a patch months ago that enabled the USB ports on all those small H2+/H3 boards but in the meantime Zador rearranged everything as DT overlays. So this is where you should look for (remember: Nightly images are for developers who know what they do and who want to help improve things)

 

actually these expansion USB ports are kind of "on the board", if you look at this set. So far, it's the only enclosure available for OPI0, so people will assume that those expansion USB ports are in by default.

 

I am actually a software developer, and also contributed to a Linux driver with a patch back in 1997. Currently I'm evaluating OPI0 if it can fit into my projects as a low-cost network agent. For example, connect to OpenVPN and provide remote console access via USB-to-Serial. I already discovered that WiFi hardware is quite poor, and the connection is too shaky for an interactive session. But if I disable Wifi interface, it's quite a useful piece of hardware for its price. But of course, it would be nice to have all USB ports active :-)

 

Share this post


Link to post
Share on other sites
1 hour ago, Stanislav Sinyagin said:

actually these expansion USB ports are kind of "on the board"

It was discussed before, from kernel maintainers perspective this is a separate extension board, so it needs to be handled with a DT overlay.

 

And from our perspective mainline kernel for H3 boards is not ready for end users yet, and DT overlays related info is not final yet - so we may have a single overlay for the expansion board or separate overlays for audio and each USB host port (or both variants together), overlay names and activation mechanism may change too more than one time before any official images with mainline kernel are released (so kernel and/or u-boot upgrade may break due to these changes).

 

So until then there will be little or no help with dev kernel for H3 devices - we already have too much outdated info on the forums that can be easily found via search engines.

Share this post


Link to post
Share on other sites

Zador, tkaiser, thanks a lot, it helped adding

overlays=sun8i-h3-usbhost2 sun8i-h3-usbhost3

into /boot/armbianEnv.txt and rebooting. DISCLAIMER: the overlay names may change as the development goes on.

 

Of course I realize it's a development kernel, and I'm not going to use it for any production installations. But as I'm evaluating the platform in general, I prefer using the latest development software. Do you feel comfortable if I report any issues in the same format on this forum? It's in my habit to report bugs or thought-to-be-bugs :)

 

Igor and lanefu like this

Share this post


Link to post
Share on other sites

and there's another bug: after "poweroff" command, the power consumption grows from normal 1.5 to 3.5W slowly within few minutes. The device stops responding on network requests, but it heats up quite significantly. Looks like I need to solder a console adapter :)

Share this post


Link to post
Share on other sites
On 6.3.2017 at 8:23 AM, Stanislav Sinyagin said:

is there a way to have an overlay that disables the WiFi chip completely, to save power?

Not that I know of but you could try sunxi-pio utility to disable power. Why would you want to solder something for a serial console? Isn't the debug pin header populated?

Share this post


Link to post
Share on other sites
1 minute ago, tkaiser said:

Why would you want to solder something for a serial console? Isn't the debug pin header populated?

I have an old Nokia USB cable that ends with 3 wires for the UART interface. I thought to solder a plug on them, but then I found a nice console cable for less than $2 on Aliexpress :)

 

I'll try playing with the power, thanks

Share this post


Link to post
Share on other sites
On 3/27/2017 at 0:42 AM, Stanislav Sinyagin said:

As now /boot/armbianEnv.txt contains the line "overlay_prefix=sun8i-h3", the string above does not work, and it needs to look like follows:


overlays=usbhost2 usbhost3

 

 

Did this change work for you ? Are you using the expansion board?

 

Just tried on fresh image ARMBIAN 5.32 user-built Ubuntu 16.04.3 LTS 4.11.12-sun8i but the board freezes when i insert a usb device and restart when i remove

Share this post


Link to post
Share on other sites

Be aware that OPi Zero NAS expansion board has 2 USB connectors, but only the one at the center is a real USB host.

The other USB connectors at left near the barrel power DC is a USB Input to allow connecting the USB Hub to Non-Zero boards with a Male-Male cable.

Plugging anything in this USB Input on a OPiZero is somehow shorting the whole hub which is already connected thru the pins header.

 

markbirss likes this

Share this post


Link to post
Share on other sites
20 minutes ago, martinayotte said:

Plugging anything in this USB Input on a OPiZero is somehow shorting the whole hub which is already connected thru the pins header.

 

Huh? Which hub?

 

There's some logic on the Expansion board and in the JMS578:

  • if there's no SATA device connected to JMS578 it's configured to not show up on the bus (consumption also lower, most probably since the SATA PHY is unpowered in this mode?)
  • if a (m)SATA device is connected JMS578 activates itself and shows up on the USB bus. The mSATA slot is usb2, SATA slot is usb3
  • but if an USB peripheral is connected to one of the 2 USB receptacles the respective JMS578 disappears from the bus and the externally connected USB device 'wins'. Left receptacles wins over mSATA, right one over SATA

Only mSATA slot populated with SSD, Ethernet dongle on right USB port:

root@orangepizeroplus2:~# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. 
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp. 
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
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

Now external disk in JMS567 enclosure connected to left USB port. The onboard JMS578 with the SSD behind disappears since the external JMS567 takes over:

root@orangepizeroplus2:~# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. 
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 002: ID 152d:3562 JMicron Technology Corp. / JMicron USA Technology Corp. 
Bus 007 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 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
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

Based on my understanding connecting such a Male-Male cable will only result in a direct connection between the other host and either usb2 or usb3 on the Zero. The respective JMS578 will disappear as soon as anything is connected to 'its' USB receptacle. Here's dmesg output at the end: http://sprunge.us/IIPS 

Share this post


Link to post
Share on other sites
2 minutes ago, tkaiser said:

Huh? Which hub?

Right ! Sorry for the wording, I mean the SATA JMS578 ...

 

3 minutes ago, tkaiser said:

Male-Male cable will only result in a direct connection

If something is plugged in this receptacle, it would not run correctly since both devices are connected on the same bus. The Male-Male is only when we wish to use expansion board on any other Non-Zero board.

Share this post


Link to post
Share on other sites
6 minutes ago, martinayotte said:

The Male-Male is only when we wish to use expansion board on any other Non-Zero board.

 

Ah, I start to understand. So in this mode then the NAS Expansion board creates a direct connection between the USB receptacle and the JMS578 (left <--> mSATA, right <--> SATA)?

Share this post


Link to post
Share on other sites
2 hours ago, martinayotte said:

Be aware that OPi Zero NAS expansion board has 2 USB connectors, but only the one at the center is a real USB host.

The other USB connectors at left near the barrel power DC is a USB Input to allow connecting the USB Hub to Non-Zero boards with a Male-Male cable.

Plugging anything in this USB Input on a OPiZero is somehow shorting the whole hub which is already connected thru the pins header.

 

Thank you for the very useful info. My issue seems to be power related (current/voltage drop)  I installed a large heat-sink on my board and had to use DuPont (less than 6cm) wires to use the usb/mic/sound expansion board (not the NAS board) , mounting it without the DuPont wires solved the problem (it however has no issue with the legacy kernel)

 

 

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

1 1

  • Support the project

    We need your help to stay focused on the project.

    Choose the amount and currency you would like to donate in below.