From: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
To: Francesco Lavra
<francescolavra.fl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org
Subject: dwc2 gadget issues (was: RK3288 USB OTG controller in peripheral mode)
Date: Thu, 23 Feb 2017 20:27:07 +0100 [thread overview]
Message-ID: <2860160.8p22jOG6z4@phil> (raw)
In-Reply-To: <2b818d21-62a6-515e-8116-f243a2c07e08-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hi Francesco,
Am Donnerstag, 23. Februar 2017, 19:11:37 CET schrieb Francesco Lavra:
> 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.
you shouldn't use my tree as base for any real work :-) . Best to use the
regular mainline kernel or alternatively try linux-next to get all recent usb
changes schedules for the next release.
> 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?
In general the controller is a dwc2 and there was quite some activity on the
driver recently. So maybe really try linux-next first and see if any of the
changes included there improve the situation.
I've included some usb lists + people, maybe they know if anything recent may
have changed things.
> 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)
Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-02-23 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 18:11 RK3288 USB OTG controller in peripheral mode Francesco Lavra
[not found] ` <2b818d21-62a6-515e-8116-f243a2c07e08-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-23 19:27 ` Heiko Stuebner [this message]
2017-02-27 17:57 ` dwc2 gadget issues Francesco Lavra
2017-02-28 8:41 ` Vardan Mikayelyan
2017-02-28 11:43 ` Francesco Lavra
2017-02-28 13:44 ` Vardan Mikayelyan
2017-03-01 7:37 ` Francesco Lavra
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2860160.8p22jOG6z4@phil \
--to=heiko-4mtyjxux2i+zqb+pc5nmwq@public.gmane.org \
--cc=francescolavra.fl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox