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.

OMAP-L137 Linux USB support.

Other Parts Discussed in Thread: OMAP-L137, DA8XX

I need to evaluate USB support on OMAP-L137 EVM, Board rev D , provided with Arago Linux Kernel 2.6.36

I figured out that, apart the standard  OHCI HCD support, the Inventra Highspeed Dual Role Controller support must be enabled.
In such case however the kernel cannot be compiled.

scripts/kconfig/conf --silentoldconfig arch/arm/Kconfig   
  CHK     include/linux/version.h                         
  CHK     include/generated/utsrelease.h                  
make[1]: `include/generated/mach-types.h' is up to date.  
  CALL    scripts/checksyscalls.sh                        
  CHK     include/generated/compile.h                     
  CC      arch/arm/mach-davinci/usb.o                     
  CC      arch/arm/mach-davinci/board-da830-evm.o         
  LD      arch/arm/mach-davinci/built-in.o                
  GZIP    kernel/config_data.gz                           
  IKCFG   kernel/config_data.h                            
  CC      kernel/configs.o                                
  LD      kernel/built-in.o                               
  CC      drivers/usb/musb/musb_core.o                    
  CC      drivers/usb/musb/musb_virthub.o                 
  CC      drivers/usb/musb/musb_host.o                    
  CC      drivers/usb/musb/musb_debugfs.o                 
  CC      drivers/usb/musb/cppi_dma.o                     
drivers/usb/musb/cppi_dma.c: In function 'cppi_interrupt':
drivers/usb/musb/cppi_dma.c:1159: warning: 'flags' may be used uninitialized in this function
  LD      drivers/usb/musb/musb_hdrc.o                                                      
  LD      drivers/usb/musb/built-in.o                                                       
  LD      drivers/built-in.o                                                                
  LD      vmlinux.o                                                                         
  MODPOST vmlinux.o                                                                         
  GEN     .version                                                                          
  CHK     include/generated/compile.h                                                       
  UPD     include/generated/compile.h                                                       
  CC      init/version.o                                                                    
  LD      init/built-in.o                                                                   
  LD      .tmp_vmlinux1                                                                     
drivers/built-in.o: In function `musb_stop':                                                
hid-quirks.c:(.text+0x5f6a8): undefined reference to `musb_platform_disable'                
drivers/built-in.o: In function `musb_shutdown':                                            
hid-quirks.c:(.text+0x5f710): undefined reference to `musb_platform_disable'                
drivers/built-in.o: In function `musb_mode_store':                                          
hid-quirks.c:(.text+0x5f984): undefined reference to `musb_platform_set_mode'               
drivers/built-in.o: In function `musb_start':                                               
hid-quirks.c:(.text+0x60340): undefined reference to `musb_platform_enable'                 
drivers/built-in.o: In function `musb_probe':                                               
hid-quirks.c:(.init.text+0x3868): undefined reference to `musb_platform_init'               
hid-quirks.c:(.init.text+0x38f8): undefined reference to `musb_platform_disable'            
hid-quirks.c:(.init.text+0x40c8): undefined reference to `musb_platform_exit'               
make: *** [.tmp_vmlinux1] Error 1
   
 

If in .config I limit OHCI HCD support, the kernel will be compiled, but the target will hang.. 

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.36-rc7-28053-gd800d76 (
venturi@linux-rs) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #16 PREEMPT Fri Oct 29 13:59:16 CEST 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DA830/OMAP-L137/AM17x EVM
Memory policy: ECC disabled, Data cache writethrough
DaVinci da830/omap-l137 rev1.0 variant 0x0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15240
Kernel command line: console=ttyS2,115200n8 noinitrd rw root=/dev/nfs nfsroot=192.168.1.69:/mnt/omap-mv,nolock ip=192.168.1.72 netmask=255.255.255.0 mem=60M
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: 60MB = 60MB total
Memory: 57284k/57284k available, 4156k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xff000000 - 0xffe00000   (  14 MB)
    vmalloc : 0xc4000000 - 0xfea00000   ( 938 MB)
    lowmem  : 0xc0000000 - 0xc3c00000   (  60 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0024000   ( 112 kB)
      .text : 0xc0024000 - 0xc032c000   (3104 kB)
      .data : 0xc0340000 - 0xc035f940   ( 127 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 149.50 BogoMIPS (lpj=747520)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
DaVinci: 128 gpio irqs
regulator: core version 0.5
regulator: dummy:
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pcf857x: probe of 1-003f failed with error -121
Switching to clocksource timer0_0
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
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
msgmni has been set to 111
io scheduler noop registered (default)
ramoops: invalid size specification
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
loop: module loaded
Generic platform RAM MTD, (c) 2004 Simtec Electronics
spi_davinci spi_davinci.0: DMA: supported
spi_davinci spi_davinci.0: DMA: RX channel: 14, TX channel: 15, event queue: 0
m25p80 spi0.0: found w25x64, expected w25x32
m25p80 spi0.0: w25x64 (8192 Kbytes)
mtd .name = m25p80, .size = 0x800000 (8MiB) .erasesize = 0x00001000 (4KiB) .numeraseregions = 0
partitions[0] = {.name = DSP-UBL, .offset = 0x0, .size = 0x2000 (8KiB) }
partitions[1] = {.name = ARM-UBL, .offset = 0xffffffffffffffff, .size = 0x6000 (24KiB) }
partitions[2] = {.name = U-Boot, .offset = 0xffffffffffffffff, .size = 0x38000 (224KiB) }
partitions[3] = {.name = U-Boot-Environment, .offset = 0xffffffffffffffff, .size = 0x4000 (16KiB) }
partitions[4] = {.name = Kernel, .offset = 0xffffffffffffffff, .size = 0x0 (0KiB) }
Creating 5 MTD partitions on "m25p80":
0x000000000000-0x000000002000 : "DSP-UBL"
mtd: Giving out device 0 to DSP-UBL
0x000000002000-0x000000008000 : "ARM-UBL"
mtd: Giving out device 1 to ARM-UBL
0x000000008000-0x000000040000 : "U-Boot"
mtd: Giving out device 2 to U-Boot
0x000000040000-0x000000044000 : "U-Boot-Environment"
mtd: Giving out device 3 to U-Boot-Environment
0x000000044000-0x000000800000 : "Kernel"
mtd: Giving out device 4 to Kernel
spi_davinci spi_davinci.0: Controller at 0xfec41000
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: detected phy mask fffffff1
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver unknown
davinci_mdio davinci_mdio.0: phy[3]: device 0:03, driver unknown
console [netcon0] enabled
netconsole: network logging started
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...

It seems that at least for standard controller mode, USB1 and USB2 support is granted in Arago,
so maybe some details in the kernel configuration are wrong ?
My .config is attached.

Thank you in advance for any hint on the subject.

 

  • Misha,

    Which linux kernel are you using in arago ? I would suggest you to use TI supported OMAPL137 release at below page,

    http://arago-project.org/git/people/?p=sekhar/linux-omapl1.git;a=summary

    your .config has CONFIG_USB_TI_CPPI_DMA enabled which should not be set for OMAPL1x platform but it should be CONFIG_USB_TI_CPPI41_DMA.

    Regards,
    Ajay

  • Thank you for your attention.

    I am using http://arago-project.org/git/projects/linux-davinci.git

    I was addressed to such branch by Sekhar Nori, who helped me in Flash Spi management on OMAP_L137 Spectrum Digital EVM.

    Which is the "most" up-to-date arago kernel branch specifically for OMAP_L137 EVM?

    I mean a branch where all OMAP_L137 EVM drivers that are working are available, (in particular SPI Flash and USB) ?

    You see, I am not very familiar with Arago project architecture....

    Regards,
    Misha

     

     

     

     

     

     

  • Misha,

     

    The latest kernel is reflected in master branch and also you can check the latest release tag in tag section on the page.

     

    Regards,

    Ajay

  • Ajay,
    probably I did not post my question clearly: I had better refer to "tree" instead of "branch".

    I am developing a new hardware board taking as a reference omap-l137 EVM, so:

    1)which is the "best" Arago tree in order to have all up to date drivers available ?
    In http://arago-project.org/git/projects/linux-davinci.git?p=projects/linux-davinci.git;
    Omap-137l is actually supported in .config at the "Da Vinci Board Type" level.
    This tree proved fine until I discovered the USB support problems I highlighted,
    which are still unanswered, and maybe can have a solution without leaving the tree.

    2) What if I switch to:
    http://arago-project.org/git/people/?p=sekhar/linux-omapl1.git;a=shortlog;h=refs/heads/v2.6.33-rt ?
    Working USB support is granted but Spi Flash support is not ?
    Or maybe Spi Flash support wil be added in later times?

    3) Which is the difference between:
    http://arago-project.org/git/people/?p=sekhar/linux-omapl1.git
    and
    http://arago-project.org/git/projects/?p=linux-omapl1.git ?
    I seems to me they reached the same stage of development.
    (and in general between project / people threads).

    4)How it is possible to understand the "state of the art" for a certain tree, at least for drivers management ?
    I test the drivers on the EVM, but when I move to our new board,  I need to patch somewhat 
    the kernel sources due to specific hardware constraints, so switching from a kernel tree to another should be prevented.


    Thank you in advance for your attention.

    Regards,
    Misha

     

     

     

     

  • I can add that is that, when enabling in .config USB1.1 only
    (infact as I told enabling USB2/Integra leads to compilation errors)

    at the board Hw Init level (arch/arm/mach-davinci/borad-da830-evm.c)
    and at the driver loading level as well (drivers/usb/host/ohci-daxx.c),  as well

    reading CFGCHIP2 register reports always 0x00FE00, meaning that on USB2.0 PHY
    (bit USB0PHYCLKGD=0) clock is not present, power is not good, and PLL has not locked,
    (bit USB0VBUSSENSE=0) PHY is not sensing voltage presence on the VBUS pin.

    Same results on two different EVM boards: they are equipped with "original" U-Boot/ARM_UBL/ DSP-AIS provided with EVM.

    The results found with http://arago-project.org/git/projects/linux-davinci.git?p=projects/linux-davinci.git;
    are the same as with kernel http/git.kernel.org/?P=linux/kernel/git/killman/linux-davinci.git;a=summary,
    where typical USB support (USB1.1 and USB 2.0) is reported as working.

    I am very very puzzled..
    I hope this can give somebody a clue to solve this problem.

     

  • USB 1.1 (only) working support can be actually estabilished if U-boot.bin module is up-to-date.
    The missing clock problem was avoided when I upgraded to u-boot.bin module provided in PSP 3.20.00.13.....
    Now remains to solve the kernel compilation error when enabling USB2.0/integra...
    Misha.