Modify

Opened 2 years ago

Last modified 22 months ago

#21396 reopened defect

rt305x: DWC2 Broken in K4.3

Reported by: AndreiM Owned by: developers
Priority: high Milestone:
Component: kernel Version: Trunk
Keywords: dwc2, otg, rt3052 Cc: blogic

Description

The OTG functionality is broken after the K3.18->4.3 transition (RT-N13U).

dwc2 101c0000.otg: Bad value for GSNPSID: 0x00000000

While this breakage has happened before, the fix has been a device_reset() call in dwc2_hcd_init, which we still have in target/linux/ramips/patches-4.3/0032-USB-dwc2-add-device_reset.patch. Unfortunately, the DWC2 driver seems to have changed substantially in the 4.x kernels, and this fix doesn't work anymore.

I have also tried different dr_mode roles in the device dts, without any apparent change.

Attachments (1)

dmesg.RT-N13U (19.1 KB) - added by AndreiM 2 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 2 years ago by blogic

  • Resolution set to fixed
  • Status changed from new to closed

trunk from today tells me that it works -->

[ 5.480989] dwc2 101c0000.otg: DWC OTG Controller
[ 5.490536] dwc2 101c0000.otg: new USB bus registered, assigned bus number 1
[ 5.504867] dwc2 101c0000.otg: irq 26, io mem 0x00000000
[ 5.517342] hub 1-0:1.0: USB hub found
[ 5.525612] hub 1-0:1.0: 1 port detected

comment:2 Changed 2 years ago by AndreiM

  • Resolution fixed deleted
  • Status changed from closed to reopened

Thanks for looking into this, @blogic. Unfortunately DWC2 still fails on RT-N13U with r48064 (full log attached). Also, nothing detected when inserting gadgets known to work in the past.

comment:3 Changed 2 years ago by blogic

i have to admit i am a bti lost for ideas. i just tried 3 different rt3050 boards and they all work. my assumption is that your bootloader disables the USB in some way and the driver fails to bring it up.

comment:4 Changed 2 years ago by AndreiM

Sure, but then K3.18 DWC2 wouldn't work either, right?

P.S. Many thanks for the Ethernet fix this morning.

comment:5 Changed 2 years ago by nbd

AndreiM, I just noticed that you're apparently not running plain trunk, but a modified version. The kernel log indicates version 4.3.3, whereas trunk still uses 4.3.

Can you try a clean build with an unmodified trunk?

Changed 2 years ago by AndreiM

comment:6 Changed 2 years ago by AndreiM

Sorry about that; I usually use pristine upstream when debugging things. The kernel bump happened while looking into the Ethernet issues we had earlier.

Anyway, here's the updated log with clean trunk (r48078). Unfortunately, the issue persists exactly like before. I will run a diff with https://downloads.openwrt.org/snapshots/trunk/ramips/rt305x/config, just in case (kernel configuration is unchanged, of course). I don't know what else could be different.

Last edited 2 years ago by AndreiM (previous) (diff)

comment:7 follow-up: Changed 2 years ago by anonymous

I'm having the exact same issue on a ALPHA ASL-26555.

Ralink RT3052 board.

comment:8 in reply to: ↑ 7 Changed 2 years ago by awaaas

Replying to anonymous:

I'm having the exact same issue on a ALPHA ASL-26555.

Ralink RT3052 board.

I have some of this router around my house, reverting to CC fixed the problem. Something is wrong with trunk.

comment:9 Changed 2 years ago by AndreiM

I was curious and ported onto K4.4.1. The same GSNPSID error happens, except now it mentions forcing host mode:

dwc2 101c0000.otg: Configuration mismatch. Forcing host mode
dwc2 101c0000.otg: Bad value for GSNPSID: 0x00000000

comment:10 Changed 22 months ago by AndreiM

Looks like we have a fix: http://patchwork.ozlabs.org/patch/608375. I cherry-picked it (https://github.com/airend/openwrt/commit/master~2), and DWC2 seems to be working again (RNDIS tested).

[    3.055226] dwc2 101c0000.otg: Configuration mismatch. Forcing host mode
[    3.928650] dwc2 101c0000.otg: DWC OTG Controller
[    3.938233] dwc2 101c0000.otg: new USB bus registered, assigned bus number 1
[    3.952554] dwc2 101c0000.otg: irq 26, io mem 0x00000000
[    3.964299] usb usb1: no of_node; not parsing pinctrl DT
[    3.964967] hub 1-0:1.0: no of_node; not parsing pinctrl DT
[    3.965054] hub 1-0:1.0: USB hub found
[    3.973296] hub 1-0:1.0: 1 port detected
Last edited 22 months ago by AndreiM (previous) (diff)

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.