Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

USB Gadget mode on AM1808

$
0
0

Hello,

I'm using an AM1808 on a custom mode and am trying to setup up the kernel for usb gadget mode but the board is always booting up in host mode still.

In the kernel configuration (using linux-2.6.37-psp03.21.00.04) I have selected the options below as directed in http://processors.wiki.ti.com/index.php/Usbgeneralpage

#
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_LOGO is not set
# CONFIG_SOUND is not set
# CONFIG_HID_SUPPORT is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
# CONFIG_USB_ARCH_HAS_EHCI is not set
# CONFIG_USB is not set
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
CONFIG_USB_MUSB_HDRC=m

#
# Platform Glue Layer
#
CONFIG_USB_MUSB_DA8XX_GLUE=m
# CONFIG_USB_MUSB_DAVINCI is not set
CONFIG_USB_MUSB_DA8XX=y
# CONFIG_USB_MUSB_TUSB6010 is not set
# CONFIG_USB_MUSB_OMAP2PLUS is not set
# CONFIG_USB_MUSB_AM35X is not set
# CONFIG_USB_MUSB_BLACKFIN is not set
# CONFIG_USB_MUSB_UX500 is not set
CONFIG_USB_MUSB_PERIPHERAL=y
CONFIG_USB_GADGET_MUSB_HDRC=y
CONFIG_MUSB_PIO_ONLY=y
# CONFIG_USB_INVENTRA_DMA is not set
# CONFIG_USB_TI_CPPI_DMA is not set
# CONFIG_USB_TI_CPPI41_DMA is not set
# CONFIG_USB_TUSB_OMAP_DMA is not set
CONFIG_USB_MUSB_DEBUG=y

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#
CONFIG_USB_GADGET=m
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_R8A66597 is not set
# CONFIG_USB_GADGET_M66592 is not set
CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_ZERO is not set
# CONFIG_USB_ETH is not set
# CONFIG_USB_GADGETFS is not set
# CONFIG_USB_FUNCTIONFS is not set
# CONFIG_USB_FILE_STORAGE is not set
# CONFIG_USB_MASS_STORAGE is not set
CONFIG_USB_G_SERIAL=m
# CONFIG_USB_G_PRINTER is not set
# CONFIG_USB_CDC_COMPOSITE is not set
# CONFIG_USB_G_MULTI is not set
# CONFIG_USB_G_HID is not set
# CONFIG_USB_G_DBGP is not set

#
# OTG and related infrastructure
#
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ULPI is not set
CONFIG_NOP_USB_XCEIV=m
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_UNSAFE_RESUME=y

On boot however I still see 

musb-hdrc: version 6.0, host, debug=0
musb-hdrc musb-hdrc: dma type: pio
Waiting for USB PHY clock good...
musb-hdrc musb-hdrc: MUSB HDRC host driver
musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
musb-hdrc musb-hdrc: USB Host mode controller at fee00000 using PIO, IRQ 58
NET: Registered protocol family 2

and running the serial_gadget module I just get an error, 

root@am180x-evm:~# modprobe g_serial
g_serial: Unknown symbol usb_gadget_probe_driver (err 0)
g_serial: Unknown symbol usb_gadget_unregister_driver (err 0)
FATAL: Error inserting g_serial (/lib/modules/2.6.37/kernel/drivers/usb/gadget/g_serial.ko): Unknown symbol in module, or unknown parameter (se
e dmesg)

The usb_id pin has been left floating so it should be in peripheral mode  but looking at the status of musb_hdrc it's showing as host too.

# cat /proc/driver/musb_hdrc
Status: MHDRC, Mode=Host (Power=e0, DevCtl=19)
OTG state: a_wait_vrise; inactive
Options: pio, host, debug=0 [eps=5]
Root port status: 00000100
DaVinci: ctrl=00 stat=1 phy=168ada
rndis=00000 auto=0000 intsrc=00000000 intmsk=01ff1e1f

Any ideas why this isn't going into the right mode?

Cheers

Ian


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>