All of lore.kernel.org
 help / color / mirror / Atom feed
* Chipidea usb otg support for IMX/MXS (device functionality)
       [not found] ` <F281D0F91ED19E4D8E63A7504E8A649803E8A3F3@039-SN2MPN1-021.039d.mgd.msft.net>
@ 2013-05-29  7:50   ` maxime.ripard at free-electrons.com
  2013-05-29  8:07     ` Chen Peter-B29397
  2013-05-30 16:17     ` Hector Palacios
  0 siblings, 2 replies; 36+ messages in thread
From: maxime.ripard at free-electrons.com @ 2013-05-29  7:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, May 29, 2013 at 07:11:30AM +0000, Chen Peter-B29397 wrote:
>  
> > Hello,
> > 
> > Am I right in assuming that the MXS USB on-the-go port does not currently
> > support the
> > device (gadget) functionality?
> > Anybody out there working on that?
> > 
> 
> As far as I know, Maxime Ripard may already let the chipidea durl-role function
> work ok at mx28. It may need my chipidea otg patch
> 
> https://github.com/hzpeterchen/linux-usb.git

Indeed, I've been using the patchset "Add tested id switch and vbus
connect detect support for Chipidea" from Peter for quite some time on
top of 3.9 and it works like a charm for the gadget mode on an MX28
platform.

BTW, Peter, I've seen that these patches are still not merged in 3.10,
is there a reason for that? do you plan on sending a version rebased on
top of 3.10 some time in the future? I tried to do the rebasing myself,
but the chipidea driver seems to have changed quite heavily, which makes
the process quite difficult when you don't know what you're doing :)

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-05-29  7:50   ` Chipidea usb otg support for IMX/MXS (device functionality) maxime.ripard at free-electrons.com
@ 2013-05-29  8:07     ` Chen Peter-B29397
  2013-05-29 10:13       ` Michael Grzeschik
  2013-05-30 16:17     ` Hector Palacios
  1 sibling, 1 reply; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-05-29  8:07 UTC (permalink / raw)
  To: linux-arm-kernel


 
> 
> Indeed, I've been using the patchset "Add tested id switch and vbus
> connect detect support for Chipidea" from Peter for quite some time on
> top of 3.9 and it works like a charm for the gadget mode on an MX28
> platform.
> 
> BTW, Peter, I've seen that these patches are still not merged in 3.10,
> is there a reason for that? do you plan on sending a version rebased on
> top of 3.10 some time in the future? I tried to do the rebasing myself,
> but the chipidea driver seems to have changed quite heavily, which makes
> the process quite difficult when you don't know what you're doing :)
> 

I can spend few bandwidth on upstream work recently, I may have more
bandwidth after June 15th. 

Currently, we still have no conclusion for chipidea core driver's coming work,
like Device tree support, how to identify if the controller is OTG supported.

Best regards,
Peter

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-05-29  8:07     ` Chen Peter-B29397
@ 2013-05-29 10:13       ` Michael Grzeschik
  2013-05-29 12:19         ` maxime.ripard at free-electrons.com
  2013-06-21 11:26         ` Marek Vasut
  0 siblings, 2 replies; 36+ messages in thread
From: Michael Grzeschik @ 2013-05-29 10:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
> 
>  
> > 
> > Indeed, I've been using the patchset "Add tested id switch and vbus
> > connect detect support for Chipidea" from Peter for quite some time on
> > top of 3.9 and it works like a charm for the gadget mode on an MX28
> > platform.
> > 
> > BTW, Peter, I've seen that these patches are still not merged in 3.10,
> > is there a reason for that? do you plan on sending a version rebased on
> > top of 3.10 some time in the future? I tried to do the rebasing myself,
> > but the chipidea driver seems to have changed quite heavily, which makes
> > the process quite difficult when you don't know what you're doing :)
> > 

we already have Peter's patches on v3.10-rc3 [1].

> I can spend few bandwidth on upstream work recently, I may have more
> bandwidth after June 15th. 
> 
> Currently, we still have no conclusion for chipidea core driver's coming work,
> like Device tree support, how to identify if the controller is OTG supported.

Yes, the next important step is getting the of propertys "dr_mode" and
"phy_type" properly used in the chipidea core.

[1] http://git.pengutronix.de/?p=mgr/linux.git;a=summary -> v3.10/topic/usb-peterchen

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-05-29 10:13       ` Michael Grzeschik
@ 2013-05-29 12:19         ` maxime.ripard at free-electrons.com
  2013-05-29 12:41           ` Michael Grzeschik
  2013-06-21 11:26         ` Marek Vasut
  1 sibling, 1 reply; 36+ messages in thread
From: maxime.ripard at free-electrons.com @ 2013-05-29 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Michael,

On Wed, May 29, 2013 at 12:13:32PM +0200, Michael Grzeschik wrote:
> Hi,
> 
> On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
> > 
> >  
> > > 
> > > Indeed, I've been using the patchset "Add tested id switch and vbus
> > > connect detect support for Chipidea" from Peter for quite some time on
> > > top of 3.9 and it works like a charm for the gadget mode on an MX28
> > > platform.
> > > 
> > > BTW, Peter, I've seen that these patches are still not merged in 3.10,
> > > is there a reason for that? do you plan on sending a version rebased on
> > > top of 3.10 some time in the future? I tried to do the rebasing myself,
> > > but the chipidea driver seems to have changed quite heavily, which makes
> > > the process quite difficult when you don't know what you're doing :)
> > > 
> 
> we already have Peter's patches on v3.10-rc3 [1].

Wow, great, thanks!

> > I can spend few bandwidth on upstream work recently, I may have more
> > bandwidth after June 15th. 
> > 
> > Currently, we still have no conclusion for chipidea core driver's coming work,
> > like Device tree support, how to identify if the controller is OTG supported.
> 
> Yes, the next important step is getting the of propertys "dr_mode" and
> "phy_type" properly used in the chipidea core.

I totally admit lacking some context here, but how does the device tree
move prevent from merging these patches? Do they have any shortcomings?
I've been using them with DT for quite some time and it seems to be
working pretty well if you ask me...

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-05-29 12:19         ` maxime.ripard at free-electrons.com
@ 2013-05-29 12:41           ` Michael Grzeschik
  2013-05-30 13:53             ` maxime.ripard at free-electrons.com
  0 siblings, 1 reply; 36+ messages in thread
From: Michael Grzeschik @ 2013-05-29 12:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 29, 2013 at 02:19:16PM +0200, maxime.ripard at free-electrons.com wrote:
> Hi Michael,
> 
> On Wed, May 29, 2013 at 12:13:32PM +0200, Michael Grzeschik wrote:
> > Hi,
> > 
> > On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
> > > 
> > >  
> > > > 
> > > > Indeed, I've been using the patchset "Add tested id switch and vbus
> > > > connect detect support for Chipidea" from Peter for quite some time on
> > > > top of 3.9 and it works like a charm for the gadget mode on an MX28
> > > > platform.
> > > > 
> > > > BTW, Peter, I've seen that these patches are still not merged in 3.10,
> > > > is there a reason for that? do you plan on sending a version rebased on
> > > > top of 3.10 some time in the future? I tried to do the rebasing myself,
> > > > but the chipidea driver seems to have changed quite heavily, which makes
> > > > the process quite difficult when you don't know what you're doing :)
> > > > 
> > 
> > we already have Peter's patches on v3.10-rc3 [1].
> 
> Wow, great, thanks!
> 
> > > I can spend few bandwidth on upstream work recently, I may have more
> > > bandwidth after June 15th. 
> > > 
> > > Currently, we still have no conclusion for chipidea core driver's coming work,
> > > like Device tree support, how to identify if the controller is OTG supported.
> > 
> > Yes, the next important step is getting the of propertys "dr_mode" and
> > "phy_type" properly used in the chipidea core.
> 
> I totally admit lacking some context here, but how does the device tree
> move prevent from merging these patches? Do they have any shortcomings?
> I've been using them with DT for quite some time and it seems to be
> working pretty well if you ask me...

Peters patches need some more care, as they are not cleanly sperated.
One patch e.g. adds an delayed worker to handle the otg events. Another
one above that patch is removing the worker afterwards.
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-05-29 12:41           ` Michael Grzeschik
@ 2013-05-30 13:53             ` maxime.ripard at free-electrons.com
  0 siblings, 0 replies; 36+ messages in thread
From: maxime.ripard at free-electrons.com @ 2013-05-30 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Michael,

On Wed, May 29, 2013 at 02:41:08PM +0200, Michael Grzeschik wrote:
> Peters patches need some more care, as they are not cleanly sperated.
> One patch e.g. adds an delayed worker to handle the otg events. Another
> one above that patch is removing the worker afterwards.

I see, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-05-29  7:50   ` Chipidea usb otg support for IMX/MXS (device functionality) maxime.ripard at free-electrons.com
  2013-05-29  8:07     ` Chen Peter-B29397
@ 2013-05-30 16:17     ` Hector Palacios
  2013-06-07  9:37       ` maxime.ripard at free-electrons.com
  1 sibling, 1 reply; 36+ messages in thread
From: Hector Palacios @ 2013-05-30 16:17 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Maxime,

On 05/29/2013 09:50 AM, maxime.ripard at free-electrons.com wrote:
> Hi,
>
> On Wed, May 29, 2013 at 07:11:30AM +0000, Chen Peter-B29397 wrote:
>>
>>> Hello,
>>>
>>> Am I right in assuming that the MXS USB on-the-go port does not currently
>>> support the
>>> device (gadget) functionality?
>>> Anybody out there working on that?
>>>
>>
>> As far as I know, Maxime Ripard may already let the chipidea durl-role function
>> work ok at mx28. It may need my chipidea otg patch
>>
>> https://github.com/hzpeterchen/linux-usb.git
>
> Indeed, I've been using the patchset "Add tested id switch and vbus
> connect detect support for Chipidea" from Peter for quite some time on
> top of 3.9 and it works like a charm for the gadget mode on an MX28
> platform.
>
> BTW, Peter, I've seen that these patches are still not merged in 3.10,
> is there a reason for that? do you plan on sending a version rebased on
> top of 3.10 some time in the future? I tried to do the rebasing myself,
> but the chipidea driver seems to have changed quite heavily, which makes
> the process quite difficult when you don't know what you're doing :)

I guess you didn't get rid of the 'possible circular locking dependency' you talked 
about at [1], right? I experimented the same and also a BUG [2] after cable reconnection.
Despite those, I ran a simple test of serial, ethernet, and mass_storage gadgets and 
they worked fine.

I didn't use the new properties (phy_type, dr_mode...) in the DT of my mx28 platform, 
did you?

[1] https://lkml.org/lkml/2013/3/6/200

[2]
[ 1949.074726] BUG: spinlock lockup suspected on CPU#0, swapper/0
[ 1949.080623]  lock: 0xcf41f014, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0
[ 1949.088184] [<c001510c>] (unwind_backtrace+0x0/0xf4) from [<c0273754>] 
(do_raw_spin_lock+0x104/0x14c)
[ 1949.097463] [<c0273754>] (do_raw_spin_lock+0x104/0x14c) from [<c045893c>] 
(_raw_spin_lock_irqsave+0x50/0x5c)
[ 1949.107340] [<c045893c>] (_raw_spin_lock_irqsave+0x50/0x5c) from [<c03467f8>] 
(ep_disable+0x30/0xfc)
[ 1949.116541] [<c03467f8>] (ep_disable+0x30/0xfc) from [<bf00a19c>] 
(gserial_disconnect+0x9c/0x174 [g_serial])
[ 1949.126447] [<bf00a19c>] (gserial_disconnect+0x9c/0x174 [g_serial]) from 
[<bf00a288>] (acm_disable+0xc/0x2c [g_serial])
[ 1949.137325] [<bf00a288>] (acm_disable+0xc/0x2c [g_serial]) from [<bf000930>] 
(reset_config+0x34/0x5c [libcomposite])
[ 1949.147931] [<bf000930>] (reset_config+0x34/0x5c [libcomposite]) from [<bf000fd0>] 
(composite_disconnect+0x34/0x5c [libcomposite])
[ 1949.159737] [<bf000fd0>] (composite_disconnect+0x34/0x5c [libcomposite]) from 
[<c0347b14>] (udc_irq+0x1d8/0xbe4)
[ 1949.169951] [<c0347b14>] (udc_irq+0x1d8/0xbe4) from [<c0345830>] (ci_irq+0x9c/0x104)
[ 1949.177751] [<c0345830>] (ci_irq+0x9c/0x104) from [<c006cb50>] 
(handle_irq_event_percpu+0x5c/0x26c)
[ 1949.186847] [<c006cb50>] (handle_irq_event_percpu+0x5c/0x26c) from [<c006cd9c>] 
(handle_irq_event+0x3c/0x5c)
[ 1949.196716] [<c006cd9c>] (handle_irq_event+0x3c/0x5c) from [<c006f3c8>] 
(handle_level_irq+0x8c/0x118)
[ 1949.205976] [<c006f3c8>] (handle_level_irq+0x8c/0x118) from [<c006cae4>] 
(generic_handle_irq+0x28/0x30)
[ 1949.215421] [<c006cae4>] (generic_handle_irq+0x28/0x30) from [<c001009c>] 
(handle_IRQ+0x30/0x84)
[ 1949.224246] [<c001009c>] (handle_IRQ+0x30/0x84) from [<c00086ec>] 
(icoll_handle_irq+0x30/0x44)
[ 1949.232897] [<c00086ec>] (icoll_handle_irq+0x30/0x44) from [<c000ee24>] 
(__irq_svc+0x44/0x54)
[ 1949.241438] Exception stack(0xc0627f68 to 0xc0627fb0)
[ 1949.246520] 7f60:                   c0010278 0005317f 0005217f 60000013 c0626000 
c0667c88
[ 1949.254729] 7f80: c0631980 7fffffff 40004000 41069265 4061c574 00000000 600000d3 
c0627fb0
[ 1949.262926] 7fa0: c0010278 c0010284 60000013 ffffffff
[ 1949.268023] [<c000ee24>] (__irq_svc+0x44/0x54) from [<c0010284>] 
(default_idle+0x40/0x48)
[ 1949.276244] [<c0010284>] (default_idle+0x40/0x48) from [<c00105b8>] 
(cpu_idle+0x68/0xd0)
[ 1949.284380] [<c00105b8>] (cpu_idle+0x68/0xd0) from [<c0600810>] 
(start_kernel+0x258/0x298)
[ 1953.034550]  gadget: high-speed config #2: CDC ACM config

Regards,
--
H?ctor Palacios

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-05-30 16:17     ` Hector Palacios
@ 2013-06-07  9:37       ` maxime.ripard at free-electrons.com
  0 siblings, 0 replies; 36+ messages in thread
From: maxime.ripard at free-electrons.com @ 2013-06-07  9:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hector,

On Thu, May 30, 2013 at 06:17:47PM +0200, Hector Palacios wrote:
> Dear Maxime,
> 
> On 05/29/2013 09:50 AM, maxime.ripard at free-electrons.com wrote:
> >Hi,
> >
> >On Wed, May 29, 2013 at 07:11:30AM +0000, Chen Peter-B29397 wrote:
> >>
> >>>Hello,
> >>>
> >>>Am I right in assuming that the MXS USB on-the-go port does not currently
> >>>support the
> >>>device (gadget) functionality?
> >>>Anybody out there working on that?
> >>>
> >>
> >>As far as I know, Maxime Ripard may already let the chipidea durl-role function
> >>work ok at mx28. It may need my chipidea otg patch
> >>
> >>https://github.com/hzpeterchen/linux-usb.git
> >
> >Indeed, I've been using the patchset "Add tested id switch and vbus
> >connect detect support for Chipidea" from Peter for quite some time on
> >top of 3.9 and it works like a charm for the gadget mode on an MX28
> >platform.
> >
> >BTW, Peter, I've seen that these patches are still not merged in 3.10,
> >is there a reason for that? do you plan on sending a version rebased on
> >top of 3.10 some time in the future? I tried to do the rebasing myself,
> >but the chipidea driver seems to have changed quite heavily, which makes
> >the process quite difficult when you don't know what you're doing :)
> 
> I guess you didn't get rid of the 'possible circular locking
> dependency' you talked about at [1], right?

Indeed

> I experimented the same and also a BUG [2] after cable reconnection.
> Despite those, I ran a simple test of serial, ethernet, and
> mass_storage gadgets and they worked fine.

I never experienced the BUG you're mentionning, everything was working
fine except the circular dependency.

> I didn't use the new properties (phy_type, dr_mode...) in the DT of
> my mx28 platform, did you?

Neither did I.

Maxime

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-05-29 10:13       ` Michael Grzeschik
  2013-05-29 12:19         ` maxime.ripard at free-electrons.com
@ 2013-06-21 11:26         ` Marek Vasut
  2013-06-21 12:22           ` Michael Grzeschik
  1 sibling, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-06-21 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> Hi,
> 
> On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
> > > Indeed, I've been using the patchset "Add tested id switch and vbus
> > > connect detect support for Chipidea" from Peter for quite some time on
> > > top of 3.9 and it works like a charm for the gadget mode on an MX28
> > > platform.
> > > 
> > > BTW, Peter, I've seen that these patches are still not merged in 3.10,
> > > is there a reason for that? do you plan on sending a version rebased on
> > > top of 3.10 some time in the future? I tried to do the rebasing myself,
> > > but the chipidea driver seems to have changed quite heavily, which
> > > makes the process quite difficult when you don't know what you're
> > > doing :)
> 
> we already have Peter's patches on v3.10-rc3 [1].
> 
> > I can spend few bandwidth on upstream work recently, I may have more
> > bandwidth after June 15th.
> > 
> > Currently, we still have no conclusion for chipidea core driver's coming
> > work, like Device tree support, how to identify if the controller is OTG
> > supported.
> 
> Yes, the next important step is getting the of propertys "dr_mode" and
> "phy_type" properly used in the chipidea core.
> 
> [1] http://git.pengutronix.de/?p=mgr/linux.git;a=summary ->
> v3.10/topic/usb-peterchen

Is anyone planning to work on this stuff and start pushing it mainline or is 
this effort stalled completely? What is it that's missing before these can be 
applied?

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-21 11:26         ` Marek Vasut
@ 2013-06-21 12:22           ` Michael Grzeschik
  2013-06-21 12:56             ` Marek Vasut
  0 siblings, 1 reply; 36+ messages in thread
From: Michael Grzeschik @ 2013-06-21 12:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Marek,

On Fri, Jun 21, 2013 at 01:26:10PM +0200, Marek Vasut wrote:
> Hi,
> 
> > Hi,
> > 
> > On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
> > > > Indeed, I've been using the patchset "Add tested id switch and vbus
> > > > connect detect support for Chipidea" from Peter for quite some time on
> > > > top of 3.9 and it works like a charm for the gadget mode on an MX28
> > > > platform.
> > > > 
> > > > BTW, Peter, I've seen that these patches are still not merged in 3.10,
> > > > is there a reason for that? do you plan on sending a version rebased on
> > > > top of 3.10 some time in the future? I tried to do the rebasing myself,
> > > > but the chipidea driver seems to have changed quite heavily, which
> > > > makes the process quite difficult when you don't know what you're
> > > > doing :)
> > 
> > we already have Peter's patches on v3.10-rc3 [1].
> > 
> > > I can spend few bandwidth on upstream work recently, I may have more
> > > bandwidth after June 15th.
> > > 
> > > Currently, we still have no conclusion for chipidea core driver's coming
> > > work, like Device tree support, how to identify if the controller is OTG
> > > supported.
> > 
> > Yes, the next important step is getting the of propertys "dr_mode" and
> > "phy_type" properly used in the chipidea core.
> > 
> > [1] http://git.pengutronix.de/?p=mgr/linux.git;a=summary ->
> > v3.10/topic/usb-peterchen
> 
> Is anyone planning to work on this stuff and start pushing it mainline or is 
> this effort stalled completely? What is it that's missing before these can be 
> applied?

AFAIK the latest commit to that work is:

http://permalink.gmane.org/gmane.linux.usb.general/88121

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-21 12:22           ` Michael Grzeschik
@ 2013-06-21 12:56             ` Marek Vasut
  2013-06-22  2:33               ` Marek Vasut
  0 siblings, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-06-21 12:56 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Michael Grzeschik,

> Hi Marek,
> 
> On Fri, Jun 21, 2013 at 01:26:10PM +0200, Marek Vasut wrote:
> > Hi,
> > 
> > > Hi,
> > > 
> > > On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
> > > > > Indeed, I've been using the patchset "Add tested id switch and vbus
> > > > > connect detect support for Chipidea" from Peter for quite some time
> > > > > on top of 3.9 and it works like a charm for the gadget mode on an
> > > > > MX28 platform.
> > > > > 
> > > > > BTW, Peter, I've seen that these patches are still not merged in
> > > > > 3.10, is there a reason for that? do you plan on sending a version
> > > > > rebased on top of 3.10 some time in the future? I tried to do the
> > > > > rebasing myself, but the chipidea driver seems to have changed
> > > > > quite heavily, which makes the process quite difficult when you
> > > > > don't know what you're doing :)
> > > 
> > > we already have Peter's patches on v3.10-rc3 [1].
> > > 
> > > > I can spend few bandwidth on upstream work recently, I may have more
> > > > bandwidth after June 15th.
> > > > 
> > > > Currently, we still have no conclusion for chipidea core driver's
> > > > coming work, like Device tree support, how to identify if the
> > > > controller is OTG supported.
> > > 
> > > Yes, the next important step is getting the of propertys "dr_mode" and
> > > "phy_type" properly used in the chipidea core.
> > > 
> > > [1] http://git.pengutronix.de/?p=mgr/linux.git;a=summary ->
> > > v3.10/topic/usb-peterchen
> > 
> > Is anyone planning to work on this stuff and start pushing it mainline or
> > is this effort stalled completely? What is it that's missing before
> > these can be applied?
> 
> AFAIK the latest commit to that work is:
> 
> http://permalink.gmane.org/gmane.linux.usb.general/88121

Cool, so it seems Peter is back at it. Thanks

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-21 12:56             ` Marek Vasut
@ 2013-06-22  2:33               ` Marek Vasut
  2013-06-22  8:28                 ` Chen Peter-B29397
  0 siblings, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-06-22  2:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> Dear Michael Grzeschik,
> 
> > Hi Marek,
> > 
> > On Fri, Jun 21, 2013 at 01:26:10PM +0200, Marek Vasut wrote:
> > > Hi,
> > > 
> > > > Hi,
> > > > 
> > > > On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
> > > > > > Indeed, I've been using the patchset "Add tested id switch and
> > > > > > vbus connect detect support for Chipidea" from Peter for quite
> > > > > > some time on top of 3.9 and it works like a charm for the gadget
> > > > > > mode on an MX28 platform.
> > > > > > 
> > > > > > BTW, Peter, I've seen that these patches are still not merged in
> > > > > > 3.10, is there a reason for that? do you plan on sending a
> > > > > > version rebased on top of 3.10 some time in the future? I tried
> > > > > > to do the rebasing myself, but the chipidea driver seems to have
> > > > > > changed quite heavily, which makes the process quite difficult
> > > > > > when you don't know what you're doing :)
> > > > 
> > > > we already have Peter's patches on v3.10-rc3 [1].
> > > > 
> > > > > I can spend few bandwidth on upstream work recently, I may have
> > > > > more bandwidth after June 15th.
> > > > > 
> > > > > Currently, we still have no conclusion for chipidea core driver's
> > > > > coming work, like Device tree support, how to identify if the
> > > > > controller is OTG supported.
> > > > 
> > > > Yes, the next important step is getting the of propertys "dr_mode"
> > > > and "phy_type" properly used in the chipidea core.
> > > > 
> > > > [1] http://git.pengutronix.de/?p=mgr/linux.git;a=summary ->
> > > > v3.10/topic/usb-peterchen
> > > 
> > > Is anyone planning to work on this stuff and start pushing it mainline
> > > or is this effort stalled completely? What is it that's missing before
> > > these can be applied?
> > 
> > AFAIK the latest commit to that work is:
> > 
> > http://permalink.gmane.org/gmane.linux.usb.general/88121
> 
> Cool, so it seems Peter is back at it. Thanks

Peter, I dunno if you are already aware of it, but the USB peripheral mode hangs 
on MX233. It's easy to replicate for example if you try to run CDC ethernet over 
the USB peripheral mode, then telnet into the board and run "dmesg" . This will 
trigger a "larger" data transfer which will make the UDC driver hang. This 
doesn't happen on MX28 so it must be some MX233-specific thing.

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-22  2:33               ` Marek Vasut
@ 2013-06-22  8:28                 ` Chen Peter-B29397
  2013-06-22 13:29                   ` Marek Vasut
  0 siblings, 1 reply; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-06-22  8:28 UTC (permalink / raw)
  To: linux-arm-kernel

 
> 
> Peter, I dunno if you are already aware of it, but the USB peripheral
> mode hangs
> on MX233. It's easy to replicate for example if you try to run CDC
> ethernet over
> the USB peripheral mode, then telnet into the board and run "dmesg" .
> This will
> trigger a "larger" data transfer which will make the UDC driver hang.
> This
> doesn't happen on MX28 so it must be some MX233-specific thing.
> 

Marek, Have you tried below?

http://marc.info/?l=linux-usb&m=136537318510847&w=2

It may not the USB itself problem, the mx23's usb is almost
the same with mx28's.

Best regards,
Peter 

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-22  8:28                 ` Chen Peter-B29397
@ 2013-06-22 13:29                   ` Marek Vasut
  2013-06-24  1:37                     ` Chen Peter-B29397
  0 siblings, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-06-22 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

> > Peter, I dunno if you are already aware of it, but the USB peripheral
> > mode hangs
> > on MX233. It's easy to replicate for example if you try to run CDC
> > ethernet over
> > the USB peripheral mode, then telnet into the board and run "dmesg" .
> > This will
> > trigger a "larger" data transfer which will make the UDC driver hang.
> > This
> > doesn't happen on MX28 so it must be some MX233-specific thing.
> 
> Marek, Have you tried below?
> 
> http://marc.info/?l=linux-usb&m=136537318510847&w=2
> 
> It may not the USB itself problem, the mx23's usb is almost
> the same with mx28's.

This also happens on a different MX23-based board for me. This other board I 
tried has mDDR DRAM and the DRAM is operating correctly. The 96MHz thing people 
complained about in the Olimex forum is resolved now. 

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-22 13:29                   ` Marek Vasut
@ 2013-06-24  1:37                     ` Chen Peter-B29397
  2013-06-24  7:08                       ` Shawn Guo
                                         ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-06-24  1:37 UTC (permalink / raw)
  To: linux-arm-kernel

 
> Hi Peter,
> 
> > > Peter, I dunno if you are already aware of it, but the USB peripheral
> > > mode hangs
> > > on MX233. It's easy to replicate for example if you try to run CDC
> > > ethernet over
> > > the USB peripheral mode, then telnet into the board and run "dmesg" .
> > > This will
> > > trigger a "larger" data transfer which will make the UDC driver hang.
> > > This
> > > doesn't happen on MX28 so it must be some MX233-specific thing.
> >
> > Marek, Have you tried below?
> >
> > http://marc.info/?l=linux-usb&m=136537318510847&w=2
> >
> > It may not the USB itself problem, the mx23's usb is almost
> > the same with mx28's.
> 
> This also happens on a different MX23-based board for me. This other
> board I
> tried has mDDR DRAM and the DRAM is operating correctly. The 96MHz thing
> people
> complained about in the Olimex forum is resolved now.
> 
 
Add shawn.

Marek, have you tried mx23 evk?

Shawn, marek reported the udc function at mx23 works abnormal, but it works
good at mx28. Have you tried mx23 udc recently?

Best regards,
Peter

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-24  1:37                     ` Chen Peter-B29397
@ 2013-06-24  7:08                       ` Shawn Guo
  2013-06-24 13:51                       ` Marek Vasut
  2013-07-09 15:07                       ` Marek Vasut
  2 siblings, 0 replies; 36+ messages in thread
From: Shawn Guo @ 2013-06-24  7:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 24, 2013 at 01:37:59AM +0000, Chen Peter-B29397 wrote:
> Add shawn.
> 
> Marek, have you tried mx23 evk?
> 
> Shawn, marek reported the udc function at mx23 works abnormal, but it works
> good at mx28. Have you tried mx23 udc recently?
> 
Sorry, I never tried usb on my imx23-evk due to some setup problem on
the board.

Shawn

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-24  1:37                     ` Chen Peter-B29397
  2013-06-24  7:08                       ` Shawn Guo
@ 2013-06-24 13:51                       ` Marek Vasut
  2013-06-25  1:48                         ` Chen Peter-B29397
  2013-06-25 14:23                         ` Fabio Estevam
  2013-07-09 15:07                       ` Marek Vasut
  2 siblings, 2 replies; 36+ messages in thread
From: Marek Vasut @ 2013-06-24 13:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Peter,

> > Hi Peter,
> > 
> > > > Peter, I dunno if you are already aware of it, but the USB peripheral
> > > > mode hangs
> > > > on MX233. It's easy to replicate for example if you try to run CDC
> > > > ethernet over
> > > > the USB peripheral mode, then telnet into the board and run "dmesg" .
> > > > This will
> > > > trigger a "larger" data transfer which will make the UDC driver hang.
> > > > This
> > > > doesn't happen on MX28 so it must be some MX233-specific thing.
> > > 
> > > Marek, Have you tried below?
> > > 
> > > http://marc.info/?l=linux-usb&m=136537318510847&w=2
> > > 
> > > It may not the USB itself problem, the mx23's usb is almost
> > > the same with mx28's.
> > 
> > This also happens on a different MX23-based board for me. This other
> > board I
> > tried has mDDR DRAM and the DRAM is operating correctly. The 96MHz thing
> > people
> > complained about in the Olimex forum is resolved now.
> 
> Add shawn.
> 
> Marek, have you tried mx23 evk?

No, I don't have this one available right now. I tried both MX23 Olinuxino maxi 
(I just mutilated the board so that I cut traces to the USB devices on the board 
and routed out USB gadget connector) and a custom MX23 board.

Note that both have working USB peripheral mode in U-Boot too, but the driver in 
U-Boot is very minimalistic.

> Shawn, marek reported the udc function at mx23 works abnormal, but it works
> good at mx28. Have you tried mx23 udc recently?

Fabio, can you possibly test on MX23EVK please?

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-24 13:51                       ` Marek Vasut
@ 2013-06-25  1:48                         ` Chen Peter-B29397
  2013-06-25 18:40                           ` Marek Vasut
  2013-06-27 13:49                           ` Marek Vasut
  2013-06-25 14:23                         ` Fabio Estevam
  1 sibling, 2 replies; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-06-25  1:48 UTC (permalink / raw)
  To: linux-arm-kernel


 
> 
> No, I don't have this one available right now. I tried both MX23
> Olinuxino maxi
> (I just mutilated the board so that I cut traces to the USB devices on
> the board
> and routed out USB gadget connector) and a custom MX23 board.
> 
> Note that both have working USB peripheral mode in U-Boot too, but the
> driver in
> U-Boot is very minimalistic.
 
You mean, the larger data transfer with USB peripheral mode is ok at u-boot?
but it can't work at Linux Kernel?

Best regards,
Peter

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-24 13:51                       ` Marek Vasut
  2013-06-25  1:48                         ` Chen Peter-B29397
@ 2013-06-25 14:23                         ` Fabio Estevam
  2013-06-25 15:39                           ` Fabio Estevam
  1 sibling, 1 reply; 36+ messages in thread
From: Fabio Estevam @ 2013-06-25 14:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 24, 2013 at 10:51 AM, Marek Vasut <marex@denx.de> wrote:

> Fabio, can you possibly test on MX23EVK please?

I never used USB gadget with chipidea driver.

Could you please explain what are the changes I need to do in the dts
file (I want to try on mx28evk first) and defconfig in order to be
able to test gadget? I am running today's linux-next.

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-25 14:23                         ` Fabio Estevam
@ 2013-06-25 15:39                           ` Fabio Estevam
  2013-06-25 18:42                             ` Marek Vasut
  0 siblings, 1 reply; 36+ messages in thread
From: Fabio Estevam @ 2013-06-25 15:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 25, 2013 at 11:23 AM, Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Jun 24, 2013 at 10:51 AM, Marek Vasut <marex@denx.de> wrote:
>
>> Fabio, can you possibly test on MX23EVK please?
>
> I never used USB gadget with chipidea driver.
>
> Could you please explain what are the changes I need to do in the dts
> file (I want to try on mx28evk first) and defconfig in order to be
> able to test gadget? I am running today's linux-next.

I tried the following:

--- a/arch/arm/boot/dts/imx28-evk.dts
+++ b/arch/arm/boot/dts/imx28-evk.dts
@@ -239,7 +239,7 @@

        ahb at 80080000 {
                usb0: usb at 80080000 {
-                       vbus-supply = <&reg_usb0_vbus>;
+                       dr_mode = "peripheral";
                        status = "okay";
                };

,but I get:

[    1.495725] usbcore: registered new interface driver asix
[    1.501516] usbcore: registered new interface driver ax88179_178a
[    1.508139] usbcore: registered new interface driver cdc_ether
[    1.514463] usbcore: registered new interface driver smsc95xx
[    1.520743] usbcore: registered new interface driver net1080
[    1.526920] usbcore: registered new interface driver cdc_subset
[    1.533254] usbcore: registered new interface driver zaurus
[    1.539587] usbcore: registered new interface driver cdc_ncm
[    1.545432] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.552494] usbcore: registered new interface driver usb-storage
[    1.565640] ci_hdrc ci_hdrc.0: can't start gadget role
[    1.577682] ci_hdrc ci_hdrc.1: can't start gadget role
[    1.588304] ci_hdrc ci_hdrc.2: can't start gadget role
[    1.598888] ci_hdrc ci_hdrc.3: can't start gadget role
[    1.609508] ci_hdrc ci_hdrc.4: can't start gadget role
[    1.620144] ci_hdrc ci_hdrc.5: can't start gadget role
[    1.631028] ci_hdrc ci_hdrc.6: can't start gadget role
[    1.642563] ci_hdrc ci_hdrc.7: can't start gadget role
[    1.653530] ci_hdrc ci_hdrc.8: can't start gadget role
[    1.664744] ci_hdrc ci_hdrc.9: can't start gadget role
[    1.676085] ci_hdrc ci_hdrc.10: can't start gadget role
[    1.687121] ci_hdrc ci_hdrc.11: can't start gadget role
[    1.698309] ci_hdrc ci_hdrc.12: can't start gadget role
[    1.709442] ci_hdrc ci_hdrc.13: can't start gadget role
[    1.720879] ci_hdrc ci_hdrc.14: can't start gadget role
[    1.732216] ci_hdrc ci_hdrc.15: can't start gadget role
[    1.743660] ci_hdrc ci_hdrc.16: can't start gadget role
[    1.755289] ci_hdrc ci_hdrc.17: can't start gadget role
[    1.766821] ci_hdrc ci_hdrc.18: can't start gadget role
[    1.778642] ci_hdrc ci_hdrc.19: can't start gadget role
[    1.790227] ci_hdrc ci_hdrc.20: can't start gadget role
[    1.802036] ci_hdrc ci_hdrc.21: can't start gadget role
[    1.813879] ci_hdrc ci_hdrc.22: can't start gadget role
[    1.825921] ci_hdrc ci_hdrc.23: can't start gadget role

... and system hangs here.

Any suggestions as to how to get gadget working?

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-25  1:48                         ` Chen Peter-B29397
@ 2013-06-25 18:40                           ` Marek Vasut
  2013-06-27 13:49                           ` Marek Vasut
  1 sibling, 0 replies; 36+ messages in thread
From: Marek Vasut @ 2013-06-25 18:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

> > No, I don't have this one available right now. I tried both MX23
> > Olinuxino maxi
> > (I just mutilated the board so that I cut traces to the USB devices on
> > the board
> > and routed out USB gadget connector) and a custom MX23 board.
> > 
> > Note that both have working USB peripheral mode in U-Boot too, but the
> > driver in
> > U-Boot is very minimalistic.
> 
> You mean, the larger data transfer with USB peripheral mode is ok at
> u-boot? but it can't work at Linux Kernel?

Yes, but the U-Boot driver is completely different beast.

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-25 15:39                           ` Fabio Estevam
@ 2013-06-25 18:42                             ` Marek Vasut
  0 siblings, 0 replies; 36+ messages in thread
From: Marek Vasut @ 2013-06-25 18:42 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Fabio Estevam,

> On Tue, Jun 25, 2013 at 11:23 AM, Fabio Estevam <festevam@gmail.com> wrote:
> > On Mon, Jun 24, 2013 at 10:51 AM, Marek Vasut <marex@denx.de> wrote:
> >> Fabio, can you possibly test on MX23EVK please?
> > 
> > I never used USB gadget with chipidea driver.
> > 
> > Could you please explain what are the changes I need to do in the dts
> > file (I want to try on mx28evk first) and defconfig in order to be
> > able to test gadget? I am running today's linux-next.
> 
> I tried the following:

Merge [1] into your tree, enable USB peripheral mode for CI13xxx, enable 
ethernet gadget, adjust your DT file like this for the usb0 node:

usb0: usb at 80080000 {
        dr_mode = "peripheral";
        status = "okay";
};

And you should have gadget working.

[1] 
http://git.pengutronix.de/?p=mgr/linux.git;a=shortlog;h=refs/heads/v3.10/topic/usb-
peterchen

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-25  1:48                         ` Chen Peter-B29397
  2013-06-25 18:40                           ` Marek Vasut
@ 2013-06-27 13:49                           ` Marek Vasut
  2013-06-28  6:48                             ` Chen Peter-B29397
  1 sibling, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-06-27 13:49 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

> > No, I don't have this one available right now. I tried both MX23
> > Olinuxino maxi
> > (I just mutilated the board so that I cut traces to the USB devices on
> > the board
> > and routed out USB gadget connector) and a custom MX23 board.
> > 
> > Note that both have working USB peripheral mode in U-Boot too, but the
> > driver in
> > U-Boot is very minimalistic.
> 
> You mean, the larger data transfer with USB peripheral mode is ok at
> u-boot? but it can't work at Linux Kernel?

I stumbled across one more problem with the patches:

- I use OTG on MX28
- I configured the USB ID pin
- I set the dr_mode to "otg"
(so far so good)
- I use the port in HOST mode by plugging in a USB pendrive over the OTG-capable 
reduction ; this works OK
- I disconnect the reduction and connect it to the computer ; here I get 
"timeout waiting for 00000800 in 11".

This means the BSV bit in OTGSC register wasn't unset.

Interestingly enough, transition the other way around (first use in gadget mode 
then in host mode) works fine, but if I do host mode -> gadget mode, I get the 
timeout. Do you have any hint for me?

btw. what is the plan about cleaning up and upstreaming all these patches we 
have here? Is anyone working on it? I'd hate to stomp on anyones' efforts,but 
I'd also like to see this mess sorted out.

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-27 13:49                           ` Marek Vasut
@ 2013-06-28  6:48                             ` Chen Peter-B29397
  2013-06-28  9:42                               ` Marek Vasut
  0 siblings, 1 reply; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-06-28  6:48 UTC (permalink / raw)
  To: linux-arm-kernel

 
> - I use the port in HOST mode by plugging in a USB pendrive over the OTG-
> capable
> reduction ; this works OK
> - I disconnect the reduction and connect it to the computer ; here I get
> "timeout waiting for 00000800 in 11".
> 
> This means the BSV bit in OTGSC register wasn't unset.
> 
> Interestingly enough, transition the other way around (first use in
> gadget mode
> then in host mode) works fine, but if I do host mode -> gadget mode, I
> get the
> timeout. Do you have any hint for me?
> 

It means your OTG VBUS does not lower than BSV (B SESSION VALID, 0.8v) after
plugging out Micro-B-TO-A cable. Two possible reasons:

1. You have not gpio control for vbus toggle when role switches.
2. Your hardware has some problems that the vbus can't lower than 0.8v.

> btw. what is the plan about cleaning up and upstreaming all these patches
> we
> have here? Is anyone working on it? I'd hate to stomp on anyones'
> efforts,but
> I'd also like to see this mess sorted out.

We had something un-decided before, now, things almost are cleared.
But I am a little busy recently, I hope I can begin to work on it
from next week.

Best regards,
Peter
 

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-28  6:48                             ` Chen Peter-B29397
@ 2013-06-28  9:42                               ` Marek Vasut
  2013-06-28 10:46                                 ` Chen Peter-B29397
  0 siblings, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-06-28  9:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

> > - I use the port in HOST mode by plugging in a USB pendrive over the OTG-
> > capable
> > reduction ; this works OK
> > - I disconnect the reduction and connect it to the computer ; here I get
> > "timeout waiting for 00000800 in 11".
> > 
> > This means the BSV bit in OTGSC register wasn't unset.
> > 
> > Interestingly enough, transition the other way around (first use in
> > gadget mode
> > then in host mode) works fine, but if I do host mode -> gadget mode, I
> > get the
> > timeout. Do you have any hint for me?
> 
> It means your OTG VBUS does not lower than BSV (B SESSION VALID, 0.8v)
> after plugging out Micro-B-TO-A cable.

Where can I measure this?

> Two possible reasons:
> 
> 1. You have not gpio control for vbus toggle when role switches.

This works well.

> 2. Your hardware has some problems that the vbus can't lower than 0.8v.

How can I check that?

> > btw. what is the plan about cleaning up and upstreaming all these patches
> > we
> > have here? Is anyone working on it? I'd hate to stomp on anyones'
> > efforts,but
> > I'd also like to see this mess sorted out.
> 
> We had something un-decided before, now, things almost are cleared.
> But I am a little busy recently, I hope I can begin to work on it
> from next week.

Ok then, I won't interfere.

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-28  9:42                               ` Marek Vasut
@ 2013-06-28 10:46                                 ` Chen Peter-B29397
  2013-06-28 11:56                                   ` Marek Vasut
  2013-07-07  1:10                                   ` Marek Vasut
  0 siblings, 2 replies; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-06-28 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

 
> 
> Where can I measure this?
> 
> > Two possible reasons:
> >
> > 1. You have not gpio control for vbus toggle when role switches.
> 
> This works well.
> 
> > 2. Your hardware has some problems that the vbus can't lower than 0.8v.
> 
> How can I check that?
> 

Just measure the voltage of your otg vbus pin.


Best regards,
Peter

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-28 10:46                                 ` Chen Peter-B29397
@ 2013-06-28 11:56                                   ` Marek Vasut
  2013-06-28 13:04                                     ` Chen Peter-B29397
  2013-07-07  1:10                                   ` Marek Vasut
  1 sibling, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-06-28 11:56 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Chen Peter-B29397,

> > Where can I measure this?
> > 
> > > Two possible reasons:
> > > 
> > > 1. You have not gpio control for vbus toggle when role switches.
> > 
> > This works well.
> > 
> > > 2. Your hardware has some problems that the vbus can't lower than 0.8v.
> > 
> > How can I check that?
> 
> Just measure the voltage of your otg vbus pin.

Ok, I see it's 2.25 volts after I disconnect the microB-A thing . I should see 
0.8V constantly with nothing connected on the port?

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-28 11:56                                   ` Marek Vasut
@ 2013-06-28 13:04                                     ` Chen Peter-B29397
  2013-06-28 13:11                                       ` Fabio Estevam
  0 siblings, 1 reply; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-06-28 13:04 UTC (permalink / raw)
  To: linux-arm-kernel


 
> >
> > Just measure the voltage of your otg vbus pin.
> 
> Ok, I see it's 2.25 volts after I disconnect the microB-A thing . I
> should see
> 0.8V constantly with nothing connected on the port?
> 

You should see the voltage of vbus pin is less than 0.8v when
nothing is connected, we use B_SESSION_VALID (0.8v) to judge
it is connected or not.

You get 2.25 all the time or it is discharged very slowly?

Best regards,
Peter

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-28 13:04                                     ` Chen Peter-B29397
@ 2013-06-28 13:11                                       ` Fabio Estevam
  2013-07-01  2:06                                         ` Chen Peter-B29397
  0 siblings, 1 reply; 36+ messages in thread
From: Fabio Estevam @ 2013-06-28 13:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 28, 2013 at 10:04 AM, Chen Peter-B29397
<B29397@freescale.com> wrote:
>
>
>> >
>> > Just measure the voltage of your otg vbus pin.
>>
>> Ok, I see it's 2.25 volts after I disconnect the microB-A thing . I
>> should see
>> 0.8V constantly with nothing connected on the port?
>>
>
> You should see the voltage of vbus pin is less than 0.8v when
> nothing is connected, we use B_SESSION_VALID (0.8v) to judge
> it is connected or not.
>
> You get 2.25 all the time or it is discharged very slowly?

On my mx28evk it discharges very very slowly. Any hints about it?

Thanks

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-28 13:11                                       ` Fabio Estevam
@ 2013-07-01  2:06                                         ` Chen Peter-B29397
  0 siblings, 0 replies; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-07-01  2:06 UTC (permalink / raw)
  To: linux-arm-kernel

 
> >
> > You should see the voltage of vbus pin is less than 0.8v when
> > nothing is connected, we use B_SESSION_VALID (0.8v) to judge
> > it is connected or not.
> >
> > You get 2.25 all the time or it is discharged very slowly?
> 
> On my mx28evk it discharges very very slowly. Any hints about it?
> 

Due to some hardware limitations, the dual-role functions at OTG port
can't be used with host 1 port at the same time at mx28evk. Please follow
below to use USB ports at mx28evk.

When testing usb OTG port, please switch VDD 5V SOURCE SELECT to USB 5V
When testing usb host1 port, please switch VDD 5V SOURCE SELECT to WALL 5V

Best regards,
Peter

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-28 10:46                                 ` Chen Peter-B29397
  2013-06-28 11:56                                   ` Marek Vasut
@ 2013-07-07  1:10                                   ` Marek Vasut
  2013-07-08  1:21                                     ` Chen Peter-B29397
  1 sibling, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-07-07  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

> > Where can I measure this?
> > 
> > > Two possible reasons:
> > > 
> > > 1. You have not gpio control for vbus toggle when role switches.
> > 
> > This works well.
> > 
> > > 2. Your hardware has some problems that the vbus can't lower than 0.8v.
> > 
> > How can I check that?
> 
> Just measure the voltage of your otg vbus pin.

It's 2.5 volt for me. What am I supposed to observe happening there?

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-07-07  1:10                                   ` Marek Vasut
@ 2013-07-08  1:21                                     ` Chen Peter-B29397
  2013-07-08 20:56                                       ` Marek Vasut
  0 siblings, 1 reply; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-07-08  1:21 UTC (permalink / raw)
  To: linux-arm-kernel

 

> -----Original Message-----
> From: Marek Vasut [mailto:marex at denx.de]
> Sent: Sunday, July 07, 2013 9:10 AM
> To: Chen Peter-B29397
> Cc: shawn.guo at linaro.org; Michael Grzeschik; maxime.ripard at free-
> electrons.com; Hector Palacios; linux-usb at vger.kernel.org;
> s.hauer at pengutronix.de; alexander.shishkin at linux.intel.com; Estevam
> Fabio-R49496; Marc Kleine-Budde; m.grzeschik at pengutronix.de; linux-arm-
> kernel at lists.infradead.org
> Subject: Re: Chipidea usb otg support for IMX/MXS (device functionality)
> 
> Hi Peter,
> 
> > > Where can I measure this?
> > >
> > > > Two possible reasons:
> > > >
> > > > 1. You have not gpio control for vbus toggle when role switches.
> > >
> > > This works well.
> > >
> > > > 2. Your hardware has some problems that the vbus can't lower than
> 0.8v.
> > >
> > > How can I check that?
> >
> > Just measure the voltage of your otg vbus pin.
> 
> It's 2.5 volt for me. What am I supposed to observe happening there?
> 

http://marc.info/?l=linux-usb&m=137242465920952&w=2


Best regards,
Peter

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-07-08  1:21                                     ` Chen Peter-B29397
@ 2013-07-08 20:56                                       ` Marek Vasut
  2013-07-09  1:05                                         ` Chen Peter-B29397
  0 siblings, 1 reply; 36+ messages in thread
From: Marek Vasut @ 2013-07-08 20:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

> > -----Original Message-----
> > From: Marek Vasut [mailto:marex at denx.de]
> > Sent: Sunday, July 07, 2013 9:10 AM
> > To: Chen Peter-B29397
> > Cc: shawn.guo at linaro.org; Michael Grzeschik; maxime.ripard at free-
> > electrons.com; Hector Palacios; linux-usb at vger.kernel.org;
> > s.hauer at pengutronix.de; alexander.shishkin at linux.intel.com; Estevam
> > Fabio-R49496; Marc Kleine-Budde; m.grzeschik at pengutronix.de; linux-arm-
> > kernel at lists.infradead.org
> > Subject: Re: Chipidea usb otg support for IMX/MXS (device functionality)
> > 
> > Hi Peter,
> > 
> > > > Where can I measure this?
> > > > 
> > > > > Two possible reasons:
> > > > > 
> > > > > 1. You have not gpio control for vbus toggle when role switches.
> > > > 
> > > > This works well.
> > > > 
> > > > > 2. Your hardware has some problems that the vbus can't lower than
> > 
> > 0.8v.
> > 
> > > > How can I check that?
> > > 
> > > Just measure the voltage of your otg vbus pin.
> > 
> > It's 2.5 volt for me. What am I supposed to observe happening there?
> 
> http://marc.info/?l=linux-usb&m=137242465920952&w=2

Dang, must have missed that one, sorry.

The VBUS is slowly discharging from around 5V to 2.5V , what does that tell me?

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-07-08 20:56                                       ` Marek Vasut
@ 2013-07-09  1:05                                         ` Chen Peter-B29397
  2013-07-09 10:38                                           ` Marek Vasut
  0 siblings, 1 reply; 36+ messages in thread
From: Chen Peter-B29397 @ 2013-07-09  1:05 UTC (permalink / raw)
  To: linux-arm-kernel

 
> 
> > > -----Original Message-----
> > > From: Marek Vasut [mailto:marex at denx.de]
> > > Sent: Sunday, July 07, 2013 9:10 AM
> > > To: Chen Peter-B29397
> > > Cc: shawn.guo at linaro.org; Michael Grzeschik; maxime.ripard at free-
> > > electrons.com; Hector Palacios; linux-usb at vger.kernel.org;
> > > s.hauer at pengutronix.de; alexander.shishkin at linux.intel.com; Estevam
> > > Fabio-R49496; Marc Kleine-Budde; m.grzeschik at pengutronix.de; linux-
> arm-
> > > kernel at lists.infradead.org
> > > Subject: Re: Chipidea usb otg support for IMX/MXS (device
> functionality)
> > >
> > > Hi Peter,
> > >
> > > > > Where can I measure this?
> > > > >
> > > > > > Two possible reasons:
> > > > > >
> > > > > > 1. You have not gpio control for vbus toggle when role switches.
> > > > >
> > > > > This works well.
> > > > >
> > > > > > 2. Your hardware has some problems that the vbus can't lower
> than
> > >
> > > 0.8v.
> > >
> > > > > How can I check that?
> > > >
> > > > Just measure the voltage of your otg vbus pin.
> > >
> > > It's 2.5 volt for me. What am I supposed to observe happening there?
> >
> > http://marc.info/?l=linux-usb&m=137242465920952&w=2
> 
> Dang, must have missed that one, sorry.
> 
> The VBUS is slowly discharging from around 5V to 2.5V , what does that
> tell me?
> 

It needs to check your hardware, it is probably there is a high capacitance at
vbus pin. Besides, the vbus should be lower than 0.8v if it is disconnected from
pc.

Best regards,
Peter

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-07-09  1:05                                         ` Chen Peter-B29397
@ 2013-07-09 10:38                                           ` Marek Vasut
  0 siblings, 0 replies; 36+ messages in thread
From: Marek Vasut @ 2013-07-09 10:38 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,
[...]

> 
> It needs to check your hardware, it is probably there is a high capacitance
> at vbus pin. Besides, the vbus should be lower than 0.8v if it is
> disconnected from pc.

I just wonder why I can no longer use device mode only after I plug in the 
adaptor for host device. Before that, I can plug in the device mode cable from 
PC all I want and this works. Then I plug in the host adaptor, that works as 
well , but if I plug in the device cable, this works no longer.

I rather suspect it might be something going on in the driver that's not right. 
I will check the hardware too, thanks.

Best regards,
Marek Vasut

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

* Chipidea usb otg support for IMX/MXS (device functionality)
  2013-06-24  1:37                     ` Chen Peter-B29397
  2013-06-24  7:08                       ` Shawn Guo
  2013-06-24 13:51                       ` Marek Vasut
@ 2013-07-09 15:07                       ` Marek Vasut
  2 siblings, 0 replies; 36+ messages in thread
From: Marek Vasut @ 2013-07-09 15:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

> > Hi Peter,
> > 
> > > > Peter, I dunno if you are already aware of it, but the USB peripheral
> > > > mode hangs
> > > > on MX233. It's easy to replicate for example if you try to run CDC
> > > > ethernet over
> > > > the USB peripheral mode, then telnet into the board and run "dmesg" .
> > > > This will
> > > > trigger a "larger" data transfer which will make the UDC driver hang.
> > > > This
> > > > doesn't happen on MX28 so it must be some MX233-specific thing.
> > > 
> > > Marek, Have you tried below?
> > > 
> > > http://marc.info/?l=linux-usb&m=136537318510847&w=2
> > > 
> > > It may not the USB itself problem, the mx23's usb is almost
> > > the same with mx28's.
> > 
> > This also happens on a different MX23-based board for me. This other
> > board I
> > tried has mDDR DRAM and the DRAM is operating correctly. The 96MHz thing
> > people
> > complained about in the Olimex forum is resolved now.
> 
> Add shawn.
> 
> Marek, have you tried mx23 evk?

Ok, I just tried the MX23EVK. Running "dmesg" via telnet connection resulted in 
a hang of the USB driver (likely), but since I have serial connection to the 
board, I was able to verify the board itself didn't crash. I can still operate 
the board via serial console, it's only the USB in peripheral mode ethernet that 
is hung.

> Shawn, marek reported the udc function at mx23 works abnormal, but it works
> good at mx28. Have you tried mx23 udc recently?
> 
> Best regards,
> Peter

Best regards,
Marek Vasut

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

end of thread, other threads:[~2013-07-09 15:07 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <51A5A808.2070803@digi.com>
     [not found] ` <F281D0F91ED19E4D8E63A7504E8A649803E8A3F3@039-SN2MPN1-021.039d.mgd.msft.net>
2013-05-29  7:50   ` Chipidea usb otg support for IMX/MXS (device functionality) maxime.ripard at free-electrons.com
2013-05-29  8:07     ` Chen Peter-B29397
2013-05-29 10:13       ` Michael Grzeschik
2013-05-29 12:19         ` maxime.ripard at free-electrons.com
2013-05-29 12:41           ` Michael Grzeschik
2013-05-30 13:53             ` maxime.ripard at free-electrons.com
2013-06-21 11:26         ` Marek Vasut
2013-06-21 12:22           ` Michael Grzeschik
2013-06-21 12:56             ` Marek Vasut
2013-06-22  2:33               ` Marek Vasut
2013-06-22  8:28                 ` Chen Peter-B29397
2013-06-22 13:29                   ` Marek Vasut
2013-06-24  1:37                     ` Chen Peter-B29397
2013-06-24  7:08                       ` Shawn Guo
2013-06-24 13:51                       ` Marek Vasut
2013-06-25  1:48                         ` Chen Peter-B29397
2013-06-25 18:40                           ` Marek Vasut
2013-06-27 13:49                           ` Marek Vasut
2013-06-28  6:48                             ` Chen Peter-B29397
2013-06-28  9:42                               ` Marek Vasut
2013-06-28 10:46                                 ` Chen Peter-B29397
2013-06-28 11:56                                   ` Marek Vasut
2013-06-28 13:04                                     ` Chen Peter-B29397
2013-06-28 13:11                                       ` Fabio Estevam
2013-07-01  2:06                                         ` Chen Peter-B29397
2013-07-07  1:10                                   ` Marek Vasut
2013-07-08  1:21                                     ` Chen Peter-B29397
2013-07-08 20:56                                       ` Marek Vasut
2013-07-09  1:05                                         ` Chen Peter-B29397
2013-07-09 10:38                                           ` Marek Vasut
2013-06-25 14:23                         ` Fabio Estevam
2013-06-25 15:39                           ` Fabio Estevam
2013-06-25 18:42                             ` Marek Vasut
2013-07-09 15:07                       ` Marek Vasut
2013-05-30 16:17     ` Hector Palacios
2013-06-07  9:37       ` maxime.ripard at free-electrons.com

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.