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.

USB mouse for DM6446

Hey,

 I am working on dm6446. And I want to activate USB MOUSE and keyboard on the
board.

When I power plug a mouse to the board, the power on LEDs of the mouse
doesn't glow.
 I have enabled the ps2 mouse support in the menuconfig for the kernel.

Please help me out to configure a usb mouse to the board.

Thanks in advance.

  • Swapnil,

    I hope you are using mini-A plug to connected USB mouse/keyboard to DM6446 OR have setup the ID pin jumper appropriately to make DM6446 work in host mode.

    Please provide the output of cat /proc/driver/musb_hdrc

    Regards,A
    Ajay

  • Hey,

          Thanks for replying.

    We are using mini-A plug and also we have set up jumper appropriately to make DM6446 work in host mode.

     

    On cat /proc/driver/musb_hdrc , we didn't find such "musb_hdrc" file or directory.

     

    Regards,

    Swapnil Ashtekar

  • You should enable debug at USb support > Inventra-> Enable debug messages

    Reagrds,
    Ajay

  • Yeah, It's done.

    We have also set Driver mode(USB Host) to USB Host. 

    Thanks.

    Regards,

    Swapnil

  • Are you using any TI released Linux source ? I think you are using community's source and thus procfs will not be available. I would recommend to use TI releases sources available at http://arago-project.org/git/people/?p=sneha/linux-davinci-staging.git;a=summary

    Regards,
    Ajay

     

  • We are using dvsdk_1_30_01_41 downloaded from the link :

    http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/dvsdk/mv_dvsdk/v1_30/index.html


    Thanks.

    Regards,

    Swapnil Ashtekar

  • Then it must have "Enable debug messages" and drivers/usb/musb/musb_procfs.c file. If you have enabled "Enable debug messages" then tou should see /proc/driver/musb_hdrc entry. Can you check these things again?

    Regards,
    Ajay

  • Hi,

    There is no musb_hdrc on board.

    root@10.42.43.10:~# cd /proc/driver/                                                                                                                                   
    root@10.42.43.10:/proc/driver# ls
    aic33-audio-start  aic33-audio-stop  rtc

     

    and

    musb_procfs.c file present in /home/swapnil/workdir/lsp/ti-davinci/linux-2.6.10_mvl401/drivers/usb/musb

    swapnil@swapnil-Studio-1558:~/workdir/lsp/ti-davinci/linux-2.6.10_mvl401$ cd  drivers/usb/musb/
    swapnil@swapnil-Studio-1558:~/workdir/lsp/ti-davinci/linux-2.6.10_mvl401/drivers/usb/musb$ pwd
    /home/swapnil/workdir/lsp/ti-davinci/linux-2.6.10_mvl401/drivers/usb/musb
    swapnil@swapnil-Studio-1558:~/workdir/lsp/ti-davinci/linux-2.6.10_mvl401/drivers/usb/musb$ ls
    built-in.o  cppi_dma.o  davinci.o  g_ep0.c   musbdefs.h     musbhdrc.h   musb_host.h  musb_procfs.c  plat_arc.h  plat_uds.o   virthub.c
    cppi_dma.c  davinci.c   debug.h    Kconfig   musb_gadget.c  musb_hdrc.o  musb_host.o  otg.c          plat_cnf.h  tusb_6010.c  virthub.h
    cppi_dma.h  davinci.h   dma.h      Makefile  musb_gadget.h  musb_host.c  musbhsdma.c  otg.h          plat_uds.c  tusb_6010.h  virthub.o

     

    I'm attaching booting sequence for your reference.

    Please check.

     

    Thanks

    U-Boot 1.1.4 (Aug  4 2010 - 17:08:54)

    U-Boot code: 81080000 -> 81096DE0  BSS: -> 8109FCD0
    RAM Configuration:
    Bank #0: 80000000 256 MB
    SPANSION ***Flash: 16 MB
    In:    serial
    Out:   serial
    Err:   serial
    PLL2_PLLM is 19,PLL2_DIV2 is 1ARM Clock :- 229MHz
    DDR Clock :- 135MHz
    uboot version for davinci 256m with no mac addr and no 430 ,by wcl0715
    Hit any key to stop autoboot:  0
    TFTP from server 10.42.43.1; our IP address is 10.42.43.10
    Filename 'uImage'.
    Load address: 0x80700000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################
    done
    Bytes transferred = 1578032 (181430 hex)
    ## Booting image at 80700000 ...
       Image Name:   Linux-2.6.10_mvl401
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1577968 Bytes =  1.5 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
    OK

    Starting Davinci linux kernel...

    Uncompressing Linux......................................................................................................... done, booting thee
                                                                                                                                                   Linux version 2.6.10_mvl1
    CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
    CPU0: D VIVT write-back cache
    CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
    CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
    Machine: DaVinci EVM
    Memory policy: ECC disabled, Data cache writeback
    DM6443
    Built 1 zonelists
    Kernel command line: video=davincifb:vid0=720x480x16,2500K:vid1=720x480x16,2500K:osd0=720x480x16,2025K davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=M
    Unknown boot option `davinci-display.video0_bufsize=691200': ignoring
    PID hash table entries: 512 (order: 9, 8192 bytes)
    Console: colour dummy device 80x30
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 120MB = 120MB total
    Memory: 118272KB available (2731K code, 549K data, 180K init)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    spawn_desched_task(00000000)
    desched cpu_callback 3/00000000
    ksoftirqd started up.
    desched cpu_callback 2/00000000
    desched thread 0 started up.
    NET: Registered protocol family 16
    DaVinci: 71 gpio irqs
    Registering platform device 'serial8250.0'. Parent at platform
    Registering platform device 'musb_hdrc'. Parent at platform
    Registering platform device 'mmc.0'. Parent at platform
    DaVinci I2C DEBUG: 20:02:51 Feb 17 2011
    Registering platform device 'i2c'. Parent at platform
    ch0 default output "COMPOSITE", mode "NTSC"
    MUX: initialized LOEEN
    MUX: initialized LFLDEN
    VPBE Encoder Initialized
    LogicPD encoder initialized
    SCSI subsystem initialized
    usbcore: registered new driver usbfs
    usbcore: registered new driver hub
    musb_hdrc: version 2.2a/db-0.4.8 [pio] [host] [debug=0]
    musb_hdrc: ConfigData=0x06 (UTMI-8, dyn FIFOs, SoftConn)
    musb_hdrc: MHDRC RTL version 1.300
    musb_hdrc: USB Host mode controller at c8002000 using PIO, IRQ 12
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    MUX: initialized MCBSP0
    JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
    yaffs Feb 17 2011 20:02:38 Installing.
    Registering platform device 'davincifb.0'. Parent at platform
    davincifb davincifb.0: dm_osd0_fb: 720x480x16@0,0 with framebuffer size 2025KB
    davincifb davincifb.0: dm_vid0_fb: 720x480x16@0,0 with framebuffer size 2500KB
    davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KB
    davincifb davincifb.0: dm_vid1_fb: 720x480x16@0,0 with framebuffer size 2500KB
    usb 1-1: new high speed USB device using musb_hdrc and address 2
    watchdog: TI DaVinci Watchdog Timer: timer margin 64 sec
    Registering platform device 'davinci_resizer.2'. Parent at platform
    Registering platform device 'davinci_previewer.2'. Parent at platform
    Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
    Registering platform device 'serial8250'. Parent at platform
    ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
    io scheduler noop registered
    io scheduler anticipatory registered
    RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
    loop: loaded (max 8 devices)
    Registering platform device 'ti_davinci_emac'. Parent at platform
    usb 1-1: Product: Mass Storage Device
    usb 1-1: Manufacturer: JetFlash
    usb 1-1: SerialNumber: BPT7LHLI
    TI DaVinci EMAC: MAC address is deadbeaf
    TI DaVinci EMAC Linux version updated 5.0
    TI DaVinci EMAC: Installed 1 instances.
    netconsole: not configured, aborting
    i2c /dev entries driver
    Linux video capture interface: v1.00
    Registering platform device 'vpfe.1'. Parent at platform
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    vpfe vpfe.1: DaVinci v4l2 capture driver V1.0 loaded
    Registering platform device 'DavinciDisplay.1'. Parent at platform
    Trying to register davinci display video device.
    layer=c07d5a00,layer->video_dev=c07d5b64
    Trying to register davinci display video device.
    layer=c07d5600,layer->video_dev=c07d5764
    davinci_init:DaVinci V4L2 Display Driver V1.0 loaded

     Davici AEW Driver cannot be loaded
     VIDEO PORT is not enabledData Flow path from CCDC is disabled

     Davinci AF driver cannot be loaded
     VIDEO PORT is not enabled
     CCDC needs to be configured<6>Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
    ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
    MUX: initialized HDIREN
    MUX: initialized ATAEN
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    Palm Chip BK3710 IDE Register Fail
    elevator: using anticipatory as default io scheduler
    Initializing USB Mass Storage driver...
    scsi0 : SCSI emulation for USB Mass Storage devices
    usbcore: registered new driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new driver usbhid
    drivers/usb/input/hid-core.c: v2.0:USB HID core driver
    mice: PS/2 mouse device common for all mice
    mmc mmc.0: Supporting 4-bit mode
    mmc mmc.0: Using DMA mode
    Registering platform device 'davinci-audio.0'. Parent at platform
    mmcblk0: mmc0:bb13 SD02G 1931264KiB
     mmcblk0: p1
    NET: Registered protocol family 2
    IP: routing cache hash table of 512 buckets, 4Kbytes
    TCP: Hash tables configured (established 8192 bind 16384)
    NET: Registered protocol family 1
    NET: Registered protocol family 10
    IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    IP-Config: Complete:
          device=eth0, addr=10.42.43.10, mask=255.255.255.0, gw=255.255.255.255,
         host=10.42.43.10, domain=, nis-domain=(none),
         bootserver=10.42.43.1, rootserver=10.42.43.1, rootpath=
    Looking up port of RPC 100003/2 on 10.42.43.1
    Looking up port of RPC 100005/1 on 10.42.43.1
    VFS: Mounted root (nfs filesystem).
    Freeing init memory: 180K
    INIT: version 2.85 booting
      Vendor: JetFlash  Model: Transcend 4GB     Rev: 8.07
      Type:   Direct-Access                      ANSI SCSI revision: 02
    SCSI device sda: 7843840 512-byte hdwr sectors (4016 MB)
    sda: assuming Write Enabled
    sda: assuming drive cache: write through
    SCSI device sda: 7843840 512-byte hdwr sectors (4016 MB)
    sda: assuming Write Enabled
    sda: assuming drive cache: write through
     sda:<7>usb-storage: queuecommand called
     sda1
    Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
    Mounting a tmpfs over /dev...done.
    Creating initial device nodes...cat: /proc/ide/*/media: No such file or directory
    cat: /proc/ide/*/media: No such file or directory
    done.
    Activating swap...done.
    Remounting root filesystem...done.
    Calculating module dependencies
    WARNING: Couldn't open directory /lib/modules/2.6.10_mvl401: No such file or directory
    FATAL: Could not open /lib/modules/2.6.10_mvl401/modules.dep.temp for writing: No such file or directory
    Loading modules:
    Checking all file systems: fsck
    fsck 1.35 (28-Feb-2004)
    Mounting local filesystems: mount nothing was mounted
    Cleaning: /tmp /var/lock /var/run done.
    Setting up networking (ifupdown) ..
    Cleaning: /etc/network/run/ifstate done.
    Starting network interfaces: done.
    Starting hotplug subsystem:
       pci    
       pci      [success]
       usb    
       usb      [success]
       isapnp 
       isapnp   [success]
       ide    
       ide      [success]
       input  
       input    [success]
       scsi   
    FATAL: Could not load /lib/modules/2.6.10_mvl401/modules.dep: No such file or directory
       scsi     [success]
    done.
    Starting portmap daemon: portmap.
    done.
    Setting pseudo-terminal access permissions...done.
    Updating /etc/motd...done.
    INIT: Entering runlevel: 3
    Starting NFS common utilities: statd lockd.
    Starting internet superserver: inetd.
    Starting MontaVista target tools daemon: mvltdmvltd version 2.1 MontaVista Software,Inc.
    mvltd[1094]: can't send broadcast message: Network is unreachable
    mvltd[1094]: can't send broadcast message: Network is unreachable
    mvltd[1095]: started on port 34577
    .
    MontaVista(R) Linux(R) Professional Edition 4.0.1 (0600980)

    10.42.43.10 login: root
    Last login: Sun Feb  1 12:27:11 2004 on console
    Linux 10.42.43.10 2.6.10_mvl401 #8 Mon Mar 7 15:43:17 IST 2011 armv5tejl GNU/Linux

    Welcome to MontaVista(R) Linux(R) Professional Edition 4.0.1 (0600980).

     

    Thanks

  • As you are using v2.6.10 based kernel so I think you may have debug level to be set in "Eable dbeug message". if so then set it to '1' and not '0'. Also check if musb_procfs.c is getting compiled and procfs related call are successfully going through.

    Regards,
    Ajay

  • Hi,

     

    There isn't any Enable Debug Message option in menuconfig.

     

    Please check the Inventra option in menucofig. Is it similar to the one you said.

    Device Drivers---> USB Support-->>Inventra USB Highspeed Dual Role Controller Support.

     

     

    Thanks

     

  • Hi,

    I changed the logging level to 1 and now i can see musb_hdrc.

    Please see following which i did as cat /proc/driver/musd_hdrc

    root@10.42.43.10:~# cat /proc/driver/musb_hdrc
    Status: MHDRC, Mode=HOST (Power=71, DevCtl=5d)  PDR interupt Mask=1f71e1f        PDR Interrypt Source=0
    Options: [pio] [host] [debug=1] [eps=9]
    DaVinci: ctrl=00 stat=1 phy=1f0
            rndis=00000 auto=0000 intsrc=00000000 intmsk=01f71e1f
    End-0:  txcsr 0000 interval 08 max 0000 type 40; dev 2 hub 0 port 0
            (queue empty)
    End-1:  txcsr 2000 interval 00 max 0200 typusb 1-1: USB disconnect, address 2
    e 61; dev 2 hub 0 port 0
            (queue empty)

    End-1:  rxcsr 0200 interval 00 max 0200 type 62; dev 2 hub 0 port 0
            (queue empty)
    End-2:  txcsr 0000 interval 00 max 0000 type 00; dev 0 hub 0 port 0
            (queue empty)

    End-2:  rxcsr 0000 interval 00 max 0000 type 00; dev 0 hub 0 port 0
            (queue empty)
    End-3:  txcsr 0000 interval 00 max 0000 type 00; dev 0 hub 0 port 0
            (queue empty)

    End-3:  rxcsr 0000 interval 00 max 0000 type 00; dev 0 hub 0 port 0
            (queue empty)
    End-4:  txcsr 0000 interval 00 max 0000 type 00; dev 0 hub 0 port 0
            (queue empty)

    End-4:  rxcsr 0000 interval 00 max 0000 type 00; dev 0 hub 0 port 0
            (queue empty)

     

     

     

    After connecting the USB mouse i get following error:

    root@10.42.43.10:~# DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected

     

    Thanks

  • Swapnil,

    DEVCTL register value shows that Vbus is on and port is in host mode but the power register (=0x71) shows D0 bit to be set which is SUSPENDM. Can you disable SUSPENDM in musb_start function of drivers/usb/musb/plat_uds.c file? Please let me know the status after this.

    Regards,
    Ajay

  • Hi,

       We searched SUSPENDM in musb_start function in driver/usb/musb/plat_uds.c,but could not find.

    Please find attach plat_uds.c file.

    Thanks

    1157.plat_uds.txt

  • you need to comment out MGC_M_POWER_ENSUSPEND in musb_start.

    Ajay

  • Hi ,

       I did what you suggested and compiled the kernel.  After booting and connecting USB mouse, I am getting same errors.


    Is problem with USB mouse related to i2c bus ? I am wondering is it like USB mouse is getting power, but not working due to i2c bus errors(Please see booting sequence above).

    After connecting the USB mouse i get following error:

    root@10.42.43.10:~# DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected
    DaVinci I2C WARNING: i2c: NACK detected

     

    Thanks.

     

  • Hey  Ajay,

                   I installed new dvsdk version 2.0 with kernel 2.6.18,

    now when I do cat /proc/driver/usb/musb_hdrc , after connecting usb mouse, I get following

    Status: MHDRC, Mode=Host (Power=f0, DevCtl=90)
    OTG state: a_wait_vfall; active
    Options: cppi-dma, host, debug=1 [eps=5]
    Root port status: 00000100
    DaVinci: ctrl=00 stat=0 phy=1f0
           rndis=00000 auto=0000 intsrc=00000000 intmsk=01f71e1f
    CPPI: txcr=1 txsrc=0 txena=f; rxcr=1 rxsrc=0 rxena=f

     


    Still usb mouse getting power but isn't working.

    Please suggest possible solutions.

    Thanks.

  • DevCTL=0x90 shows that controller is in device mdoe. please make sure to eihter use mini-A plug (different than mini-B)  or jumper on evm to make sure id pin is grounded.

    Ajay

  • Hey Ajay,

                    On the same kernel, on connecting the mass storage device and doing cat /proc/driver/musb_hdrc,

    we find

         root@10.42.43.10:/# cat /proc/driver/musb_hdrc
    Status: MHDRC, Mode=Host (Power=f0, DevCtl=5d)
    OTG state: a_host; active
    Options: cppi-dma, host, debug=1 [eps=5]
    Root port status: 00000503
    DaVinci: ctrl=00 stat=1 phy=1f0
            rndis=00001 auto=0000 intsrc=00000000 intmsk=01f71c1f
    CPPI: txcr=1 txsrc=0 txena=f; rxcr=1 rxsrc=0 rxena=f



    And now on connecting USB Mouse, we get

    root@10.42.43.10:/# cat /proc/driver/musb_hdrc
    Status: MHDRC, Mode=Peripheral (Power=f0, DevCtl=99)
    OTG state: b_idle; inactive
    Options: cppi-dma, host, debug=1 [eps=5]
    Root port status: 00000100
    DaVinci: ctrl=00 stat=0 phy=1f0
            rndis=00001 auto=0000 intsrc=00000000 intmsk=01f71e1f
    CPPI: txcr=1 txsrc=0 txena=f; rxcr=1 rxsrc=0 rxena=f


    I didn't  understand the change in the DevCTL values, and while doing this all, the pin number 2 and 3 of J7 are short.
    To use USB Mouse, which mode is preferable ?

    Thanks.

  • This is strange. D7 bit of Devctl should be '0' in both cases of mass storage or mouse. In all host scenarios ID pin should be shorted and DECCTL.D7=0.

    Regards,

    Ajay