Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1634 - dwc2 on arv7518pw doesn't work (cannot be initialized) #8049

Closed
openwrt-bot opened this issue Jul 6, 2018 · 12 comments
Closed

FS#1634 - dwc2 on arv7518pw doesn't work (cannot be initialized) #8049

openwrt-bot opened this issue Jul 6, 2018 · 12 comments
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jul 6, 2018

olivluca:

  • Device problem occurs on
    Astoria Networks ARV7518PW

  • Software versions of OpenWrt/LEDE release, packages, etc.
    OpenWrt SNAPSHOT r7402-0f54388

These are the messages appearing at boot or when reloading the dwc2 module. It worked in a previous snapshot (sorry, I don't remember which one and I overwrote the file, I also don't know if the usb was actually working)

[ 5.431505] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[ 5.438418] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[ 5.446581] dwc2 1e101000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
[ 5.593255] dwc2 1e101000.usb: DWC OTG Controller
[ 5.596565] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[ 5.603417] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[ 5.608632] dwc2 1e101000.usb: startup error -517
[ 5.613124] dwc2 1e101000.usb: USB bus 1 deregistered
[ 5.618080] dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jul 7, 2018

olivluca:

The same on today shapshot OpenWrt SNAPSHOT r7404-7ec931b

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jul 18, 2018

olivluca:

I had to revert to 17.01.05 where, in spite of some "dwc2 1e101000.ifxhcd: Mode Mismatch Interrupt: currently in Host mode" messages the usb port works.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jul 18, 2018

mkresin:

Hey Luca,

Error number -517 should be EPROBE_DEFER (Driver requests probe retry).

Usually EPROBE_DEFER is returned if a subsystem on which a driver relies isn't yet initialised. The kernel will try to load the driver at a later time again. Such errors shouldn't be considered as fatal or failed. There we have our first bug.

The more interesting question is, on which subsystem - which isn't yet initialised - do we depend? Especially with reloading the dwc2 module from the user space I would expect that everything is initialised.

The following commits might be related:

  • [[https://git.openwrt.org/d8b475212bbf9e5f80c1c923a9701dca5ceb23e2|lantiq: kernel 4.14: use vbus-supply devicetree property]]
  • [[https://git.openwrt.org/d7b7483343b5c7f157a2a97244ce9e60f4260e43|lantiq: switch to kernel 4.14]]
  • [[https://git.openwrt.org/6eaf8b3d89571992a0aa7142cfab3f1dcef3c802|lantiq: kernel 4.14: update dts files]]

With kernel 4.14 we have switched to the dwc2 driver + usb phy framework, which might introduced new bugs or start to trigger existing ones.

An easy test would be to see if [[https://downloads.openwrt.org/releases/18.06.0-rc2/|OpenWrt 18.06-rc2]] is affected by the issue as well. For lantiq, kernel 4.9 is the default in OpenWrt 18.06.

I'm not sure if you're the same Luca Olivetti who send some kernel/driver related patches before. But if it's you, it would be great if you can have a look at the lantiq usb phy driver (drivers/phy/lantiq/phy-lantiq-rcu-usb2.c) and/or the dwc2 kernel driver (drivers/usb/dwc2/).

Knowing which function returns the EPROBE_DEFER, might give us a hint what is going wrong.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jul 19, 2018

zuzia:

The same on Arcadyan ARV752DPW - OpenWrt SNAPSHOT r7526-02d53e6. USB ports not working.

[ 1836.407144] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[ 1836.414069] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[ 1836.422276] dwc2 1e101000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
[ 1836.635863] dwc2 1e101000.usb: DWC OTG Controller
[ 1836.639143] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[ 1836.646062] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[ 1836.651257] dwc2 1e101000.usb: startup error -517
[ 1836.655730] dwc2 1e101000.usb: USB bus 1 deregistered
[ 1836.660718] dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Aug 18, 2018

olivluca:

I thought that the default configuration of flyspray would notify me of updates, it turns out it doesn't so I read the comments just now.

I tested with the 18.06-rc2 and the dwc2 driver, while it still complains with these messages //"dwc2 1e101000.ifxhcd: Mode Mismatch Interrupt: currently in Host mode"//, works there (at least with a memory stick and with an RT73 based wifi stick, the atheros ar9271 wifi stick that used to work with 17.01.05 doesn't work now //"ath: phy3: Mac Chip Rev 0x0f.3 is not supported by this driver" //but I suppose that's another bug).

BTW, why do you say the problem is probably due to switching to the dwc2 driver? the working kernel is already using it.

And, yes, I'm the same Luca but I currently don't have an openwrt development system set up.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Aug 18, 2018

olivluca:

I reported the ath9k-htc bug [[https://bugs.openwrt.org/index.php?do=details&task_id=1792|here]].

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Aug 18, 2018

olivluca:

I just realized that there's a 18.06.1 version available. I installed it, same symptoms (i.e., the dwc2 driver works, the ar9271 stick doesn't).

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 15, 2020

olivluca:

I just installed openwrt 19.07.2 and the usb doesn't work at all, no message at all when I plug the rt73 stick that worked previuosly.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Apr 10, 2020

olivluca:

I'll have to add to my previous message that the error message loading the dwc2 module is exactly the same as in 2018.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jul 3, 2020

olivluca:

If I revert the dst changes the usb initializes correctly but there's no power (5V) on the usb connector.
Any hint on how to restore power?

[ 5.755396] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[ 5.762310] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[ 5.770534] dwc2 1e101000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
[ 5.916348] dwc2 1e101000.usb: DWC OTG Controller
[ 5.919671] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[ 5.926524] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[ 5.934226] hub 1-0:1.0: USB hub found
[ 5.937402] hub 1-0:1.0: 1 port detected

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jul 3, 2020

olivluca:

Since I'm too old to delve in the code (especially the patches of patches), I put a dummy led on gpio 14 so I could turn on the usb from userspace and it works.

Any idea on how to do it "properly"?

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jul 5, 2020

olivluca:

I just posted a fix for my device and 19.07.3 on the openwrt-devel mailing list. I'm attaching it also here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant