All of lore.kernel.org
 help / color / mirror / Atom feed
* USB OTG not working for linux-mainline-3.2 (was [Angstrom-devel] Problem with usbhid kernel module)
@ 2012-05-23 11:05 Andreas Müller
  2012-05-23 13:02 ` Frank Agius
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Müller @ 2012-05-23 11:05 UTC (permalink / raw)
  To: Discussion of the angstrom distribution development; +Cc: meta-ti

On Wed, May 23, 2012 at 10:16 AM, Gyorgy Kovesdi <kgy@teledigit.eu> wrote:
> Hi,
>
> I have a Beagleboard C4, using it with USB keyboard and mouse.
> Building the current version of Angstrom results a non-functional keyboard and mouse at the first boot.
> After some digging, i found that the kernel module "usbhid" is not compiled in. It is built as a module (m), but
> is not loaded during startup. Some weeks ago, it was compiled in (y) in the default kernel config of Beagle.
>
> This way the only possibility to get it working is to log in using the serial port, and set up manually.
> I think it is related to other Beagle boards (e.g. xM), however, other people reported that it is working. Do they
> use it other way, or do i made something wrong?
>
> Regards
> Gyorgy Kovesdi
>
>
One hint first: to discuss TI-BSP issues you will have more feedback -
hopefully :) - on meta-ti@yoctoproject.org mailing list.

Back to topic: I have trouble getting OTG USB working in host mode and
think that this is the same issue as reported in [1]. Connecting to
USB-host interface everything works as expected - so I don't think is
related to usbhid.
AFAIK non XM Beagleboards only have an OTG port - so Gyorgy falls
victim on that.
I investigated this issue a bit: It seems the reason for this mess is
that the Kconfig names have changed some when between 3.0 and 3.2:

1. In 3.0 there was a constant (CONFIG_)USB_MUSB_HDRC_HCD. This is no
more part of 3.2 KCONFIG but is heavily used in code

grep -r USB_MUSB_HDRC_HCD *
| arch/arm/mach-omap2/omap_phy_internal.c:#ifdef	CONFIG_USB_MUSB_HDRC_HCD
| arch/arm/mach-omap2/usb-musb.c:#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
| arch/blackfin/mach-bf548/boards/ezkit.c:#elif
defined(CONFIG_USB_MUSB_HDRC_HCD)
| arch/blackfin/mach-bf548/boards/cm_bf548.c:#elif
defined(CONFIG_USB_MUSB_HDRC_HCD)
| arch/blackfin/mach-bf527/boards/ad7160eval.c:#elif
defined(CONFIG_USB_MUSB_HDRC_HCD)
| arch/blackfin/mach-bf527/boards/tll6527m.c:#elif
defined(CONFIG_USB_MUSB_HDRC_HCD)
| arch/blackfin/mach-bf527/boards/ezkit.c:#elif
defined(CONFIG_USB_MUSB_HDRC_HCD)
| arch/blackfin/mach-bf527/boards/ezbrd.c:#elif
defined(CONFIG_USB_MUSB_HDRC_HCD)
| arch/blackfin/mach-bf527/boards/cm_bf527.c:#elif
defined(CONFIG_USB_MUSB_HDRC_HCD)

Inside of arch/arm/mach-omap2/usb-musb.c there is

static struct musb_hdrc_platform_data musb_plat = {
#ifdef CONFIG_USB_MUSB_OTG
	.mode		= MUSB_OTG,
#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
	.mode		= MUSB_HOST,
#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
	.mode		= MUSB_PERIPHERAL,
#endif

So the host mode will never be activated. Strange:
CONFIG_USB_MUSB_HDRC_HCD is still in beagleboard's defconfig but
Kconfig removes it during build (see .config in build dir). Seems
defconfig was handmade..

2. Same for (CONFIG_)USB_GADGET_OMAP. (I think this is unrelated to
host mode but yet another example):

| grep -r USB_GADGET_OMAP *
| arch/arm/mach-omap1/board-h2.c:#ifdef	CONFIG_USB_GADGET_OMAP
| arch/arm/mach-omap1/usb.c:#ifdef	CONFIG_USB_GADGET_OMAP
| arch/arm/mach-omap1/usb.c:#ifdef	CONFIG_USB_GADGET_OMAP
| arch/arm/mach-omap1/board-innovator.c:#ifdef	CONFIG_USB_GADGET_OMAP
| arch/arm/mach-omap1/board-h3.c:#ifdef CONFIG_USB_GADGET_OMAP
| arch/arm/mach-omap1/board-osk.c:#ifdef	CONFIG_USB_GADGET_OMAP
| arch/arm/plat-omap/usb.c:#ifdef	CONFIG_USB_GADGET_OMAP
| arch/arm/plat-omap/include/plat/usb.h:#ifdef	CONFIG_USB_GADGET_OMAP
| arch/arm/mach-omap2/usb-fs.c:#ifdef	CONFIG_USB_GADGET_OMAP
| arch/arm/mach-omap2/board-2430sdp.c:#ifdef  CONFIG_USB_GADGET_OMAP
| drivers/usb/otg/isp1301_omap.c:#elif	!defined(CONFIG_USB_GADGET_OMAP)
USB_GADGET_OMAP is not defined for Kconfig but used in source code

I would like to check this hypotheses but currently don't have time to..

Andreas


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

* Re: USB OTG not working for linux-mainline-3.2 (was [Angstrom-devel] Problem with usbhid kernel module)
  2012-05-23 11:05 USB OTG not working for linux-mainline-3.2 (was [Angstrom-devel] Problem with usbhid kernel module) Andreas Müller
@ 2012-05-23 13:02 ` Frank Agius
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Agius @ 2012-05-23 13:02 UTC (permalink / raw)
  To: meta-ti; +Cc: angstrom-distro-devel

On 5/23/2012 7:05 AM, Andreas Müller wrote:
> On Wed, May 23, 2012 at 10:16 AM, Gyorgy Kovesdi<kgy@teledigit.eu>  wrote:
>> Hi,
>>
>> I have a Beagleboard C4, using it with USB keyboard and mouse.
>> Building the current version of Angstrom results a non-functional keyboard and mouse at the first boot.
>> After some digging, i found that the kernel module "usbhid" is not compiled in. It is built as a module (m), but
>> is not loaded during startup. Some weeks ago, it was compiled in (y) in the default kernel config of Beagle.
>>
>> This way the only possibility to get it working is to log in using the serial port, and set up manually.
>> I think it is related to other Beagle boards (e.g. xM), however, other people reported that it is working. Do they
>> use it other way, or do i made something wrong?
>>
>> Regards
>> Gyorgy Kovesdi
>>
>>
> One hint first: to discuss TI-BSP issues you will have more feedback -
> hopefully :) - on meta-ti@yoctoproject.org mailing list.
>
> Back to topic: I have trouble getting OTG USB working in host mode and
> think that this is the same issue as reported in [1]. Connecting to
> USB-host interface everything works as expected - so I don't think is
> related to usbhid.
> AFAIK non XM Beagleboards only have an OTG port - so Gyorgy falls
> victim on that.
> I investigated this issue a bit: It seems the reason for this mess is
> that the Kconfig names have changed some when between 3.0 and 3.2:
>
> 1. In 3.0 there was a constant (CONFIG_)USB_MUSB_HDRC_HCD. This is no
> more part of 3.2 KCONFIG but is heavily used in code
>
> grep -r USB_MUSB_HDRC_HCD *
> | arch/arm/mach-omap2/omap_phy_internal.c:#ifdef	CONFIG_USB_MUSB_HDRC_HCD
> | arch/arm/mach-omap2/usb-musb.c:#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
> | arch/blackfin/mach-bf548/boards/ezkit.c:#elif
> defined(CONFIG_USB_MUSB_HDRC_HCD)
> | arch/blackfin/mach-bf548/boards/cm_bf548.c:#elif
> defined(CONFIG_USB_MUSB_HDRC_HCD)
> | arch/blackfin/mach-bf527/boards/ad7160eval.c:#elif
> defined(CONFIG_USB_MUSB_HDRC_HCD)
> | arch/blackfin/mach-bf527/boards/tll6527m.c:#elif
> defined(CONFIG_USB_MUSB_HDRC_HCD)
> | arch/blackfin/mach-bf527/boards/ezkit.c:#elif
> defined(CONFIG_USB_MUSB_HDRC_HCD)
> | arch/blackfin/mach-bf527/boards/ezbrd.c:#elif
> defined(CONFIG_USB_MUSB_HDRC_HCD)
> | arch/blackfin/mach-bf527/boards/cm_bf527.c:#elif
> defined(CONFIG_USB_MUSB_HDRC_HCD)
>
> Inside of arch/arm/mach-omap2/usb-musb.c there is
>
> static struct musb_hdrc_platform_data musb_plat = {
> #ifdef CONFIG_USB_MUSB_OTG
> 	.mode		= MUSB_OTG,
> #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
> 	.mode		= MUSB_HOST,
> #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
> 	.mode		= MUSB_PERIPHERAL,
> #endif
>
> So the host mode will never be activated. Strange:
> CONFIG_USB_MUSB_HDRC_HCD is still in beagleboard's defconfig but
> Kconfig removes it during build (see .config in build dir). Seems
> defconfig was handmade..
>
> 2. Same for (CONFIG_)USB_GADGET_OMAP. (I think this is unrelated to
> host mode but yet another example):
>
> | grep -r USB_GADGET_OMAP *
> | arch/arm/mach-omap1/board-h2.c:#ifdef	CONFIG_USB_GADGET_OMAP
> | arch/arm/mach-omap1/usb.c:#ifdef	CONFIG_USB_GADGET_OMAP
> | arch/arm/mach-omap1/usb.c:#ifdef	CONFIG_USB_GADGET_OMAP
> | arch/arm/mach-omap1/board-innovator.c:#ifdef	CONFIG_USB_GADGET_OMAP
> | arch/arm/mach-omap1/board-h3.c:#ifdef CONFIG_USB_GADGET_OMAP
> | arch/arm/mach-omap1/board-osk.c:#ifdef	CONFIG_USB_GADGET_OMAP
> | arch/arm/plat-omap/usb.c:#ifdef	CONFIG_USB_GADGET_OMAP
> | arch/arm/plat-omap/include/plat/usb.h:#ifdef	CONFIG_USB_GADGET_OMAP
> | arch/arm/mach-omap2/usb-fs.c:#ifdef	CONFIG_USB_GADGET_OMAP
> | arch/arm/mach-omap2/board-2430sdp.c:#ifdef  CONFIG_USB_GADGET_OMAP
> | drivers/usb/otg/isp1301_omap.c:#elif	!defined(CONFIG_USB_GADGET_OMAP)
> USB_GADGET_OMAP is not defined for Kconfig but used in source code
>
> I would like to check this hypotheses but currently don't have time to..
>

This relates to usb code changes committed July 2011.  As a result of 
these chages a gadget driver must be loaded in order for host mode to be 
activated.  If you load a gadget driver, then host mode should be activated.

frank





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

end of thread, other threads:[~2012-05-23 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-23 11:05 USB OTG not working for linux-mainline-3.2 (was [Angstrom-devel] Problem with usbhid kernel module) Andreas Müller
2012-05-23 13:02 ` Frank Agius

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.