All of lore.kernel.org
 help / color / mirror / Atom feed
* RK3288 USB OTG controller in peripheral mode
@ 2017-02-23 18:11 ` Francesco Lavra
  0 siblings, 0 replies; 16+ messages in thread
From: Francesco Lavra @ 2017-02-23 18:11 UTC (permalink / raw)
  To: linux-rockchip, linux-arm-kernel; +Cc: Heiko Stuebner

I'm having trouble getting the RK3288 OTG controller (the one at 
ff580000) to work in peripheral mode. I'm using a Firefly Reload board, 
and I know the hardware is fine because I can successfully use the port 
in device mode with U-Boot's mass storage gadget driver.
Under Linux, the OTG port works fine when used in host mode, but fails 
to work in device mode: nothing happens when the a USB host is plugged 
into the OTG port, not even a single interrupt is generated by the 
controller. I'm using the latest device tree definitions from 
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git.
Tried with different gadget drivers (g_audio, g_ether, g_mass_storage), 
but it makes no difference.
Tried also forcing peripheral mode in the device tree, with dr_mode = 
"peripheral", to no avail.

Are there any known problems with the RK3288 OTG controller?

Here is the relevant log when the dwc2 driver is loaded at boot:

[    1.376935] ff580000.usb supply vusb_d not found, using dummy regulator
[    1.383683] ff580000.usb supply vusb_a not found, using dummy regulator
[    1.390627] dwc2 ff580000.usb: dwc2_core_reset() HANG! Soft Reset 
GRSTCTL=80000001
[    1.509048] dwc2 ff580000.usb: dwc2_wait_for_mode: Couldn't set 
device mode
[    1.750626] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: 
Invalid parameter g-tx-fifo-size, setting to default average
[    1.761828] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: 
Invalid parameter g_tx_fifo_size[1]=104
[    1.771192] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: 
Invalid parameter g_tx_fifo_size[2]=104
[    1.780529] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: 
Invalid parameter g_tx_fifo_size[3]=104
[    1.789888] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: 
Invalid parameter g_tx_fifo_size[4]=104
[    1.799245] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: 
Invalid parameter g_tx_fifo_size[5]=104
[    1.808614] dwc2 ff580000.usb: dwc2_check_param_tx_fifo_sizes: 
Invalid parameter g_tx_fifo_size[6]=104
[    1.817993] usb 1-1: new high-speed USB device number 2 using dwc2
[    1.824390] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries 
in SPRAM
[    1.832098] dwc2 ff580000.usb: DWC OTG Controller
[    1.836924] dwc2 ff580000.usb: new USB bus registered, assigned bus 
number 2
[    1.844125] dwc2 ff580000.usb: irq 41, io mem 0xff580000
[    1.849747] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.856598] usb usb2: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[    1.863875] usb usb2: Product: DWC OTG Controller
[    1.868601] usb usb2: Manufacturer: Linux 4.8.1+ dwc2_hsotg
[    1.874215] usb usb2: SerialNumber: ff580000.usb

and this is what I get when I load a gadget driver (in this case, g_audio):

[   19.848590] dwc2 ff580000.usb: bound driver g_audio
[   19.853816] dwc2 ff580000.usb: dwc2_hsotg_enqueue_setup: failed queue 
(-11)

Thank you,
Francesco Lavra

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-03-03  7:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 18:11 RK3288 USB OTG controller in peripheral mode Francesco Lavra
2017-02-23 18:11 ` Francesco Lavra
     [not found] ` <2b818d21-62a6-515e-8116-f243a2c07e08-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-23 19:27   ` dwc2 gadget issues (was: RK3288 USB OTG controller in peripheral mode) Heiko Stuebner
2017-02-27 17:57     ` dwc2 gadget issues Francesco Lavra
2017-02-27 17:57       ` Francesco Lavra
2017-02-28  8:41       ` Vardan Mikayelyan
2017-02-28  8:41         ` Vardan Mikayelyan
2017-02-28 11:43         ` Francesco Lavra
2017-02-28 11:43           ` Francesco Lavra
2017-02-28 13:44           ` Vardan Mikayelyan
2017-02-28 13:44             ` Vardan Mikayelyan
2017-03-01  7:37             ` Francesco Lavra
2017-03-01  7:37               ` Francesco Lavra
2017-03-02  5:58     ` Randy Li
2017-03-02  5:58       ` Randy Li
     [not found]       ` <11c40609-d59a-8e8e-1c9b-3989cd98b5e7-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-03  7:43         ` Francesco Lavra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.