Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pine64.org - rock64 gentoo-sources-4.18.5 - usb3 not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
wwdev16
n00b
n00b


Joined: 29 Aug 2018
Posts: 52

PostPosted: Wed Aug 29, 2018 10:13 pm    Post subject: pine64.org - rock64 gentoo-sources-4.18.5 - usb3 not working Reply with quote

I have a rock64 V2.0 board running with a headless config using gentoo sources for the kernel.
The serial port, gige and usb2 are working. usb3 is not working. XHCI and DWC are enabled
in the config:

Code:
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_HOST=y
CONFIG_USB_DWC3_OF_SIMPLE=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC2_HOST=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PLATFORM=y


The xhci usb code doesn't report anything in dmesg, but ohci and ehci do.

Any suggestions on config options to look at?
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Thu Aug 30, 2018 2:01 am    Post subject: Reply with quote

Maybe you need this too:
Code:
CONFIG_USB_XHCI_PCI=y
Back to top
View user's profile Send private message
wwdev16
n00b
n00b


Joined: 29 Aug 2018
Posts: 52

PostPosted: Mon Sep 03, 2018 6:03 am    Post subject: Reply with quote

Unfortunately adding PCI/PCIe configs doesn't help.

Looking at the 4.4.138 kernel referenced by pine64.org for the board, I see that its device tree has usb30xxx and uxb20xxx defintions for rock64 usb phys. It also has these source files in drivers/phy/rockchip:
Code:
phy-rockchip-inno-usb2.c
phy-rockchip-inno-usb3.c

The mainline kernels for 4.18.5 and 4.19-rc1 do not define the usb3 phy in the device tree and only have
Code:
phy-rockchip-inno-usb2.c

in drivers/phy/rockchip. No additional files for rockchip in the staging drivers either.

It may be mainline just doesn't have usb3 support for rock64.
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Thu Oct 18, 2018 12:14 pm    Post subject: Reply with quote

The guy who's maintaining a sort-of mainline kernel with updates for this kind of device (from him and with input from the company devs) claims you just gotta patch the kernel to include changes like in these two commits he made:

https://github.com/ayufan-rock64/linux-mainline-kernel/commit/84802c45a7cff42215869de40a2632db5f4a3be6
https://github.com/ayufan-rock64/linux-mainline-kernel/commit/4109a410cdcfbd0c716cb765c582261f2197a73b

And that the phy-rockchip-inno-usb3.c file isn't needed for it if these changes are made.

I found these at:
https://github.com/rockchip-linux/kernel/issues/83

I'll have to test it out when I get my device later.
_________________
My political stance/bias
slycordinator != slycoordinator
Back to top
View user's profile Send private message
wwdev16
n00b
n00b


Joined: 29 Aug 2018
Posts: 52

PostPosted: Sat Oct 27, 2018 5:04 am    Post subject: Reply with quote

Thanks for the links slycordinator.

I have applied the diffs from the commits to gentoo-sources-4.19.0. Needed
to patch rk3328-rock64.dts instead of rk3328-evb.dts.

The xhci hub now shows up and a disk device is created when a usb3 device
is plugged in.

It is unstable though. Early in the boot messages there is this message:

Code:
dwc3 ff600000.dwc3: Failed to get clk 'ref': -2

The system locked up when I plugged in an unpowered usb3 disk. Connecting
an external disk case with it's own power doesn't lock up. But dmesg sometimes has lots
of these messages:

Code:
xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for unknown stream ring slot 1 ep 6
xhci-hcd xhci-hcd.0.auto: @00000000fd7a29b0 00000000 00000000 1b000000 01078001

A 50G USB2 -> USB partition copy succeds with no messages.

Unplugging the usb3 port produces these:

Code:
Cannot enable. Maybe the USB cable is bad?
usb usb5-port1: attempt power cycle

and then the usb3 port is no longer usable.
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Sat Oct 27, 2018 10:22 am    Post subject: Reply with quote

Perhaps it would be better to try using/installing the git kernel sources I linked to above. Not sure. I'm not a kernel dev lol.

Also, you may get further using the files/method located here: http://www.loper-os.org/?p=2295 It's a howto with image files for installing a very basic gentoo to the rk3328-roc-cc, which from what I can tell in specs is pretty much identical to the rock64.
_________________
My political stance/bias
slycordinator != slycoordinator
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum