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.

DM365 USB OTG Mode

Hello,

How can I make the OTG mode of DM365 (LSP 2.1) work? I have compiled the kernel with USB support in OTG mode. Unfortunately, when I plug the disk on key or PC cable into the DEVM usb, nothing happens (I change the ID jumper position to host/slave mode). 

I tried to compile the kernel with USB host or slave modes. Both modes work properly. So the problem is in OTG code.

 

Thank you in advance.

  • Please see release notes included with LSP; depending on which LSP you are using, OTG may not be fully supported

  • Do you know when the new LSP with OTG support will be released?

    Is it possible to compile two separate versions the musb_hdrc module - host/slave, and replace(insmod/rmmod)  them dynamically on demand? Currently, as I can see, the musb_hdrc module is built using conditional (host/slave) compilation. Could you suggest any (relatively easy) way to have OTG functionality? It may be fake OTG, not depending on ID pin. We just need to dynamically switch USB role, upon user request.

    Thank you in advance.

     

  • nequam said:

    Do you know when the new LSP with OTG support will be released?

    Is it possible to compile two separate versions the musb_hdrc module - host/slave, and replace(insmod/rmmod)  them dynamically on demand? Currently, as I can see, the musb_hdrc module is built using conditional (host/slave) compilation. Could you suggest any (relatively easy) way to have OTG functionality? It may be fake OTG, not depending on ID pin. We just need to dynamically switch USB role, upon user request.

    Thank you in advance.

     

    I have a similar problem with the DM365.

    Although I have compiled the kernel with USB support in OTG mode:

    1)  when I plug a PC cable into the DM365 EVM usb, nothing happens. in the EVM side, in the PC side (windows XP) I get unrecognized USB device.

    2) When I unplug the cable, I get the following message from the EVM side:

    musb_stage2_irq 765: unhandled DISCONNECT transition (a_idle)

     

    Does anyone here succeed to enable the USB OTG on the DM365 and can help?

    Thanks,

    Erez

  • Have you inserted the relevant gadget application modules such as g_file_storage.ko, g_ether.ko etc.

    regards

    swami

  • swami said:

    Have you inserted the relevant gadget application modules such as g_file_storage.ko, g_ether.ko etc.

    regards

    swami

     

    No, they are not included in LSP 2.10 (DM365 LSP)

    should I take them from another place?

    Thanks,

    Erez

  • You would have to build them by following the steps in the user guide on how to build the kernel and related modules.

    regards

    swami

  • OK,.

    I updated the defconfig file using menuconfig (according to DM355 and LSP1.20 instructions).

    I rebuilt the kernel and modules, and installed the new modules.

    Now the USB OTG is working well on the DM365 EVM board (with LSP 2.10) when I use the NFS file system.

     

    The problem I have now is when I am using the DM365 EVM yaffs2 file system within its nand.

    I installed the file system according to "Restoring the NAND Flash Using NFS" procedure.

    I also copied the modules directory from the NFS to the nand flash /lib directory

    Than I boot from the flash with the nand file system and create backing file.

     

    when I run the following command

    DVEVM# modprobe g_file_storage file=/root/test

    I get the following response:

    Usage: /sbin/modprobe-bin [-v] [-V] [-C config-file] [-n] [-i] [-q] [-o <modname

    >] <modname> [parameters...]

    /sbin/modprobe-bin -r [-n] [-i] [-v] <modulename> ...

    /sbin/modprobe-bin -l -t <dirname> [ -a <modulename> ...]

     

    It seems to me that some how the g_file_storage.ko is not found by the EVM (although it is exist in /lb/modules...) with the nand file system.

     

    Thanks,

    Erez

     

     

     

  • I am not sure if /lib/modules is the correct place.  Per Getting Started Guide ( http://wiki.davincidsp.com/index.php/GSG:_DM365_DVEVM_Software_Setup ), you want to run the following commands to build and install any kernel modules.

    host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- modules
    host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- INSTALL_MOD_PATH=/home/<useracct>/workdir/filesys modules_install

    alternatively, you can copy to the directory you are running command from.

  • Juan Gonzales said:

    I am not sure if /lib/modules is the correct place.  Per Getting Started Guide ( http://wiki.davincidsp.com/index.php/GSG:_DM365_DVEVM_Software_Setup ), you want to run the following commands to build and install any kernel modules.

    host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- modules
    host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- INSTALL_MOD_PATH=/home/<useracct>/workdir/filesys modules_install

    alternatively, you can copy to the directory you are running command from.

    This is true, and this is what I have done when I used the NFS file system (where I build and install from my linux pc)

    Since I do not have access to the EVM file system while compiling, I did copy the modules directory (created by modules_install command) to the EVM to the exact location in the NFS file system (under /lib)

    Can you suggest a way to install the modules on the EVM nand file system using make xxx modules_install command?

     

  • you are correct that this would only work with NFS file-system..my bad.  I was thiking a while back when I was tinkering with this stuff that there was a longer named directory where all the *.ko files went... so I had to run it just for sanity check...it appears it does copy it into /lib/modules as you suggested, so my question would be did you just copy the one file into /lib/modules or did you copy the entire '2.6.18_pro500-davinci_evm-arm_V5t_le' (the one I seem to recall) subdirectory inside /lib/modules?

    Also, have you tried just copying the *.ko files to the directory where you are running from...

  • I found the problem. In this file system I have to use "modprobe-bin"  command instead of "modprobe" in the NFS file system.

    Now it is work fine.

    For your questions:

    1) I used the entire '2.6.18_pro500-davinci_evm-arm_V5t_le'  subdirectory inside /lib/modules

    2) When I used "modprobe-bin" command, there was no need to copy g_file_storage.ko to my directory.

     

    Thanks,

    Erez

  • I was wondering if anyone have tried  inserting g_ether kernel module.

    as soon as I run :

     modprobe g_ether

    it get a kernel panic and kernel crashes with register dumps on the console. the kernel I am using is 2.6.18_pro500 and the board is DM365.

    any help and feedback is appreciated.

     

    Thanks

  • Hi,

    Would you consider moving over to the DaVinci Staging git kernel in the aarago site?  You could get a more recent and better supported kernel.

    regards

    swami

  • Hi swami,

    According to DaVinci GIT Linux Kernel page in wiki.davincidsp.com, the arago GIT kernel still does not fully support the followings for DM365:

    Audio

    Video display driver

    video capture driver

    VPFE HW (including IPIPE and H3A)

    USB (HOST,GUDGET,OTG modes)

    Is this status outdated and the GIT new version supports all those drivers?

     

    Thanks,

    Erez

  • I remember that we have verified OTG on DM365 platform on the latest git.  We have been busy with AMxx devices and would be actively working on the Davinci git shortly.

    regards

    swami

  • I'd like to give it a try, where do I find the DaVinci Staging git kernel in the aarago site?

    I googled it nothing useful showed up. I'd appreciate if you gave me the link, thanks.

  • I think I found it. I was misled by the typo in your email "aarago" vs "arago". so just to verify, is this the link to the staging kernel?

    git://arago-project.org/git/people/sneha/linux-davinci-staging.git

     

     

  • well, I tried the above git (git://arago-project.org/git/people/sneha/linux-davinci-staging.git), it puked at compile time, complaining about:

     

    drivers/built-in.o: In function `davincifb_release_window':
    davinci_mmc.c:(.text+0x6c94): undefined reference to `davinci_disp_release_layer'
    drivers/built-in.o: In function `davincifb_remove':
    davinci_mmc.c:(.text+0x6cfc): undefined reference to `davinci_disp_unregister_callback'
    drivers/built-in.o: In function `get_video_mode':
    davinci_mmc.c:(.text+0x6d74): undefined reference to `davinci_enc_get_mode'
    drivers/built-in.o: In function `davincifb_blank':
    davinci_mmc.c:(.text+0x7468): undefined reference to `davinci_disp_disable_layer'
    drivers/built-in.o: In function `davincifb_pan_display':
    davinci_mmc.c:(.text+0x7548): undefined reference to `davinci_disp_is_second_field'
    davinci_mmc.c:(.text+0x7568): undefined reference to `davinci_disp_start_layer'