Chipidea usb otg support for IMX/MXS (device functionality)
Subsystems (2)
Hi,
Quoted 9 lines · On Wed, May 29, 2013 at 07:11:30AM +0000, Chen Peter-B29397 wrote:
Quoted 8 lines
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?
Quoted 4 lines
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
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
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Quoted 8 lines
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.
Quoted 6 lines
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
Hi,
Quoted 8 lines · On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
Quoted 8 lines
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.
Quoted 6 lines
Quoted 6 lines
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].
Quoted 5 lines
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
Signature · 4 lines
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 |
Hi Michael,
Quoted 11 lines · Michael Grzeschik
Hi,
Quoted 8 lines · On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
Quoted 8 lines
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.
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
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!
Quoted 8 lines
Quoted 5 lines
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
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Quoted 31 lines · maxime.ripard at free-electrons.com
Hi Michael,
Quoted 11 lines · Michael Grzeschik
Hi,
Quoted 8 lines · On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
Quoted 8 lines
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.
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
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!
Quoted 6 lines
Quoted 5 lines
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.
Quoted 7 lines
Quoted 2 lines
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.
Signature · 4 lines
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 |
Hi Michael,
Quoted 3 lines · Michael Grzeschik
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
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Dear Maxime,
Quoted 22 lines · maxime.ripard at free-electrons.com
Hi,
Quoted 9 lines · On Wed, May 29, 2013 at 07:11:30AM +0000, Chen Peter-B29397 wrote:
Quoted 8 lines
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?Quoted 4 lines
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
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.
Quoted 5 lines
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
Hi Hector,
Quoted 25 lines · Hector Palacios
Dear Maxime,
Quoted 22 lines · maxime.ripard at free-electrons.com
Hi,
Quoted 9 lines · On Wed, May 29, 2013 at 07:11:30AM +0000, Chen Peter-B29397 wrote:
Quoted 8 lines
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?Quoted 4 lines
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
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.
Quoted 8 lines
Quoted 5 lines
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
Quoted 3 lines
I experimented the same and also a BUG [2] after cable reconnection. Despite those, I ran a simple test of serial, ethernet, and
mass_storagegadgets and they worked fine.
I never experienced the BUG you're mentionning, everything was working fine except the circular dependency.
Quoted 2 lines
I didn't use the new properties (
phy_type,dr_mode...) in the DT of my mx28 platform, did you?
Neither did I.
Maxime
Hi,
Quoted 24 lines
Hi,
Quoted 11 lines · On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
Quoted 11 lines
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].
Quoted 6 lines
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.
Quoted 5 lines
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
Hi Marek,
Quoted 29 lines · Marek Vasut
Hi,
Quoted 27 lines
Hi,
Quoted 11 lines · On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
Quoted 11 lines
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].
Quoted 6 lines
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.
Quoted 6 lines
Quoted 2 lines
[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
Signature · 4 lines
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 |
Dear Michael Grzeschik,
Quoted 35 lines
Hi Marek,
Quoted 32 lines · Marek Vasut
Hi,
Quoted 29 lines
Hi,
Quoted 11 lines · On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
Quoted 11 lines
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].
Quoted 6 lines
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
Quoted 7 lines
Quoted 3 lines
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:
Cool, so it seems Peter is back at it. Thanks
Best regards,
Marek Vasut
Hi,
Quoted 41 lines
Dear Michael Grzeschik,
Quoted 39 lines
Hi Marek,
Quoted 35 lines · Marek Vasut
Hi,
Quoted 24 lines
Hi,
Quoted 11 lines · On Wed, May 29, 2013 at 08:07:55AM +0000, Chen Peter-B29397 wrote:
Quoted 11 lines
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].
Quoted 6 lines
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.
Quoted 5 lines
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?
Quoted 5 lines
Quoted 3 lines
AFAIK the latest commit to that work is:
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
Quoted 12 lines
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
Hi Peter,
Quoted 10 lines
Quoted 9 lines
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.
Quoted 6 lines
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
Quoted 17 lines
Hi Peter,
Quoted 14 lines
Quoted 9 lines
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?
Quoted 9 lines
Quoted 2 lines
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
Quoted 7 lines · 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
Hello Peter,
Quoted 25 lines
Quoted 16 lines
Hi Peter,
Quoted 14 lines
Quoted 9 lines
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?
Quoted 8 lines
Quoted 2 lines
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.
Quoted 3 lines
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.
Quoted 2 lines
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
Quoted 9 lines
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.
Quoted 3 lines
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
Fabio Estevam
reviewerQuoted 1 line · Marek Vasut
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.
Fabio Estevam
reviewerQuoted 9 lines · Fabio Estevam
Quoted 1 line · Marek Vasut
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:
arch/arm/boot/dts/imx28-evk.dts +1 -1
@@ -239,7 +239,7 @@ ahb at 80080000 { usb0: usb at 80080000 { - vbus-supply = <®_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?
Hi Peter,
Quoted 6 lines
Quoted 6 lines
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.
Quoted 6 lines
Quoted 3 lines
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
Dear Fabio Estevam,
Quoted 11 lines · Fabio Estevam
Quoted 8 lines · Marek Vasut
Quoted 1 line
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
Hi Peter,
Quoted 6 lines
Quoted 6 lines
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.
Quoted 6 lines
Quoted 3 lines
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
Quoted 7 lines
- 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".
Quoted 8 lines
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.
Quoted 5 lines
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
Hi Peter,
Quoted 8 lines
Quoted 8 lines
- 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.
Quoted 8 lines
Quoted 5 lines
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?
Quoted 3 lines
Two possible reasons:
1. You have not gpio control for vbus toggle when role switches.
This works well.
Quoted 1 line
2. Your hardware has some problems that the vbus can't lower than 0.8v.
How can I check that?
Quoted 9 lines
Quoted 5 lines
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
Quoted 6 lines
Where can I measure this?
Quoted 2 lines
Two possible reasons:
Quoted 8 lines
Quoted 1 line
1. You have not gpio control for vbus toggle when role switches.
This works well.
Quoted 1 line
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
Dear Chen Peter-B29397,
Quoted 6 lines
Quoted 6 lines
Where can I measure this?
Quoted 3 lines
Two possible reasons:
1. You have not gpio control for vbus toggle when role switches.
Quoted 7 lines
Quoted 5 lines
This works well.
Quoted 1 line
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
Quoted 9 lines
Quoted 4 lines
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
Fabio Estevam
reviewerQuoted 10 lines · On Fri, Jun 28, 2013 at 10:04 AM, Chen Peter-B29397 <[email protected]>…
Quoted 9 lines
Quoted 4 lines
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?
Quoted 5 lines
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
Quoted 10 lines
Quoted 7 lines
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
Hi Peter,
Quoted 6 lines
Quoted 6 lines
Where can I measure this?
Quoted 3 lines
Two possible reasons:
1. You have not gpio control for vbus toggle when role switches.
Quoted 7 lines
Quoted 5 lines
This works well.
Quoted 1 line
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
Quoted 23 lines
-----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,
Quoted 8 lines
Quoted 8 lines
Where can I measure this?
Quoted 3 lines
Two possible reasons:
1. You have not gpio control for vbus toggle when role switches.
This works well.
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
2. Your hardware has some problems that the vbus can't lower than
0.8v.
Quoted 4 lines
Quoted 2 lines
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
Hi Peter,
Quoted 25 lines
Quoted 25 lines
-----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,
Quoted 9 lines
Quoted 9 lines
Where can I measure this?
Quoted 3 lines
Two possible reasons:
1. You have not gpio control for vbus toggle when role switches.
This works well.
Quoted 1 line
2. Your hardware has some problems that the vbus can't lower than
0.8v.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
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?
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
Quoted 34 lines
Quoted 10 lines
Quoted 10 lines
-----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-
Quoted 2 lines
Quoted 2 lines
kernel at lists.infradead.org
Subject: Re: Chipidea usb otg support for IMX/MXS (devicefunctionality)
Quoted 5 lines
Quoted 5 lines
Hi Peter,
Quoted 2 lines
Quoted 2 lines
Where can I measure this?
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Two possible reasons:
1. You have not gpio control for vbus toggle when role switches.
This works well.
Quoted 1 line
2. Your hardware has some problems that the vbus can't lower
than
Quoted 7 lines
Quoted 7 lines
0.8v.
Quoted 3 lines
Quoted 1 line
How can I check that?
Just measure the voltage of your otg vbus pin.
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
It's 2.5 volt for me. What am I supposed to observe happening there?
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
Hi Peter,
[...]
Quoted 4 lines
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
Hi Peter,
Quoted 25 lines
Quoted 16 lines
Hi Peter,
Quoted 14 lines
Quoted 9 lines
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?
Quoted 8 lines
Quoted 2 lines
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.
Quoted 3 lines
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.
Quoted 5 lines
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