logo

Could not compile stylesheet for simplistic. Using last compiled stylesheet.

CAMERA interface (J5) with COM module

posted in IGEP COM MODULE
Tuesday, June 25 2013, 07:11 PM
0
Hi

i use a COM MODULE with OS 2.6.37.5 version.
I try to use the J5 connector to interface an analog video signal. On my expansion board (hastycam) i use a TVP5151 video decoder.
Each time i launch the OMAP3isp module i got the following message.
[    5.809570] omap3isp supply VDD_CSIPHY1 not found, using dummy regulator
[    5.816650] omap3isp supply VDD_CSIPHY2 not found, using dummy regulator
[    5.823730] omap3isp omap3isp: Revision 15.0 found
[    5.828765] omap-iommu omap-iommu.0: isp: version 1.1
[    5.938934] isp_register_subdev_group: Unable to register subdev tvp5151


does that mean that the system cannot communicate with the TVP5151 ?
though the configuration of I2C3 seems to be good (see the attached expansion file "exp-hastycam.c".
You also find in annex the debug output at power up.

has somebody an idea?
It seems that a similar issue occured in september 2012 to "petej" but no solution appears.

thanks

julien
Responses (16)
  • Accepted Answer

    Wednesday, June 26 2013, 08:52 AM - #permalink
    0
    Hi Julien,

    Normally the following message
     isp_register_subdev_group: Unable to register subdev tvp5151
    

    outs when the system can't comunicate with the device. I'll recommend to add some printk in probe function of tvp5151 driver. Also, check that the pins of the I2C that you use is correctly muxed, and the RESET and PWRDOWN are with correct value.

    Hope it helps you.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, June 26 2013, 06:39 PM - #permalink
    0
    Hi

    i add some printk and the problem comes from v4l2common.c :
    if (client == NULL || client->driver == NULL)
    		goto error; 


    It was the same problem for "petej" in august/september 2012.
    Moreover i checked the signals on I2C3 (close to TVP5151) and nothing happens.
    waht does that mean?
    thanks
    julien
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, June 27 2013, 09:06 AM - #permalink
    0
    Hi

    First try to add some printk in drivers/media/video/tvp5150.c, tvp5150_probe function to make sure that the driver is called.

    If this function fails, probably is because there is some problem with I2C. Make sure that you have the pin mux set for i2c. For I2C3 you can do :
    mount -t debugfs nodev /sys/kernel/debug
    cat /sys/kernel/debug/omap_mux/i2c3* 
    

    Please, paste the output.
    If mux is correctly set, then you should check if the reset pin and the pwrdown pin are also configured correctly.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, June 27 2013, 07:13 PM - #permalink
    0
    Hi

    I assume there was a mistake on the MUX because now theIGEP COM board communicates with the TVP5151
    after launching the oma3-isp module, the boot sequence is the following :
    [    5.773040] omap3isp supply VDD_CSIPHY1 not found, using dummy regulator
    [    5.780090] omap3isp supply VDD_CSIPHY2 not found, using dummy regulator
    [    5.787200] omap3isp omap3isp: Revision 15.0 found
    [    5.792205] omap-iommu omap-iommu.0: isp: version 1.1
    [    5.915191] tvp5150 3-005d: chip found @ 0xba (OMAP I2C adapter)
    [    6.019012] tvp5150 3-005d: *** unknown tvp8081 chip detected.
    [    6.025085] tvp5150 3-005d: *** Rom ver is 130.131


    I don't understand why the chip is recognized as tvp8081?

    after the COM module sends the commands which are recommended in your "HOW to setup tvp5151 decoder":
    media-ctl -r -l '"tvp5150 3-005d":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
    media-ctl -v --set-format '"tvp5150 3-005d":0 [UYVY 720x480]'
    media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY 720x480]'
    media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY 720x480]' 
    .

    Unfortunately these commands generate some others issues :
    Resetting all links to inactive
    Setting up link 16:0 -> 5:0 [1]
    Setting up link 5:1 -> 6:0 [1]
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad tvp5150 3-005d/0
    [    6.105041] tvp5150 3-005d: Unable to query std
    Unable to set format: Invalid argument (-22)
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad OMAP3 ISP CCDC/0
    Unable to set format: Invalid argument (-22)
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad OMAP3 ISP CCDC/1
    Unable to set format: Invalid argument (-22)


    Could you tell me what happens ? what are the reasons of these issues ?

    thanks a lot

    julien
    The reply is currently minimized Show
  • Accepted Answer

    Friday, June 28 2013, 09:04 AM - #permalink
    0
    Probably the two issues are related. We found same issue in the past and we solved following the TVP5151 power up sequence (see datasheet). See the following code that we execute before the omap3_init_camera call.

     748         /*
     749          * From TVP5151 datasheet Table 3-8. Reset and Power-Down Modes
     750          *   PDN RESETB CONFIGURATION
     751          *    0    0    Reserved (unknown state)
     752          *    0    1    Powers down the decoder
     753          *    1    0    Resets the decoder
     754          *    1    1    Normal operation
     755          *
     756          * If TVP5151_PDN and TPVP5151_RESET is set to 0 the I2C2_SDA line
     757          * is forced to low level and all devices connected to I2C2 stop
     758          * working, this affects to EEPROM connected to the same bus. By default
     759          * we should configure these pins to logical 1 (Normal operation)
     760          *
     761          */
     762         if ((gpio_request(pdn_pin, "TVP5151 PDN") == 0) &&
     763                 (gpio_direction_output(pdn_pin, 0) == 0))
     764                 gpio_export(pdn_pin, 0);
     765         else
     766                 pr_warning("IGEP: Could not obtain gpio TVP5151 PDN\n");
     767 
     768         if ((gpio_request(reset_pin, "TVP5151 RESET") == 0)
     769                 && (gpio_direction_output(reset_pin, 0) == 0)) {
     770                 gpio_export(reset_pin, 0);
     771                 /* Initialize TVP5151 power up sequence */
     772                 udelay(10);
     773                 gpio_set_value(pdn_pin, 1);
     774                 udelay(10);
     775                 gpio_set_value(reset_pin, 1);
     776                 udelay(200);
     777         } else
     778                 pr_warning("IGEP: Could not obtain gpio TVP5151 RESET\n");
    The reply is currently minimized Show
  • Accepted Answer

    Friday, June 28 2013, 10:10 AM - #permalink
    0
    HI

    as i created the expansion file with the BERLIN expansion file, i used the 0Xba I2C address for the TVP5151. But on our expansion board I2CSEL=0 so the address must be modified to Oxb8.
    NOW, as you can see below, i have only one issue about the set up of the format.
    Cam setup...
    [    5.847045] omap3isp supply VDD_CSIPHY1 not found, using dummy regulator
    [    5.854034] omap3isp supply VDD_CSIPHY2 not found, using dummy regulator
    [    5.861175] omap3isp omap3isp: Revision 15.0 found
    [    5.866180] omap-iommu omap-iommu.0: isp: version 1.1
    [    5.989654] tvp5150 3-005c: chip found @ 0xb8 (OMAP I2C adapter)
    [    6.089233] tvp5150 3-005c: *** unknown tvp5151 chip detected.
    [    6.095306] tvp5150 3-005c: *** Rom ver is 1.0
    debut media-ctl...
    Resetting all links to inactive
    Setting up link 16:0 -> 5:0 [1]
    Setting up link 5:1 -> 6:0 [1]
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x576 on pad tvp5150 3-005c/0
    Unable to set format: Invalid argument (-22)
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x576 on pad OMAP3 ISP CCDC/0
    Unable to set format: Invalid argument (-22)
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x576 on pad OMAP3 ISP CCDC/1
    Unable to set format: Invalid argument (-22)
    

    I tried to increase the time betWeen the release of POWER DOW and RESET and the time between the release of RESET and the beginning of I2C activity but i have got the same issue.

    Do you know which register is used to set up the format ?

    thanks

    julien
    The reply is currently minimized Show
  • Accepted Answer

    Monday, July 01 2013, 09:21 AM - #permalink
    0
    Are you using the media-ctl provided by our IGEP firmware or you have built your own ?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, July 01 2013, 10:01 AM - #permalink
    0
    Hi

    i use the media-ctl provided by your IGEP firmware in the following explanation about the TVP5151 :
    http://labs.isee.biz/index.php/How_to_setup_tvp5151_video_decoder
    i did not build my own. Should i build media-ctl ?

    thanks
    julien
    The reply is currently minimized Show
  • Accepted Answer

    Monday, July 01 2013, 06:39 PM - #permalink
    0
    Hi

    following your last question, i tried to build my own media-ctl.
    With the sources from[url]http://git.ideasonboard.org/media-ctl.git/commit/b16cbe7bce0fd8d9d940473a2272b6b0148795c3[/url]

    i built my own media-ctl with the 2.6.37 kernel headers.
    The result seems to be better than before because media-ctl can set the format but the format is unknown :
    Resetting all links to inactive
    Setting up link 16:0 -> 5:0 [1]
    Setting up link 5:1 -> 6:0 [1]
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad tvp5150 3-005c/0
    [    6.112854] tvp5150 3-005c: code=x2006 width=720 height=480 colorspace=0x1
    Format set: unknown 720x480
    Setting up format unknown 720x480 on pad OMAP3 ISP CCDC/0
    Format set: unknown 720x480
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad OMAP3 ISP CCDC/1
    Format set: unknown 720x480
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad OMAP3 ISP CCDC/1
    Format set: unknown 720x480
    


    what does the code x2006 mean?

    Moreover when i plug the camera thge result is different the format is 720x576 :
    Resetting all links to inactive
    Setting up link 16:0 -> 5:0 [1]
    Setting up link 5:1 -> 6:0 [1]
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad tvp5150 3-005c/0
    [    6.073822] tvp5150 3-005c: code=x2006 width=720 height=576 colorspace=0x1
    Format set: unknown 720x576
    Setting up format unknown 720x576 on pad OMAP3 ISP CCDC/0
    Format set: unknown 720x576
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad OMAP3 ISP CCDC/1
    Format set: unknown 720x480
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad OMAP3 ISP CCDC/1
    Format set: unknown 720x480
    

    How does the system know the format (I2C ?)
    Why the format is unknown?

    thanks

    julien
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, July 02 2013, 09:35 AM - #permalink
    0
    Hi,

    The format code x2006 is an hexadecimal number that represents the V4L2 code V4L2_MBUS_FMT_UYVY8_2X8.

    The system format is hardcoded in the tvp5150 driver and the format is unknown probably because the media-ctl application doesn't know the format, but this is not a problem.

    If I do the same steps, my output is very similar to you.

    root@igep00x0:~# media-ctl -v --set-format '"tvp5150 2-005c":0 [UYVY 720x480]'
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad tvp5150 2-005c/0
    [  359.411315] tvp5150 2-005c: code=x2006 width=720 height=480 colorspace=0x1
    Format set: unknown 720x480
    Setting up format unknown 720x480 on pad OMAP3 ISP CCDC/0
    Format set: unknown 720x480
    root@igep00x0:~# media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY 720x480]'
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad OMAP3 ISP CCDC/0
    Format set: unknown 720x480
    root@igep00x0:~# media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY 720x480]' 
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Setting up format UYVY 720x480 on pad OMAP3 ISP CCDC/1
    Format set: unknown 720x480
    


    I can capture images from the video decoder, is working for you ?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, July 02 2013, 06:42 PM - #permalink
    0
    HI

    its seems working at least during the initialisation :
    Camera: Fichier de périphérique ouvert
    Video format set: UYVY? (59565955) 720x576 (stride 1440) buffer size 829440
    Buffers alloués : 2 
    Buffer 0, adresse = 0x4137f000
    Buffer 1, adresse = 0x414cb000
    Camera: Stream on...
    Fin init vidéo 
    


    but to get this result i must select the /dev/video4.
    From /dev/video0 to /dev/video3 any device did not work.
    For some of them the error message was that the device is an output !

    when i take a look at /sys/class, i get the following
    lrwxrwxrwx    1 root     root             0 Jan  1 00:02 video0 -> ../../devices/platform/omap3isp/video4linux/video0
    lrwxrwxrwx    1 root     root             0 Jan  1 00:00 video1 -> ../../devices/platform/omap_vout/video4linux/video1
    lrwxrwxrwx    1 root     root             0 Jan  1 00:00 video2 -> ../../devices/platform/omap_vout/video4linux/video2
    lrwxrwxrwx    1 root     root             0 Jan  1 00:02 video3 -> ../../devices/platform/omap3isp/video4linux/video3
    lrwxrwxrwx    1 root     root             0 Jan  1 00:02 video4 -> ../../devices/platform/omap3isp/video4linux/video4
    lrwxrwxrwx    1 root     root             0 Jan  1 00:02 video5 -> ../../devices/platform/omap3isp/video4linux/video5
    lrwxrwxrwx    1 root     root             0 Jan  1 00:02 video6 -> ../../devices/platform/omap3isp/video4linux/video6
    lrwxrwxrwx    1 root     root             0 Jan  1 00:02 video7 -> ../../devices/platform/omap3isp/video4linux/video7
    lrwxrwxrwx    1 root     root             0 Jan  1 00:02 video8 -> ../../devices/platform/omap3isp/video4linux/video8

    Why /dev/video1 and /dev/video2 are "declared" as outputs?

    moreover when i look at the power up the kernel message indicates that there are two output devices (video0 and video1) :
    [    3.136718] omap_vout omap_vout: : registered and initialized video device 0
    [    3.144073] omap_vout omap_vout: Buffer Size = 3686400
    [    3.150299] omap_vout omap_vout: : registered and initialized video device 1
    [    3.164794] EXT3-fs: barriers not enabled


    I don't understand. I have checked the expansion board file and there is no video output.

    have you any idea?

    thanks for your help

    julien
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 03 2013, 09:23 AM - #permalink
    0
    The omap_vout is the V4L2 driver on top of DSS2 to paint images directly.

    You can Enumerate Media Entities and print the Media Device topology using the following command:
    media-ctl -p 
    


    After do this command check which device is assigned to OMAP3 ISP CCDC output, and use this device to capture the images. If you paste the ouput of this command I can help with this.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 03 2013, 10:34 AM - #permalink
    0
    Hi

    Thanks.
    Here is is the result of the "media-ctl -p" command.
    # media-ctl -p
    Opening media device /dev/media0
    Enumerating entities
    Found 16 entities
    Enumerating pads and links
    Device topology
    - entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
                type V4L2 subdev subtype Unknown
                device node name /dev/v4l-subdev0
    	pad0: Input [SGRBG10 4096x4096]
    		 'OMAP3 ISP CCDC'ad0 []
    
    - entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
                type Node subtype V4L
                device node name /dev/video0
    	pad0: Output 
    		-> 'OMAP3 ISP CCP2'ad0 []
    
    - entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
                type V4L2 subdev subtype Unknown
                device node name /dev/v4l-subdev1
    	pad0: Input [SGRBG10 4096x4096]
    	pad1: Output [SGRBG10 4096x4096]
    		-> 'OMAP3 ISP CSI2a output'ad0 []
    		-> 'OMAP3 ISP CCDC'ad0 []
    
    - entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
                type Node subtype V4L
                device node name /dev/video3
    	pad0: Input 
    		 'OMAP3 ISP AEWB'ad0 [IMMUTABLE,ACTIVE]
    		-> 'OMAP3 ISP AF'ad0 [IMMUTABLE,ACTIVE]
    		-> 'OMAP3 ISP histogram'ad0 [IMMUTABLE,ACTIVE]
    
    - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
                type Node subtype V4L
                device node name /dev/video4
    	pad0: Input 
    		 'OMAP3 ISP preview'ad0 []
    
    - entity 9: OMAP3 ISP preview output (1 pad, 1 link)
                type Node subtype V4L
                device node name /dev/video6
    	pad0: Input 
    		

    So it seems that the first device assigned to "OMAP3 ISP CCDC output" is /dev/video4. So i will use this device.
    But maybe i can use /dev/v4l-subdev2 ?
    Is it possible for you to explain the difference between these 16 entities ?

    thanks in advance

    julien
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 04 2013, 09:20 AM - #permalink
    0
    Yes you should use /dev/video4.

    You want me to do a lot of work :) !

    I think these two links are good references:

    http://linuxtv.org/downloads/presentations/summit_jun_2010/20100614-v4l2_summit-media.pdf

    https://www.kernel.org/doc/Documentation/video4linux/v4l2-framework.txt
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 04 2013, 09:47 AM - #permalink
    1
    Hi

    i am sorry if you do a lot of work to answer to my questions but be sure you do a great job for my project.

    thank you very much

    julien
    The reply is currently minimized Show
  • Accepted Answer

    Friday, July 05 2013, 08:44 AM - #permalink
    0
    It's not a problem, the forum is for ansewer questions and I'm happy if the information is useful.
    The reply is currently minimized Show
Your Reply

SUPPORT


This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
IGEP Community Wiki
IGEP Community Forum
IGEP Community Online Chat