Hello,
we have a custom board with an am3359 processor on it (the design is mainly based on the beaglebone).
The USB0 port is connected to a mini-AB connector and the idea is to enable our custom board in OTG-mode either as a host or as a device. We detect device or host mode through the ID pin.
The USB1 port is not used as USB port.
We have adapted the board-am335xevm.c to match our board and we are able to boot the linux kernel (u-boot -> SPI flash, Kernel -> TFTP, rootFS -> NFS).
The part concerning the MUSB is the following:
-------------------------------------------------------------
static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
/*
* mode[0:3] = USB0PORT's mode
* mode[4:7] = USB1PORT's mode
* AM335X beta EVM has USB0 in OTG mode and USB1 in host mode.
*/
.mode = (MUSB_OTG << 4) | MUSB_OTG,
// .mode = (MUSB_HOST << 4) | MUSB_HOST,
.power = 500,
.instances = 1,
};
-------------------------------------------------------------
The kernel configuration is set up according to the description here:
http://processors.wiki.ti.com/index.php/UsbgeneralpageLinux-v3p1#Linux_USB_Stack_Architecture
Now, after booting our board, if I insert an USB stick through a mini-A connector/adapter, nothing happens.
The same procedure on a beaglebone reports:
-------------------------------------------------------------
[ 7333.044189] sd 1:0:0:0: [sda] No Caching mode page present
[ 7333.050079] sd 1:0:0:0: [sda] Assuming drive cache: write through
[ 7333.069091] sd 1:0:0:0: [sda] No Caching mode page present
[ 7333.075042] sd 1:0:0:0: [sda] Assuming drive cache: write through
[ 7333.139984] sd 1:0:0:0: [sda] No Caching mode page present
[ 7333.145782] sd 1:0:0:0: [sda] Assuming drive cache: write through
[ 7333.692260] FAT-fs (sda): invalid media value (0xb9)
-------------------------------------------------------------
and enables the access to the USB stick.
On our board we have the following shell outputs:
-------------------------------------------------------------
root@am335x-evm:~# lsusb
root@am335x-evm:~#
-------------------------------------------------------------
-> This is already strange as no USB bus is recognized
Before plugging in the USB stick:
-------------------------------------------------------------
root@am335x-evm:~# cat /proc/driver/musb_hdrc.0
Status: HDRC, Mode=Peripheral (Power=60, DevCtl=80)
OTG state: b_idle; inactive
Options: pio, otg (peripheral+host), [eps=16]
Peripheral address: 00
Root port status: 00000000
Gadget driver: (none)
ep0 (hw0): 1buf, csr 0000 maxp 0000
(queue empty)
root@am335x-evm:~#
-------------------------------------------------------------
After plugging in the USB stick:
-------------------------------------------------------------
root@am335x-evm:~# cat /proc/driver/musb_hdrc.0
Status: HDRC, Mode=Peripheral (Power=60, DevCtl=5d)
OTG state: a_idle; inactive
Options: pio, otg (peripheral+host), [eps=16]
Peripheral address: 00
Root port status: 00000000
Gadget driver: (none)
ep0 (hw0): 1buf, csr 0000 maxp 0000
(queue empty)
root@am335x-evm:~#
-------------------------------------------------------------
Thanks for any idea helping to get further!
Stefan