Hello,
I am trying to get the g_file_storage gadget working on the DM8168 board. I have version 2.0 silicon.
I have gone through the instructions found at:
http://processors.wiki.ti.com/index.php/Usbgeneralpage#Introduction
and it is still not working properly. First of all, I am a bit confused by the instructions
. Since I would like to use USB gadgets it seems there is 1 (or 2?) ways of setting up the kernel.
Method #1
Complete this step
Device Drivers ---> USB support --->
< > Support for Host-side USB
<*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
*** Platform Glue Layer ***
< > TUSB6010
< > OMAP2430 and onwards
< > AM35x
<*> TI81XX Driver Mode (USB Peripheral (gadget stack)) --->
[ ] Disable DMA (always use PIO)
[*] Enable debugging messages *** NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ***
<*> USB Gadget Support ---> *** OTG and related infrastructure ***
< > GPIO based peripheral-only VBUS sensing 'transceiver'
[ ] Generic ULPI Transceiver Driver -*- NOP USB Transceiver Driver
Now, there is a note above the this step that says
"Note: For DM816X you need to select usb-id pin configuration as mentioned in usb-id configuration section."
However, when the driver mode is set to (USB Peripheral (gadget stack))
The option to set the method of selecting host/device exists but the ability to actually select the
mode does not exist. These are the options that i have available:
--- USB support
< > Support for Host-side USB
<*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
*** Platform Glue Layer ***
< > TUSB6010
< > OMAP2430 and onwards
< > AM35x
<*> TI81XX
TI81XX usb connector's ID pin control (from software setting) --->
Driver Mode (USB Peripheral (gadget stack)) --->
[ ] Disable DMA (always use PIO)
[*] Enable debugging messages
*** NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ***
<*> USB Gadget Support --->
*** OTG and related infrastructure ***
< > GPIO based peripheral-only VBUS sensing 'transceiver'
[ ] Generic ULPI Transceiver Driver
-*- NOP USB Transceiver Driver
What I am missing are these options :
Force TI81XX USB0 to (Device mode) --->
Force TI81XX USB1 to (Host mode) --->
Which is only available when the driver mode is set to (Both host and peripheral: USB OTG (On The Go) Device)
Now if I ignore that fact that i don't have these instructions,
add the g_file_storage and g_ether as modules and build the kernel and install the modules. I get this:
root@dm816x-evm:~# modprobe g_file_storage file=/home/root/FBS stall=0 removable=1
g_file_storage gadget: No serial-number string provided!
g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, nofua=0, file: /home/root/FBS
Which looks fine, but nothing happens when I plug into my Windows PC.
Method #2
I tried going the section "One port as host and other port as Gadget (for DM81XX)"
My menuconfig looks like this (I chopped out a bunch of unchecked boxes to save space):
--- USB support
<*> Support for Host-side USB
[ ] USB verbose debug messages (NEW)
[ ] USB announce new devices (NEW)
<*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
*** Platform Glue Layer ***
< > TUSB6010
< > OMAP2430 and onwards
< > AM35x
<*> TI81XX
TI81XX usb connector's ID pin control (from software setting) --->
Force TI81XX USB0 to (Device mode) --->
Force TI81XX USB1 to (Host mode) --->
Driver Mode (Both host and peripheral: USB OTG (On The Go) Device) --->
[ ] Disable DMA (always use PIO)
[*] Enable debugging messages
*** USB Device Class drivers ***
<*> USB Gadget Support --->
*** OTG and related infrastructure ***
< > GPIO based peripheral-only VBUS sensing 'transceiver'
[ ] Generic ULPI Transceiver Driver
-*- NOP USB Transceiver Driver
My Gadget support page looks like this:
--- USB Gadget Support
[ ] Debugging messages (DEVELOPMENT)
[ ] Debugging information files (DEVELOPMENT)
[ ] Debugging information files in debugfs (DEVELOPMENT)
(2) Maximum VBUS Power usage (2-500 mA)
USB Peripheral Controller (Inventra HDRC USB Peripheral (TI, ADI, ...)) --->
<M> USB Gadget Drivers
< > Gadget Zero (DEVELOPMENT)
< > Audio Gadget (EXPERIMENTAL)
<M> Ethernet Gadget (with CDC Ethernet support)
[*] RNDIS support
[ ] Ethernet Emulation Model (EEM) support
< > Gadget Filesystem (EXPERIMENTAL)
< > Function Filesystem (EXPERIMENTAL)
<M> File-backed Storage Gadget
[*] File-backed Storage Gadget testing version
< > Mass Storage Gadget
< > Serial Gadget (with CDC ACM and CDC OBEX support)
< > MIDI Gadget (EXPERIMENTAL)
< > Printer Gadget
< > CDC Composite Device (Ethernet and ACM)
< > Multifunction Composite Gadget (EXPERIMENTAL)
< > HID Gadget
< > EHCI Debug Device Gadget
< > USB Webcam Gadget
I then rebuild the kernel and the modules and then install them and restart the board. Then i insert the module:
root@dm816x-evm:~# modprobe g_file_storage file=/home/root/FBS stall=0 removable=1
g_file_storage gadget: No serial-number string provided!
g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, nofua=0, file: /home/root/FBS
musb-hdrc musb-hdrc.0: MUSB HDRC host driver
musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
And once again nothing shows up (although it did print more information than the previous attempt).
Any insights would be GREATLY appreciated. I don't know what I am doing wrong here.
Many thanks,
Ben