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.

linux3.8.0 USB2.0 problem

Other Parts Discussed in Thread: OMAPL138

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!

 

  • The boot log is:

    Starting kernel ...
    
    Uncompressing Linux... done, booting the kernel.
    Booting Linux on physical CPU 0x0
    Linux version 3.8.0+ (root@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #131 PREEMPT Wed Nov 5 17:41:14 HKT 2014
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: DaVinci DA850/OMAP-L138/AM18x EVM
    da8xx_rproc_reserve_cma: reserving 0x1000000 @ 0xc3000000...
    cma: CMA: reserved 16 MiB at c3000000
    cma: CMA: reserved 16 MiB at c2000000
    Memory policy: ECC disabled, Data cache writeback
    DaVinci da850/omap-l138/am18x variant 0x1
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
    Kernel command line: console=ttyS2,115200n8 noinitrd rw ip=192.168.1.99 root=/dev/nfs nfsroot=192.168.1.36:/opt/DVRRDK_02.00.00.23/target/l138_lcdk_rfs mem=64M rproc_mem=16M@0xC3000000
    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)
    __ex_table already sorted, skipping sort
    Memory: 64MB = 64MB total
    Memory: 26484k/26484k available, 39052k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
        lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
        modules : 0xbf000000 - 0xc0000000   (  16 MB)
          .text : 0xc0008000 - 0xc04f4efc   (5044 kB)
          .init : 0xc04f5000 - 0xc05210c4   ( 177 kB)
          .data : 0xc0522000 - 0xc055bf20   ( 232 kB)
           .bss : 0xc055bf20 - 0xc057a344   ( 122 kB)
    SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    NR_IRQS:245
    sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
    Console: colour dummy device 80x30
    Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    Setting up static identity map for 0xc03c2b50 - 0xc03c2ba8
    DaVinci: 144 gpio irqs
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    No entry for the specified index
    da850_evm_init: USB2.0 mux setup failed: -19
    bio: create slab <bio-0> at 0
    edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
    edma-dma-engine edma-dma-engine.1: TI EDMA DMA engine driver
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    Advanced Linux Sound Architecture Driver Initialized.
    Switching to clocksource timer0_1
    NET: Registered protocol family 2
    TCP established hash table entries: 512 (order: 0, 4096 bytes)
    TCP bind hash table entries: 512 (order: -1, 2048 bytes)
    TCP: Hash tables configured (established 512 bind 512)
    TCP: reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    EMAC: RMII PHY configured, MII PHY will not be functional
    jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    msgmni has been set to 115
    io scheduler noop registered (default)
    da8xx_lcdc da8xx_lcdc.0: GLCD: Found Huanyi_SHX280T39 panel
    Console: switching to colour frame buffer device 30x40
    Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A
    serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A
    serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A
    console [ttyS2] enabled
    brd: module loaded
    ahci ahci: forcing PORTS_IMPL to 0x1
    ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
    ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc 
    scsi0 : ahci_platform
    ata1: SATA max UDMA/133 mmio [mem 0x01e18000-0x01e19fff] port 0x100 irq 67
    NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64
    NAND_ECC_NONE selected by board driver. This is not recommended!
    Bad block table not found for chip 0
    Bad block table not found for chip 0
    Scanning device for bad blocks
    Bad eraseblock 1779 at 0x00000de60000
    Bad block table written to 0x00000ffe0000, version 0x01
    Bad block table written to 0x00000ffc0000, version 0x01
    Creating 5 MTD partitions on "davinci_nand.1":
    0x000000000000-0x000000020000 : "u-boot env"
    0x000000020000-0x000000040000 : "UBL"
    0x000000040000-0x0000000c0000 : "u-boot"
    0x000000200000-0x000000600000 : "kernel"
    0x000000600000-0x000010000000 : "filesystem"
    davinci_nand davinci_nand.1: controller rev. 2.5
    edma-dma-engine edma-dma-engine.0: allocated channel for 0:14
    edma-dma-engine edma-dma-engine.0: allocated channel for 0:15
    spi_davinci spi_davinci.0: DMA: supported
    spi_davinci spi_davinci.0: DMA: RX channel: 14, TX channel: 15, event queue: 0
    spi_davinci spi_davinci.0: master is unqueued, this is deprecated
    ata1: SATA link down (SStatus 0 SControl 300)
    graphics fb1: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 16 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz
    spi_davinci spi_davinci.0: Controller at 0xfec41000
    edma-dma-engine edma-dma-engine.0: allocated channel for 0:18
    edma-dma-engine edma-dma-engine.0: allocated channel for 0:19
    spi_davinci spi_davinci.1: DMA: supported
    spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0
    spi_davinci spi_davinci.1: master is unqueued, this is deprecated
    spi_davinci spi_davinci.1: Controller at 0xfef0e000
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
    davinci_mdio davinci_mdio.0: detected phy mask fffffffc
    libphy: davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio-0:00, driver unknown
    davinci_mdio davinci_mdio.0: phy[1]: device davinci_mdio-0:01, driver unknown
    PPP generic driver version 2.4.2
    PPP BSD Compression module registered
    PPP Deflate Compression module registered
    ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    ohci ohci.0: DA8xx OHCI
    ohci ohci.0: new USB bus registered, assigned bus number 1
    Waiting for USB PHY clock good...
    ohci ohci.0: irq 59, io mem 0x01e25000
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: DA8xx OHCI
    usb usb1: Manufacturer: Linux 3.8.0+ ohci_hcd
    usb usb1: SerialNumber: ohci.0
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    usbcore: registered new interface driver usbtmc
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new interface driver usbserial
    usbcore: registered new interface driver option
    usbserial: USB Serial support registered for GSM modem (1-port)
    usbcore: registered new interface driver sisusb
    musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    Waiting for USB PHY clock good...
     gadget: Gadget Zero, version: Cinco de Mayo 2008
     gadget: zero ready
    musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: MUSB HDRC host driver
    usb usb2: Manufacturer: Linux 3.8.0+ musb-hcd
    usb usb2: SerialNumber: musb-hdrc.0.auto
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    input: gpio-keys-polled as /devices/platform/gpio-keys-polled.0/input/input0
    omap_rtc da830-rtc: rtc core: registered da830-rtc as rtc0
    da830-rtc: RTC power up reset detected
    da830-rtc: already running
    i2c /dev entries driver
    watchdog watchdog: heartbeat 60 sec
    cpuidle: using governor ladder
    cpuidle: using governor menu
    edma-dma-engine edma-dma-engine.0: allocated channel for 0:17
    edma-dma-engine edma-dma-engine.0: allocated channel for 0:16
    davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
    leds-gpio leds-gpio: pins are not configured from the driver
    usbcore: registered new interface driver snd-usb-audio
    soc-audio soc-audio.0: ASoC: machine DA850/OMAP-L138 EVM should use snd_soc_register_card()
    soc-audio soc-audio.0: ASoC: Failed to create card debugfs directory
    soc-audio soc-audio.0: ASoC: CODEC tlv320aic3x-codec.1-0018 not registered
    platform soc-audio.0: Driver soc-audio requests probe deferral
    TCP: cubic registered
    NET: Registered protocol family 17
    soc-audio: probe of soc-audio.0 failed with error -22
    console [netcon0] enabled
    netconsole: network logging started
    davinci_emac davinci_emac.1: using random MAC addr: 5a:be:ac:0d:b4:8a
    usb 1-1: new full-speed USB device number 2 using ohci
    omap_rtc da830-rtc: setting system clock to 2013-11-07 01:54:14 UTC (1383789254)
    davinci_mdio davinci_mdio.0: resetting idled controller
    net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=davinci_mdio-0:00, id=221613)
    usb 1-1: not running at top speed; connect to a high speed hub
    usb 1-1: New USB device found, idVendor=12d1, idProduct=1573
    usb 1-1: New USB device strings: Mfr=5, Product=4, SerialNumber=0
    usb 1-1: Product: HUAWEI Mobile
    usb 1-1: Manufacturer: Huawei Technologies
    option 1-1:2.2: GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
    option 1-1:2.3: GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
    option 1-1:2.4: GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
    option 1-1:2.5: GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
    option 1-1:2.6: GSM modem (1-port) converter detected
    usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
    libphy: davinci_mdio-0:00 - Link is Up - 100/Full
    IP-Config: Guessing netmask 255.255.255.0
    IP-Config: Complete:
         device=eth0, hwaddr=5a:be:ac:0d:b4:8a, ipaddr=192.168.1.99, mask=255.255.255.0, gw=255.255.255.255
         host=192.168.1.99, domain=, nis-domain=(none)
         bootserver=255.255.255.255, rootserver=192.168.1.36, rootpath=
    ALSA device list:
      No soundcards found.
    VFS: Mounted root (nfs filesystem) on device 0:11.
    Freeing init memory: 176K
    INIT: version 2.88 booting
    Starting udev
    ERROR: could not open directory /lib/modules/3.8.0+: No such file or directory
    WARNING: -e needs -E or -F
    ERROR: could not open directory /lib/modules/3.8.0+: No such file or directory
    FATAL: could not search modules: No such file or directory
    Starting Bootlog daemon: bootlogd.
    ALSA: Restoring mixer settings...
    /usr/sbin/alsactl: load_state:1686: No soundcards found...
    NOT configuring network interfaces: / is an NFS mount
    INIT: Entering runlevel: 5
    Starting system message bus: dbus.
    Starting telnet daemon.
    Starting syslogd/klogd: done
    Starting thttpd.
    Stopping Bootlog daemon: bootlogd.
    
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org omapl138-lcdk ttyS2
    
    Arago 2013.05 omapl138-lcdk ttyS2
    
    omapl138-lcdk login: root

  • Hi Eagle,

    For OMAPL138 LCDK, the appropriate MCSDK package has the linux kernel version: 3.3.0 which is a tested version on OMAPL138 and this problem is not observed.

    Linux kernel version 3.8 may not be tested on OMAPL138 LCDK. Not sure whether this version of linux has problems. Please do check with the older versions of linux kernel to confirm the USB 2.0 functionality on OMAPL138 LCDK.

    Regards,

    Shankari

  • Thanks for your reply

    Maybe this caused by CPPI4.1 DMA Driver.

    http://processors.wiki.ti.com/index.php?title=DaVinci_GIT_Linux_Kernel#USB_Host

    And we must use linux3.8.0, beacuse we will add ipc3.x to the kernel. Any idea about “add CPP4.1 DMA driver for OMAPL1X”?