This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Configuring Linux for USB host mode on Leopardboard 365

Other Parts Discussed in Thread: TVP5146, THS7303, TVP7002, THS7353

Hi,

I am not measuring 5v on the USB VBUS signal.

Here is my kernel configuration related to USB:

fgrep USB .config  | grep -v '^#'


CONFIG_USB_HID=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_SOC=y
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_HDRC_HCD=y
CONFIG_USB_TI_CPPI_DMA=y
CONFIG_USB_STORAGE=y
CONFIG_USB_TEST=y
CONFIG_USB_OTG_UTILS=y
CONFIG_NOP_USB_XCEIV=y

The schematic  (http://designsomething.org/leopardboard/uploads/dm365_leopard_board_ver1.3.pdf) shows GPIO66 is connected to DRV_VBUS, so I changed the arch/arm/mach-davinci/board-dm365-evm.c file (we are in the process of making a board-dm365-leopard.c file) to have

static void dm365evm_usb_configure(void)
{
        gpio_request(66, "usb-vbus");
        gpio_direction_output(66, 0);
        setup_usb(500, 8);
}

My hardware configuration is:

a) Leopardboard 365 v 1.3

b) LI-DVI1 v 1.3

c) USB mini-B to A converter that came with the DM6446 EVM

d) Logitech track ball that was tested working with a HawkBoard (and I measured 5v on VBUS on HawkBoard to verify I was measuring the right signal)

e) Leopardboard 365 powered with 3a 5v power supply

I am not seeing 5V on USB VBUS.

What configuration step am I missing?

Todd

P.S. here is the boot output (I have a USB serial dongle connected)


DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
Starting NAND Copy...
Valid magicnum, 0xA1ACED66, found in block 0x00000019.
   DONE
Jumping to entry point at 0x81080000.


U-Boot 1.3.4-svn21 (Feb 24 2010 - 10:04:27)

I2C:   ready
DRAM:  128 MB
NAND:  NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3
V 8-bit)
Bad block table not found for chip 0
Bad block table not found for chip 0
nand_bbt: Error while writing bad block table -5
256 MiB
In:    serial
Out:   serial
Err:   serial
Ethernet PHY: GENERIC @ 0x00
Hit any key to stop autoboot:  0

Loading from NAND 256MiB 3,3V 8-bit, offset 0x400000
   Image Name:   "RR Linux Kernel"
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4344320 Bytes =  4.1 MB
   Load Address: 80008000
   Entry Point:  80008000
Automatic boot of image at addr 0x82000000 ...
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   "RR Linux Kernel"
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4344320 Bytes =  4.1 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Linux version 2.6.32-rc2-ridgerun (tfischer@sax-lx) (gcc version 4.2.4) #10 PREE
MPT Thu Jul 29 10:57:14 MDT 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DM365 EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci dm365_rev1.2 variant 0x8
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 16256
Kernel command line: davinci_enc_mngr.ch0_output=DVI davinci_enc_mngr.ch0_mode=7
20P-60 davinci_display.cont2_bufsize=6291456 vpfe_capture.cont_bufoffset=6291456
 vpfe_capture.cont_bufsize=8388608 console=ttyS0,115200n8 video=davincifb:vid0=o
ff:vid1=off:osd1=off mem=64M root=/dev/nfs nfsroot=10.111.0.3:/local/home/tfisch
er/work/winntech/fs/fs rw ip=dhcp mtdparts=nand_davinci.0:3968k(UBOOT),128k(UBOO
T_ENV),4352k(KERNEL),204800k(FS)
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60444KB available (3904K code, 383K data, 144K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 147.86 BogoMIPS (lpj=739328)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 8 gpio irqs
NET: Registered protocol family 16
davinci_serial_init:97: failed to get UART2 clock
EVM: tvp5146 SD video input
bio: create slab <bio-0> at 0
DM365 IPIPE initialized in Single Shot mode
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
vpss vpss: dm365_vpss vpss probed
vpss vpss: dm365_vpss vpss probe success
dm365_afew_hw_init
ch0 default output "DVI", mode "720P-60"
VPBE Encoder Initialized
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
Leopard DVI encoder initialized
Switching to clocksource timer0_1
musb_hdrc: version 6.0, cppi-dma, host, debug=0
musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
davincifb davincifb.0: dm_osd0_fb: 1280x720x16@0,0 with framebuffer size 1800KB
davinci_interrupt 374: VBUS error workaround (delay coming)
davincifb davincifb.0: dm_osd1_fb: 1280x720x4@0,0 with framebuffer size 1800KB
DM365 IPIPEIF probed
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
brd: module loaded
at24 1-0050: 32768 byte 24c256 EEPROM (writable)
Read MAC addr from EEPROM: eb:02:03:25:f1:52
spi_davinci spi_davinci.0: DaVinci SPI driver in EDMA mode
Using RX channel = 17 , TX channel = 16 and event queue = 3
at25 spi0.0: 8 KByte at25640 eeprom, pagesize 32
spi_davinci spi_davinci.0: Controller at 0xfec66000
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbtest
i2c /dev entries driver
Linux video capture interface: v2.00
ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
vpfe_init
vpfe-capture: vpss clock vpss_master enabled
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
EVM: switch to tvp5146 SD video input
vpfe-capture vpfe-capture: v4l2 sub device tvp5146 register fails
EVM: switch to tvp7002 HD video input
vpfe-capture vpfe-capture: v4l2 sub device tvp7002 register fails
ths7353 1-002e: chip found @ 0x5c (DaVinci I2C adapter)
ths7353 1-002e: No platform data!!
ths7353 1-002e: ths7353 write failed
ths7353: probe of 1-002e failed with error -121
vpfe-capture vpfe-capture: v4l2 sub device ths7353 register fails
No sub devices registered
vpfe-capture: vpfe capture clocks disabled
vpfe_register_ccdc_device: DM365 ISIF
DM365 ISIF is registered with vpfe.
af major#: 252, minor# 0
AF Driver initialized
aew major#: 251, minor# 0
AEW Driver initialized
Trying to register davinci display video device.
layer=c25f1400,layer->video_dev=c25f1570
Trying to register davinci display video device.
layer=c25f1a00,layer->video_dev=c25f1b70
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
watchdog watchdog: heartbeat 60 sec
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI tlv320aic3x
No device for DAI davinci-i2s
asoc: tlv320aic3x <-> davinci-i2s mapping ok
ALSA device list:
  #0: DaVinci EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
Clocks: disable unused mmcsd0
Clocks: disable unused mmcsd1
Clocks: disable unused spi1
Clocks: disable unused spi2
Clocks: disable unused spi3
Clocks: disable unused spi4
Clocks: disable unused pwm0
Clocks: disable unused pwm1
Clocks: disable unused pwm2
Clocks: disable unused pwm3
Clocks: disable unused timer1
Clocks: disable unused timer3
Clocks: disable unused emac
Clocks: disable unused voice_codec
Clocks: disable unused rto
Clocks: disable unused mjcp
davinci_emac_probe: using random MAC addr: 02:a5:87:47:d1:f7
emac-mii: probed
davinci_interrupt 374: VBUS error workaround (delay coming)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, id=221613)
Sending DHCP requests .
davinci_interrupt 374: VBUS error workaround (delay coming)
PHY: 1:01 - Link is Up - 100/Full
davinci_interrupt 374: VBUS error workaround (delay coming)
., OK
IP-Config: Got DHCP answer from 10.111.0.1, my address is 10.111.0.197
IP-Config: Complete:
     device=eth0, addr=10.111.0.197, mask=255.255.255.0, gw=10.111.0.1,
     host=10.111.0.197, domain=fischerfamily.org, nis-domain=fischerfamily.org,
     bootserver=10.111.0.1, rootserver=10.111.0.3, rootpath=
Looking up port of RPC 100003/2 on 10.111.0.3
Looking up port of RPC 100005/1 on 10.111.0.3
VFS: Mounted root (nfs filesystem) on device 0:14.
Freeing init memory: 144K
init started: BusyBox v1.14.2 (2010-07-14 14:05:20 MDT)
starting pid 978, tty '': '/etc/rcS'
Starting System
done.


Customized by RidgeRun Embedded Linux Solutions
 
For further information see:
http://www.ridgerun.com


Build host: sax-lx
Built by: tfischer
Build date: Thu, 29 Jul 2010 11:28:48 -0600
Build tag: leopard
Configuring network interfaces
CMEMK module: built on Jul 29 2010 at 06:12:26
Loading CMEM fro  Reference Linux version 2.6.32
m 0x84e00000 to 0x88000000
  File /local/home/tfischer/work/winntech/proprietary/dvsdk_3_10_00/dvsdk_3_10_0
0_12/linuxutils_2_25_01_06/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc7000000 of size 0x65b000
cmemk initialized
EDMAK module: built on Jul 29 2010 at 06:12:34
  Reference Linux version 2.6.32
  File /local/home/tfischer/work/winntech/proprietary/dvsdk_3_10_00/dvsdk_3_10_0
0_12/linuxutils_2_25_01_06/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
IRQK module: built on Jul 29 2010 at 06:12:38
  Reference Linux version 2.6.32
  File /local/home/tfischer/work/winntech/proprietary/dvsdk_3_10_00/dvsdk_3_10_0
0_12/linuxutils_2_25_01_06/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
irqk initialized

dm365mmap 1740 0 - Live 0xbf01a000
irqk 6066 0 - Live 0xbf013000
edmak 11929 0 - Live 0xbf00b000
cmemk 20210 0 - Live 0xbf000000

 

You can see the track ball USB device was not found

/ # cd /sys/bus/usb/
/sys/bus/usb # find .
.
./uevent
./devices
./devices/usb1
./devices/1-0:1.0
./drivers
./drivers/usbfs
./drivers/usbfs/module
./drivers/usbfs/uevent
./drivers/usbfs/unbind
./drivers/usbfs/bind
./drivers/usbfs/new_id
./drivers/hub
./drivers/hub/module
./drivers/hub/uevent
./drivers/hub/unbind
./drivers/hub/bind
./drivers/hub/new_id
./drivers/hub/1-0:1.0
./drivers/usb
./drivers/usb/uevent
./drivers/usb/unbind
./drivers/usb/bind
./drivers/usb/usb1
./drivers/usb-storage
./drivers/usb-storage/module
./drivers/usb-storage/uevent
./drivers/usb-storage/unbind
./drivers/usb-storage/bind
./drivers/usb-storage/new_id
./drivers/usbtest
./drivers/usbtest/module
./drivers/usbtest/uevent
./drivers/usbtest/unbind
./drivers/usbtest/bind
./drivers/usbtest/new_id
./drivers/usbhid
./drivers/usbhid/module
./drivers/usbhid/uevent
./drivers/usbhid/unbind
./drivers/usbhid/bind
./drivers/usbhid/new_id
./drivers_probe
./drivers_autoprobe
/sys/bus/usb #



 

  • As a follow up, I have a USB breakout cable that allows me to disconnect vbus. I used this cable on HawkBoard with an external power supply for VBUS and when I turned on the external power supply, Hawkboard displayed the following

    [ 1264.910000] usb 2-1: new low speed USB device using ohci and address 10
    [ 1265.180000] input: Logitech Trackball as /class/input/input5
    [ 1265.200000] generic-usb 0003:046D:C402.0006: input: USB HID v1.10 Mouse [Logitech Trackball] on usb-ohci.0-1/input0

    When I tried the same experiment of using an external power supply on Leopardboard 365, the trackball wasn't detected - so there is a bigger configuration problem than just VBUS not being powered.

    Also, I forgot to mention I have J1 installed and J4 is jumpered between pins 2-3 as described in the LeopardBoard 365 manual (http://designsomething.org/leopardboard/uploads/LeopardBoard_365_User_Guide_02_18_10.pdf) pg 36.

    Todd

     

  • Todd,

    Given that you are not using a TI hardware development board or the software associated with such, you would be better served to ask your question over on the Leopard Imaging support forum.  They should be better equipped to handle your questions.  Thanks.

  • I missed that PINMUX2 (bits 1..0) needs to be set to zero for  GPIO 66 pin to be configured as a GPIO.

    I have verified USB host most is working on Leopardboard 365 with Linux 2.6.32.

     

  • Did you solve the problem?

     I have the same trouble "davinci_interrupt 361: VBUS error workaround (delay coming) "and there is no power supply on vbus.

    Coule you tell me solve this problem?

    Thank you very much.