All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vardan Mikayelyan <Vardan.Mikayelyan@synopsys.com>
To: Francesco Lavra <francescolavra.fl@gmail.com>,
	Heiko Stuebner <heiko@sntech.de>
Cc: "linux-rockchip@lists.infradead.org"
	<linux-rockchip@lists.infradead.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"John.Youn@synopsys.com" <John.Youn@synopsys.com>
Subject: Re: dwc2 gadget issues
Date: Tue, 28 Feb 2017 08:41:17 +0000	[thread overview]
Message-ID: <A62D4564EAF812438095D5571C2BF7D7FCC496AC@am04wembxb.internal.synopsys.com> (raw)
In-Reply-To: b46ebe81-7db4-aa4f-1333-aa6e1d655e26@gmail.com

On 2/27/2017 11:55 PM, Francesco Lavra wrote:
> 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
> --

Hi Francesco,

Could you please provide full log (with debugs enabled) from DWC2 driver 
loading to issue point? Two logs are not giving us the full picture.

Thanks,
Vardan.

WARNING: multiple messages have this Message-ID (diff)
From: Vardan.Mikayelyan@synopsys.com (Vardan Mikayelyan)
To: linux-arm-kernel@lists.infradead.org
Subject: dwc2 gadget issues
Date: Tue, 28 Feb 2017 08:41:17 +0000	[thread overview]
Message-ID: <A62D4564EAF812438095D5571C2BF7D7FCC496AC@am04wembxb.internal.synopsys.com> (raw)
In-Reply-To: b46ebe81-7db4-aa4f-1333-aa6e1d655e26@gmail.com

On 2/27/2017 11:55 PM, Francesco Lavra wrote:
> 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 at 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 at 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
> --

Hi Francesco,

Could you please provide full log (with debugs enabled) from DWC2 driver 
loading to issue point? Two logs are not giving us the full picture.

Thanks,
Vardan.

  reply	other threads:[~2017-02-28  8:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=A62D4564EAF812438095D5571C2BF7D7FCC496AC@am04wembxb.internal.synopsys.com \
    --to=vardan.mikayelyan@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=francescolavra.fl@gmail.com \
    --cc=heiko@sntech.de \
    --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 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.