I use linux3.8.0 to add usb2.0 host driver, the cpu is omapl138.
when the board boot, i insert a Kingston 4G USB storage device , the system print some log:
omapl138-lcdk login: root root@omapl138-lcdk:~# usb 2-1: new high-speed USB device number 2 using musb-hdrc usb 2-1: New USB device found, idVendor=0951, idProduct=1642 usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-1: Product: DT 101 G2 usb 2-1: Manufacturer: Kingston usb 2-1: SerialNumber: 0019B92B639ABB20A3DE0118 scsi1 : usb-storage 2-1:1.0 scsi 1:0:0:0: Direct-Access Kingston DT 101 G2 PMAP PQ: 0 ANSI: 0 CCS sd 1:0:0:0: [sda] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB) sd 1:0:0:0: [sda] Write Protect is off sd 1:0:0:0: [sda] No Caching mode page present sd 1:0:0:0: [sda] Assuming drive cache: write through sd 1:0:0:0: [sda] No Caching mode page present sd 1:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd 1:0:0:0: [sda] No Caching mode page present sd 1:0:0:0: [sda] Assuming drive cache: write through sd 1:0:0:0: [sda] Attached SCSI removable disk root@omapl138-lcdk:~# usb 2-1: USB disconnect, device number 2 root@omapl138-lcdk:~#
then i Pull it out and insert again, the system can't Identify it。
I checked the USB0_DRVVBUS , found it falled to 0V, and never return to 5v.
Here is my code:
static __init void DA850_evm_usb_init(void) { u32 cfgchip2; int ret; /* * Set up USB clock/mode in the CFGCHIP2 register. * FYI: CFGCHIP2 is 0x0000ef00 initially. */ cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); cfgchip2 &= ~(CFGCHIP2_RESET | CFGCHIP2_PHYPWRDN | CFGCHIP2_OTGPWRDN | CFGCHIP2_OTGMODE | CFGCHIP2_REFFREQ | CFGCHIP2_USB1PHYCLKMUX); cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN | CFGCHIP2_PHY_PLLON | CFGCHIP2_REFFREQ_24MHZ | CFGCHIP2_USB2PHYCLKMUX; cfgchip2 |= CFGCHIP2_FORCE_HOST; __raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); ret = da8xx_register_usb20(1000, 3); if (ret) pr_warning("%s: USB 2.0 registration failed: %d\n", __func__, ret); ret = da8xx_register_usb11(&DA850_evm_usb11_pdata); if (ret) pr_warning("%s: USB 1.1 registration failed: %d\n", __func__, ret); }
Is anyone can help me? Thanks in advance!