• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM3x DaVinci Video Processor Forum » mt9m111 not supported in dm365?
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

mt9m111 not supported in dm365?

This question is not answered
HM Yang
Posted by HM Yang
on Apr 22 2012 10:56 AM
Prodigy205 points

I have used a board of dm365 and DVSDK 4.0.2 package on linux 2.6.32 with a soc camera of mt9m111. Some modifications have been made for board_dm365_evm.c for adding mt9m111 device info.

But when the system boots up into mt9m111_probe() in mt9m111.c, the booting is crashed for no soc_camera_device data in client->dev.platform_data which should be filled in vpfe_capture.c ( I think so ). In i2c_core.c,  it is simply give the value of  the board_info.platform_data that is set in board_dm365_evm.c.

Looking up the vpfe_capture.c in detailed, I find it has no code to support soc camera. do I miss some thing ?

does any body have success in using mt9m111 with dm365 ?

any help appreciated.

 

dm365 mt9m111 soc camera
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Prabhakar Lad
    Posted by Prabhakar Lad
    on Apr 22 2012 23:55 PM
    Genius4675 points

    Hi,

    What all changes have you made to the board file can you attach it.

    Can you also attach the log of what crash are you getting.

    Thx,

    --Prabhakar Lad

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • HM Yang
    Posted by HM Yang
    on Apr 23 2012 22:27 PM
    Prodigy205 points

     

    hi Lad,

    here is board-dm365-evm.c and booting message.

    http://www.headcall.com/xx/mt9m111-error.tar.gz


    I have config of mt9m111 info as

    static struct v4l2_input mt9m111_inputs[] = {
     {
      .index = 0,
      .name = "Camera",
      .type = V4L2_INPUT_TYPE_CAMERA,
      //.std = V4L2_STD_MT9M111_STD_ALL,
     }
    };

    static struct vpfe_subdev_info vpfe_sub_devs[] = {
     {
      .module_name = "mt9m111",
      .is_camera = 1,
      .grp_id = VPFE_SUBDEV_MT9M111,
      .num_inputs = ARRAY_SIZE(mt9m111_inputs),
      .inputs = mt9m111_inputs,
      .ccdc_if_params = {
       //.if_type = VPFE_RAW_BAYER,
       .if_type = VPFE_YCBCR_SYNC_8,
       .hdpol = VPFE_PINPOL_POSITIVE,
       .vdpol = VPFE_PINPOL_POSITIVE,
      },
      .board_info = {
       I2C_BOARD_INFO("mt9m111", 0x5d),
       /* this is for PCLK rising edge */
       .platform_data = (void *)1,
      },
     },
    }


    the booting process is broken in mt9m111.c


    static int mt9m111_probe(struct i2c_client *client,
        const struct i2c_device_id *did)
    {
     struct mt9m111 *mt9m111;
     struct soc_camera_device *icd = client->dev.platform_data;
     struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
     struct soc_camera_link *icl;
     int ret;

     if (!icd) {
      dev_err(&client->dev, "MT9M11x: missing soc-camera data!\n");
      return -EINVAL;
     }

     /* the booting process is broken here,
      * for icd = ( void* ) 1 , which is from board_dm365_evm.c
      */
     printk( "\n\n\nNext, crash +++++++for icd=%p\n\n\n", icd );
     icl = to_soc_camera_link(icd);
     printk( "\n\n\nNo chance getting here++++++\n\n\n" );

     
     if (!icl) {
      dev_err(&client->dev, "MT9M11x driver needs platform data\n");
      return -EINVAL;
     }

     .....

    }


    If I remove all codes related to icd & icl in the funcs of mt9m111_probe( ), mt9m111_video_probe( )
    the booting is OK. but I get all zero in captured image.

     

     

     

     


     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prabhakar Lad
    Posted by Prabhakar Lad
    on Apr 24 2012 00:10 AM
    Genius4675 points

    Hi Yang,

    The modifications looks ok. Which Kernel version are you using?

    Does  mt9m111 sensor has a i2c switch as mt9p031 has PCA9543A, have look at it.

    And also the tvp514x and the mt9m111 sensor has same i2c address because of which only of it

    can be registered and this is handled by module parameter vpfe_capture.interface if set to 1

    sensor gets registered and if set to 0 tvp514x/tvp7002 get registered. And also looking at this function

    you need to dm365evm_setup_video_input() you need to add entry for your subdev.

    I am referring to 2.6.37 kernel here.

    Did you add the driver code for mt9m111 there is already a driver

    for mt9m111 in opensource why are you changing it ?

    Thx,

    --Prabhakar Lad

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • HM Yang
    Posted by HM Yang
    on Apr 24 2012 09:59 AM
    Prodigy205 points

    hi Lad,

    I have not used PCA9543A to control mt9m111, so I have remove all related codes.
    In the bootargs, I set interface=1 and dm365evm_setup_video_input() is also properly set,
    otherwise mt9m111 driver should not be selected.

    I have not changed mt9m111.c except printing the error message in the broken place.

    the problem is here, in mt9m111.c


     /* the booting process is broken here,
      * for icd = ( void* ) 1 , which is from board_dm365_evm.c
      */
     printk( "\n\n\nNext, crash +++++++for icd=%p\n\n\n", icd );
     icl = to_soc_camera_link(icd);
     printk( "\n\n\nNo chance getting here++++++\n\n\n" );

    the icd should point to a struct soc_camera_device as it was assigned at the beginning ,

    struct soc_camera_device *icd = client->dev.platform_data;

    when I remove all codes about icd & icl, that's OK for i2c checking and finally registered successful.


    does the 2.6.37 change some for mt9m111 ? I will try it. is it included in DVSDK 4.0.3 ?
    or other place ?

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prabhakar Lad
    Posted by Prabhakar Lad
    on Apr 24 2012 23:55 PM
    Genius4675 points

    Hi,

    Can you post what changes have you done in dm365evm_setup_video_input() function.

    Yes I can find the mt9m111 source in 2.6.37 kernel, No idea about the DVSDK.

    does the 2.6.37 change some for mt9m111 ? I will try it. is it included in DVSDK 4.0.3 ?
    or other place ?

    Probably yes some has changes it.


    Are you also using 2.6.37 Kernel?

    Thx,

    --Prabhakar Lad

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Hongfeng Wang
    Posted by Hongfeng Wang
    on May 02 2012 09:56 AM
    Genius3115 points

    you shouldn't use .platformdata=(void*)1; instead you should pass a real value to it. something like this:

    struct soc_camera_link mt9m111_link={
    .bus_id=0,
    .flags=0,
    ...
    }


    .platformdata=&mt9m111_link;
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • dibin moolakadan1
    Posted by dibin moolakadan1
    on Sep 25 2012 07:31 AM
    Intellectual490 points

    Hi,

    can you post a sample 

     mt9m111_link  structure , am integrating mt9m112 to ginger bread ,
    
    
    Kind regards,
    Dibin
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use