Jump to content

NanoPi Duo2 usbhost not working


Vancouver

Recommended Posts

Hi,

I have a problem with usbhost on a NanoPi Duo2 with Armbian Bionic:

Linux nanopiduo2 4.19.36-sunxi #5.82 SMP Mon Apr 22 19:12:08 CEST 2019 armv7l armv7l armv7l GNU/Linux

 

Everything works fine so far except for USB hosts. None of the connected USB devices is detected.
I am quite sure that the voltage supply is stable. I tried to power the board in two ways:

  • From an USB powerbank (2A) with a short USB cable
  • From a laboratory power supply (1.5A) directly connected to the 5V and GND power pins

In both cases, the board works ablsolutely stable, no reboots, no SD card issues, even with some
I2C devices and a GPS receiver connected to UART and Wifi networking.

 

However, no USB host. I am using a USB connector breakout board with very short connections to the NanoPi
(everything mounted on a breadboard). VUSB and GND are connected to 5V/GND with ~2 cm wires. I have tried
USB2 and USB3, and I have tried to swap D+ and D- on both ports.

 

USBHOST0, 2, and 3 are enabled in armbian-config and the overlays are loaded at boot:

 

...
374 bytes read in 9 ms (40 KiB/s)
Applying kernel provided DT overlay sun8i-h3-i2c0.dtbo
502 bytes read in 9 ms (53.7 KiB/s)
Applying kernel provided DT overlay sun8i-h3-uart1.dtbo
504 bytes read in 9 ms (54.7 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost0.dtbo
504 bytes read in 8 ms (61.5 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost2.dtbo
504 bytes read in 8 ms (61.5 KiB/s)
Applying kernel provided DT overlay sun8i-h3-usbhost3.dtbo
4155 bytes read in 9 ms (450.2 KiB/s)
Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
...
 
lsusb reports always the following, no matter if there is any USB device connected:
 
:~$ lsusb
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


and

 

:~$ dmesg |grep usb
[    0.000000] Kernel command line: root=UUID=82ac9789-2ef5-473c-81a2-1c4d59545882 rootwait rootfstype=ext4
                console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 loglevel=1
                ubootpart=5065b6de-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   
                sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1
[    1.360294] usbcore: registered new interface driver usbfs
[    1.360374] usbcore: registered new interface driver hub
[    1.360504] usbcore: registered new device driver usb
[    2.567569] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    2.788367] ehci-platform 1c1a000.usb: EHCI Host Controller
[    2.788422] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    2.789881] ehci-platform 1c1a000.usb: irq 27, io mem 0x01c1a000
[    2.804274] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    2.804769] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    2.804784] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.804796] usb usb1: Product: EHCI Host Controller
[    2.804807] usb usb1: Manufacturer: Linux 4.19.36-sunxi ehci_hcd
[    2.804818] usb usb1: SerialNumber: 1c1a000.usb
[    2.807807] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    2.807874] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    2.808350] ohci-platform 1c1a400.usb: irq 28, io mem 0x01c1a400
[    2.872742] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.19
[    2.872758] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.872770] usb usb2: Product: Generic Platform OHCI controller
[    2.872781] usb usb2: Manufacturer: Linux 4.19.36-sunxi ohci_hcd
[    2.872792] usb usb2: SerialNumber: 1c1a400.usb
[    2.876097] usbcore: registered new interface driver usb-storage
[    2.884958] usbcore: registered new interface driver usbhid
[    2.884964] usbhid: USB HID core driver
[    2.969162] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    2.976654] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    2.982968] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    2.991897] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    4.236043] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    4.480475] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    8.757860] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    8.798639] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    9.048938] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    9.078126] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    9.155500] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    9.176147] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    9.211080] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    9.269968] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    9.299488] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[   14.705827] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe


I can not interpret the 'Couldn't get regulator' message... perhaps this is the problem? Possibly something wrong

with the device tree?


There is no further output in demsg when dis/connecting a USB device. I have tried several USB
sticks: memory, RTL-SDR, Bluetooth, IR, but no success.

 

Interestingly, the lsusb and dmesg outputs are exactly the same as shown above if USBHOST2 and 3 are disabled
in armbian-config.

 

I am running out of ideas, so any suggestions are welcome,

Thanks.

 

Link to comment
Share on other sites

1 hour ago, Vancouver said:

Sorry, what do you mean by 'switching to beta'? The nightly builds, or another kernel? I just installed 4.20.7-sunxi, but there is no difference.


Sorry, nightly, next or dev branch. I tested and adopted Duo2 last week. I did notice that USB ports were not working and fix the problem. You still need to add overlays.

Link to comment
Share on other sites

Ok, just switched to 5.83.190426:

 

:~$ lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 004 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 003 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 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

So everything seems fine now.

 

Thank you very much for your support!

 

Link to comment
Share on other sites

Hi!

 

I think I have the same problem on my Orange Pi PC Plus, Armbian Focal with Linux 5.4.45-sunxi:

 

$ dmesg | grep usb

[    0.000000] Kernel command line: root=UUID=aa289567-fa42-4a48-9a40-b4762e508b88 rootwait rootfstype=ext4 console=ttyS0,115200 console=tty1 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 consoleblank=0 loglevel=1 ubootpart=94bde84a-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1
[    1.329411] usbcore: registered new interface driver usbfs
[    1.329451] usbcore: registered new interface driver hub
[    1.329511] usbcore: registered new device driver usb
[    2.349233] ehci-platform 1c1a000.usb: EHCI Host Controller
[    2.349260] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    2.349650] ehci-platform 1c1a000.usb: irq 28, io mem 0x01c1a000
[    2.363318] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    2.363626] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    2.363634] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.363640] usb usb1: Product: EHCI Host Controller
[    2.363645] usb usb1: Manufacturer: Linux 5.4.45-sunxi ehci_hcd
[    2.363651] usb usb1: SerialNumber: 1c1a000.usb
[    2.365319] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    2.365342] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    2.365502] ohci-platform 1c1a400.usb: irq 29, io mem 0x01c1a400
[    2.427563] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    2.427571] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.427577] usb usb2: Product: Generic Platform OHCI controller
[    2.427583] usb usb2: Manufacturer: Linux 5.4.45-sunxi ohci_hcd
[    2.427588] usb usb2: SerialNumber: 1c1a400.usb
[    2.429391] usbcore: registered new interface driver usb-storage
[    2.435830] usbcore: registered new interface driver usbhid
[    2.435834] usbhid: USB HID core driver
[    2.595349] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    2.600331] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    3.025550] sun4i-usb-phy 1c19400.phy: Couldn't get regulator usb0_vbus... Deferring probe
[    3.252590] ehci-platform 1c1b000.usb: EHCI Host Controller
[    3.252643] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3
[    3.255292] ehci-platform 1c1b000.usb: irq 30, io mem 0x01c1b000
[    3.271371] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[    3.271928] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    3.271947] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.271963] usb usb3: Product: EHCI Host Controller
[    3.271979] usb usb3: Manufacturer: Linux 5.4.45-sunxi ehci_hcd
[    3.271995] usb usb3: SerialNumber: 1c1b000.usb
[    3.275453] ehci-platform 1c1c000.usb: EHCI Host Controller
[    3.275512] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 4
[    3.277906] ehci-platform 1c1c000.usb: irq 32, io mem 0x01c1c000
[    3.291368] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    3.291668] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    3.291677] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.291683] usb usb4: Product: EHCI Host Controller
[    3.291689] usb usb4: Manufacturer: Linux 5.4.45-sunxi ehci_hcd
[    3.291695] usb usb4: SerialNumber: 1c1c000.usb
[    3.293290] ehci-platform 1c1d000.usb: EHCI Host Controller
[    3.293318] ehci-platform 1c1d000.usb: new USB bus registered, assigned bus number 5
[    3.293546] ehci-platform 1c1d000.usb: irq 34, io mem 0x01c1d000
[    3.307380] ehci-platform 1c1d000.usb: USB 2.0 started, EHCI 1.00
[    3.307706] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    3.307713] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.307720] usb usb5: Product: EHCI Host Controller
[    3.307725] usb usb5: Manufacturer: Linux 5.4.45-sunxi ehci_hcd
[    3.307731] usb usb5: SerialNumber: 1c1d000.usb
[    3.309373] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[    3.309399] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 6
[    3.309672] ohci-platform 1c1b400.usb: irq 31, io mem 0x01c1b400
[    3.371727] usb usb6: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    3.371739] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.371746] usb usb6: Product: Generic Platform OHCI controller
[    3.371752] usb usb6: Manufacturer: Linux 5.4.45-sunxi ohci_hcd
[    3.371758] usb usb6: SerialNumber: 1c1b400.usb
[    3.373698] ohci-platform 1c1c400.usb: Generic Platform OHCI controller
[    3.373734] ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 7
[    3.378056] ohci-platform 1c1c400.usb: irq 33, io mem 0x01c1c400
[    3.439521] usb usb7: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    3.439532] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.439539] usb usb7: Product: Generic Platform OHCI controller
[    3.439544] usb usb7: Manufacturer: Linux 5.4.45-sunxi ohci_hcd
[    3.439551] usb usb7: SerialNumber: 1c1c400.usb
[    3.441195] ohci-platform 1c1d400.usb: Generic Platform OHCI controller
[    3.441226] ohci-platform 1c1d400.usb: new USB bus registered, assigned bus number 8
[    3.441551] ohci-platform 1c1d400.usb: irq 35, io mem 0x01c1d400
[    3.503514] usb usb8: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    3.503525] usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.503531] usb usb8: Product: Generic Platform OHCI controller
[    3.503537] usb usb8: Manufacturer: Linux 5.4.45-sunxi ohci_hcd
[    3.503543] usb usb8: SerialNumber: 1c1d400.usb
[    3.505185] usb_phy_generic usb_phy_generic.1.auto: usb_phy_generic.1.auto supply vcc not found, using dummy regulator
[    3.505801] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[    3.505828] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 9
[    3.506079] usb usb9: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    3.506088] usb usb9: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.506094] usb usb9: Product: MUSB HDRC host driver
[    3.506100] usb usb9: Manufacturer: Linux 5.4.45-sunxi musb-hcd
[    3.506106] usb usb9: SerialNumber: musb-hdrc.2.auto
[   33.806220] usb0-vbus: disabling

 

 

$ lsusb

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

 

 

So, the solution is... :wacko:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines