On 5/23/2012 7:05 AM, Andreas Müller wrote:
On Wed, May 23, 2012 at 10:16 AM, Gyorgy Kovesdi<[email protected]>  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 [email protected] 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



_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

Reply via email to