|
Firefily Reload USB OTG port with mainline kernel
Posted at 3/6/2017 15:36:53
View:3743
|
Replies:1
Print
Only Author
[Copy Link]
1#
Hello,
I'm using a Firefly Reload board with the Linux mainline kernel, and I'm having trouble getting the USB OTG port to work in peripheral mode: it works fine in host mode but not in peripheral mode. I can successfully load the DWC2 driver and also load a gadget driver which gets correctly bound to the USB controller, but if I plug in a USB host into the OTG port nothing happens.
Has anyone managed to get this to work with the Linux mainline kernel 4.x?
Below is my log from the DWC2 driver (with debug prints enabled):
[ 1.498030] dwc2 ff580000.usb: ff580000.usb supply vusb_d not found, using dummy regulator
[ 1.507431] dwc2 ff580000.usb: ff580000.usb supply vusb_a not found, using dummy regulator
[ 1.880012] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g-tx-fifo-size, setting to default average
[ 1.892596] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries in SPRAM
[ 1.901018] dwc2 ff580000.usb: DCFG=0x08100000, DCTL=0x00000002, DIEPMSK=00000000
[ 1.909432] dwc2 ff580000.usb: GAHBCFG=0x00000000, GHWCFG1=0x00006664
[ 1.916698] dwc2 ff580000.usb: GRXFSIZ=0x00000400, GNPTXFSIZ=0x00100400
[ 1.924161] dwc2 ff580000.usb: DPTx[1] FSize=256, StAddr=0x00000410
[ 1.931224] dwc2 ff580000.usb: DPTx[2] FSize=256, StAddr=0x00000900
[ 1.938261] dwc2 ff580000.usb: DPTx[3] FSize=256, StAddr=0x00000a00
[ 1.945318] dwc2 ff580000.usb: DPTx[4] FSize=256, StAddr=0x00000b00
[ 1.952375] dwc2 ff580000.usb: DPTx[5] FSize=256, StAddr=0x00000c00
[ 1.959410] dwc2 ff580000.usb: DPTx[6] FSize=256, StAddr=0x00000d00
[ 1.966456] dwc2 ff580000.usb: DPTx[7] FSize=0, StAddr=0x00000e00
[ 1.973317] dwc2 ff580000.usb: DPTx[8] FSize=0, StAddr=0x00000f00
[ 1.980180] dwc2 ff580000.usb: DPTx[9] FSize=256, StAddr=0x00000410
[ 1.987216] dwc2 ff580000.usb: ep0-in: EPCTL=0x00008800, SIZ=0x00000000, DMA=0x379a4f2d
[ 1.996232] dwc2 ff580000.usb: ep0-out: EPCTL=0x00008000, SIZ=0x00000000, DMA=0xe3103c4f
[ 2.005352] dwc2 ff580000.usb: ep1-in: EPCTL=0x00001000, SIZ=0x00000000, DMA=0x5cf9a35d
[ 2.014369] dwc2 ff580000.usb: ep1-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x8b00a168
[ 2.023482] dwc2 ff580000.usb: ep2-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0xfef360cf
[ 2.032497] dwc2 ff580000.usb: ep2-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x9f637bc4
[ 2.041609] dwc2 ff580000.usb: ep3-in: EPCTL=0x00002000, SIZ=0x00000000, DMA=0xf03470c5
[ 2.050625] dwc2 ff580000.usb: ep3-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x8b00a168
[ 2.059715] dwc2 ff580000.usb: ep4-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0xfef360cf
[ 2.068731] dwc2 ff580000.usb: ep4-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0xb6c8c271
[ 2.077843] dwc2 ff580000.usb: ep5-in: EPCTL=0x00003000, SIZ=0x00000000, DMA=0x84245611
[ 2.086858] dwc2 ff580000.usb: ep5-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x8b00a168
[ 2.095970] dwc2 ff580000.usb: ep6-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0xfef360cf
[ 2.104986] dwc2 ff580000.usb: ep6-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x0a6c1c90
[ 2.114102] dwc2 ff580000.usb: ep7-in: EPCTL=0x00004000, SIZ=0x00000000, DMA=0xaccb75ec
[ 2.123111] dwc2 ff580000.usb: ep7-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x8b00a168
[ 2.132222] dwc2 ff580000.usb: ep8-in: EPCTL=0x00004800, SIZ=0x00000000, DMA=0x4625773c
[ 2.141254] dwc2 ff580000.usb: ep8-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x437c9154
[ 2.150371] dwc2 ff580000.usb: ep9-in: EPCTL=0x00005000, SIZ=0x00000000, DMA=0x9cb1c89c
[ 2.159365] dwc2 ff580000.usb: ep9-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x6ec79617
[ 2.168476] dwc2 ff580000.usb: DVBUSDIS=0x00000b8f, DVBUSPULSE=000002c6
[ 2.175996] usb 1-1: new high-speed USB device number 2 using dwc2
[ 2.176105] dwc2 ff580000.usb: DWC OTG Controller
[ 2.176147] dwc2 ff580000.usb: new USB bus registered, assigned bus number 2
[ 2.176195] dwc2 ff580000.usb: irq 41, io mem 0xff580000
[ 2.176450] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.176462] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.176470] usb usb2: Product: DWC OTG Controller
[ 2.176478] usb usb2: Manufacturer: Linux 4.10.0+ dwc2_hsotg
[ 2.176485] usb usb2: SerialNumber: ff580000.usb
and here is what I get when I load a gadget driver:
[ 1147.035367] dwc2 ff580000.usb: bound driver g_audio
[ 1147.041203] dwc2 ff580000.usb: dwc2_hsotg_pullup: is_on: 1 op_state: 3
[ 1147.041250] dwc2 ff580000.usb: dwc2_core_reset()
[ 1147.041345] dwc2 ff580000.usb: FIFOs reset, timeout at 100
[ 1147.041405] dwc2 ff580000.usb: EP0: DIEPCTL0=0x00008000, DOEPCTL0=0x00008000
[ 1147.041447] dwc2 ff580000.usb: gsintmsk now 0xd08c3cc4
[ 1147.041554] dwc2 ff580000.usb: DCTL=0x00000002
[ 1147.041631] dwc2 ff580000.usb: dwc2_hsotg_enqueue_setup: queueing setup request
[ 1147.041692] dwc2 ff580000.usb: ep0: req ee241680: 8@ee241198, noi=0, zero=0, snok=0
[ 1147.041757] dwc2 ff580000.usb: dwc2_hsotg_start_req: DxEPCTL=0x80008000, ep 0, dir out
[ 1147.041799] dwc2 ff580000.usb: ureq->length:8 ureq->actual:0
[ 1147.041896] dwc2 ff580000.usb: dwc2_hsotg_start_req: 1@8/8, 0x00080008 => 0x00000b10
[ 1147.041975] dwc2 ff580000.usb: dwc2_hsotg_start_req: 2e243000 pad => 0x00000b14
[ 1147.042014] dwc2 ff580000.usb: ep0 state:0
[ 1147.042055] dwc2 ff580000.usb: dwc2_hsotg_start_req: DxEPCTL=0x80008000
[ 1147.042097] dwc2 ff580000.usb: dwc2_hsotg_start_req: DXEPCTL=0x80008000
[ 1147.042169] dwc2 ff580000.usb: EP0: DIEPCTL0=0x00008000, DOEPCTL0=0x80008000
Thanks,
Francesco
|
|