From: Francesco Lavra <francescolavra.fl@gmail.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: johnyoun@synopsys.com, linux-rockchip@lists.infradead.org,
linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: dwc2 gadget issues
Date: Mon, 27 Feb 2017 18:57:10 +0100 [thread overview]
Message-ID: <b46ebe81-7db4-aa4f-1333-aa6e1d655e26@gmail.com> (raw)
In-Reply-To: <2860160.8p22jOG6z4@phil>
Hi,
On 02/23/2017 08:27 PM, Heiko Stuebner wrote:
> 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.
Thanks for your inputs.
I was actually using the mainline kernel (4.8.1), in which the dwc2
driver wasn't working, that's why I went to your tree to pick up any
fixes or new features that might have been done. I also went to the
linux-usb tree for the same reason.
Anyway, today I tried with the latest mainline release 4.10.0, and also
with linux-next. Unfortunately, still no luck: I can load a gadget
driver, which gets correctly bound to the OTG controller, but then
nothing happens if a USB host is connected to the OTG port.
I'm pasting below the dmesg contents (obtained with 4.10.0, with verbose
debugging enabled for the dwc2 driver) when a gadget driver is loaded,
in case you might spot something suspicious:
[ 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
next prev parent reply other threads:[~2017-02-27 17:57 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 ` dwc2 gadget issues (was: RK3288 USB OTG controller in peripheral mode) Heiko Stuebner
2017-02-27 17:57 ` Francesco Lavra [this message]
2017-02-28 8:41 ` dwc2 gadget issues 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=b46ebe81-7db4-aa4f-1333-aa6e1d655e26@gmail.com \
--to=francescolavra.fl@gmail.com \
--cc=heiko@sntech.de \
--cc=johnyoun@synopsys.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-usb@vger.kernel.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