Hello!
I'm using an AM335x processor and the Kernel-3.2.0-psp04.06.00.11. In my custom board, I have a HUB connected to the USB0 port and a micro-AB connector connected to the USB1 port.
In the board configuration file, I set USB0 to MUSB_HOST and USB1 to MUSB_OTG and these are the options I set in the menuconfig:
Under Device Drivers -> USB support
--- USB support
<M> Support for Host-side USB
[ ] USB verbose debug messages
...
[ ] USB verbose debug messages
[*] USB runtime power management (autosuspend) and wakeup
[*] OTG support
[ ] Rely on OTG Targeted Peripherals List
...
< > Host Wire Adapter (HWA) driver (EXPERIMENTAL)
<M> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
*** Platform Glue Layer ***
< > TUSB6010
< > OMAP2430 and onwards
< > AM35x
<M> TI81XX onward
MUSB DMA mode
<M> TI CPPI4.1
[ ] Disable DMA (always use PIO)
...
< > USB Test and Measurement Class support
*** NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ***
*** also be needed; see USB_STORAGE Help for more info ***
<M> USB Mass Storage support
[ ] USB Mass Storage verbose debug
...
< > Microtek X6USB scanner support
*** USB port drivers ***
<M> USB Serial Converter support --->
*** USB Miscellaneous drivers ***
< > EMI 6|2m USB Audio interface support
...
< > USB YUREX driver support
<*> USB Gadget Support --->
*** OTG and related infrastructure ***
< > GPIO based peripheral-only VBUS sensing 'transceiver'
[*] Generic ULPI Transceiver Driver
< > TWL6030 USB Transceiver Driver
{*} NOP USB Transceiver Driver
.
Under Device Drivers -> USB support -> USB Gadget Support
[ ] Debugging information files (DEVELOPMENT)
(2) Maximum VBUS Power usage (2-500 mA)
(2) Number of storage pipeline buffers
<M> USB Peripheral Controller
< > Faraday FUSB300 USB Peripheral Controller
< > OMAP USB Device Controller
< > Renesas R8A66597 USB Peripheral Controller
<M> Inventra HDRC USB Peripheral (TI, ADI, ...)
< > Renesas M66592 USB Peripheral Controller
< > PLX NET2272
<M> USB Gadget Drivers
< > Gadget Zero (DEVELOPMENT)
< > Ethernet Gadget (with CDC Ethernet support)
< > Network Control Model (NCM) support
< > Gadget Filesystem (EXPERIMENTAL)
< > Function Filesystem (EXPERIMENTAL)
< > File-backed Storage Gadget (DEPRECATED)
<M> Mass Storage Gadget
< > Serial Gadget (with CDC ACM and CDC OBEX support)
< > Printer Gadget
< > CDC Composite Device (Ethernet and ACM)
< > CDC Composite Device (ACM and mass storage)
< > Multifunction Composite Gadget (EXPERIMENTAL)
< > HID Gadget
< > EHCI Debug Device Gadget
I also have an initialization script that start these modules: usb-storage and ti81xx (modprobe then take care of the dependencies).
The Kernel image I get is able to properly identify and use the HUB as host, but I don't seem to get the USB1 port to work as both host and device. In fact, as of right now, I can only use it as a device: I can mount one mtd partition with g_mass_storage and see its contents no my PC. If I connect a flash drive to this port nothing happens.
I tried changing the board configuration file so that USB1 would be set as MUSB_HOST too. That works, indicating that the problem I'm having is not within my hardware.
I would like to use this port as host until I explicitly configure the g_mass_storage module to change its behavior to device. Am I missing some configuration I would have to set when the Linux is running? Maybe some other configuration?
Regards,
DAVI