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.

Camera interfaces for DRA74x Jacinto6

Other Parts Discussed in Thread: TVP5158

I am using TI JACINTO 6 with JAMR3 application board. here am using GLSDK .Boot-msg.zip

JAMR3 board is getting detected. The procedure is followed as below:

Capturing through TVP decoder

Linux kernel supports TVP5158 NTSC/PAL decoder.

TVP5158 decoder is a TI chip which can decode upto 4 channels of NTSC/PAL analog video and multiplex it.

Video capture from 1 channel TVP5158 can be verified as follows.

  • Connect analog camera to the Vin1 port of the JAMR3 board

  • Change the SW2 switch setting on JAMR board as SW2[1-2] = [OFF, ON] - This is to select i2c4 for the IO expander

  • Reboot the board and enable i2c2 as given above

  • I2C device on Bus 2 slave address 0x58 should be probed successfully

  • VIP should register a V4L2 video device (e.g. /dev/video1) using this i2c device

  • Run dmabuftest with capture format of the analog camera (e.g. '720x240@YUYV')

Reboot the board and enable i2c2 as given above “ was given in glsdk manual. But i couldn't find any i2c2 settings in the manual.

By following this we can see “/dev/video0 /dev/video1 /dev/video2 “, without even connecting camera to input video port of JAMR3 board. If we connect camera, its not getting detected.

Below are the messages.

[ 6.406210] tvp5158 1-0058: Unable to of_probe

[ 6.411333] i2c 1-0058: Driver tvp5158 requests probe deferral

[ 6.418440] tvp5158 1-0058: Unable to of_probe

[ 6.422921] i2c 1-0058: Driver tvp5158 requests probe deferral

Detailed boot message log is attached. Request help on this............

root@dra7xx-evm:~# dmabuftest -s 4:800x480 -d /dev/video0 -c 1280x720@YUYV

Opening Display..

using 1 connectors, 1280x800 display, multiplanar: 1

Opening V4L2..

Exported buffer fd = 6

Exported buffer fd = 8

Exported buffer fd = 10

Exported buffer fd = 12

Exported buffer fd = 14

Exported buffer fd = 16

ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)


PFA the zip file for support.

  • Hi, Niranjan,

    Your query has been forwarded to an expert to comment here.

    Regards,
    Mariya
  • Hi,

    It appears that the I2C interaction with the TVP decoder is failing. We typically see the probe failure errors when there is no JAMR3 board connected. Can you please check that the daughter board is connected correctly?

    regards,
    Venkat
  • Thanks for your reply Venkat.

    I connected the Daughter board JAMR3 properly.i can see that JAMR3 is getting detected in Boot Message-

    [    2.176348] vip 48970000.vip: VPDMA firmware loaded
    [    2.181813] Adding alias for supply vbb,iva_coproc -> vbb,4a0025cc.voltdm
    [    2.188752] vip1-s0: vip Device registered as /dev/video1
    [    2.194467] vip1-s0: vip Device registered as /dev/video2
    [    2.194523] coproc iva_coproc: of_pm_voltdm_notifier_register: Fail calculating voltage latency[1055000<->1250000]:-22
    [    2.210973] vip1-s0: vip Device registered as /dev/video3
    [    2.216729] vip1-s0: vip Device registered as /dev/video4
    [    2.216879] coproc iva_coproc: coproc_probe result=0
    [    2.216921] coproc dsp_coproc: probe
    [    2.216978] coproc dsp_coproc: dev_pm_opp_add: duplicate OPPs detected. Existing: freq: 700000000, volt: 1150000, enabled: 1. New:1
    [    2.216985] coproc dsp_coproc: of_init_opp_table: Failed to add OPP 700000000
    [    2.217024] Adding alias for supply vdd,dsp_coproc -> vdd,4a0025e0.voltdm
    [    2.217028] Adding alias for supply vbb,dsp_coproc -> vbb,4a0025e0.voltdm
    [    2.267099] vip1-s0: Using sensor tvp5158 1-0058 for capture
    [    2.272915] coproc dsp_coproc: of_pm_voltdm_notifier_register: Fail calculating voltage latency[1055000<->1150000]:-22
    [    2.284425] coproc dsp_coproc: coproc_probe result=0
    [    2.834326] davinci_evm primary_sound: snd_soc_register_card failed (-517)
    [    2.841264] platform primary_sound: Driver davinci_evm requests probe deferral
    [    2.849019] dra7xx-jamr3-snd jamr3_sound: ASoC: CODEC (null) not registered
    [    2.856035] dra7xx-jamr3-snd jamr3_sound: failed to register sound card -517
    [    2.863140] platform jamr3_sound: Driver dra7xx-jamr3-snd requests probe deferral
    [    2.871557] oprofile: using timer interrupt.
    [    2.875912] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
    [    2.882512] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    2.887936] TCP: cubic registered
    [    3.372754] libphy: 48485000.mdio: probed
    [    3.372763] davinci_mdio 48485000.mdio: phy[2]: device 48485000.mdio:02, driver unknown
    [    3.372769] davinci_mdio 48485000.mdio: phy[3]: device 48485000.mdio:03, driver unknown
    [    3.373579] cpsw 48484000.ethernet: Detected MACID = 74:da:ea:3d:85:06
    [    3.374745] cpsw 48484000.ethernet: cpsw: Detected MACID = 74:da:ea:3d:85:07
    [    3.408975] omap_rtc 48838000.rtcss: setting system clock to 2000-01-01 00:05:25 UTC (946685125)
    [    3.417912]  mmcblk0: p1 p2
    [    3.431356] ALSA device list:
    [    3.434379]   #0: DRA7xx-EVM
    [    3.437320]   #1: HDMI 58040000.encoder
    [    3.441206]   #2: DRA7xx-WiLink
    [    3.444391]   #3: DRA7xx-JAMR3
    [    3.480106] mmc2: BKOPS_EN bit is not set
    [    3.488237] mmc2: new high speed DDR MMC card at address 0001
    [    3.494570] mmcblk1: mmc2:0001 MMC08G 7.25 GiB

    The procedure is followed as below:

    Capturing through TVP decoder

    Linux kernel supports TVP5158 NTSC/PAL decoder.

    TVP5158 decoder is a TI chip which can decode upto 4 channels of NTSC/PAL analog video and multiplex it.

    Video capture from 1 channel TVP5158 can be verified as follows.

    • Connect analog camera to the Vin1 port of the JAMR3 board

    • Change the SW2 switch setting on JAMR board as SW2[1-2] = [OFF, ON] - This is to select i2c4 for the IO expander

    • Reboot the board and enable i2c2 as given above

    • I2C device on Bus 2 slave address 0x58 should be probed successfully

    • VIP should register a V4L2 video device (e.g. /dev/video1) using this i2c device

    • Run dmabuftest with capture format of the analog camera (e.g. '720x240@YUYV')

    Reboot the board and enable i2c2 as given above “ was given in glsdk manual. But i couldn't find any i2c2 settings in the manual.

    By following this we can see “/dev/video0 /dev/video1 /dev/video2 “, without even connecting camera to input video port of JAMR3 board. If we connect camera, its not getting detected.

    Detailed boot message log is attached.-0216.Boot-msg.zip

    Request help on this............

    Regards,
    Niranjan

  • hi,

    am waiting for updates...

    please help me regarding this..

    regards,

    Niranjan B

  • Niranjan,

    I tested tvp5158 capture on my board with the following command. I am using
    Processsor SDK Linux Automotive 3.01, which is the successor to GLSDK.

    # dmabuftest -s 32:1280x800 -d /dev/video1 -c 720x240@YUYV

    As I said in my first response, your problem is likely more to do with
    software than hardware. Please check the switch settings and the connection of
    the JAMR3 board to the DRA7xx EVM. If the hardware is connected correctly,
    you should not see the probe failure messages like below for tvp5158.

    [ 6.406210] tvp5158 1-0058: Unable to of_probe
    [ 6.411333] i2c 1-0058: Driver tvp5158 requests probe deferral

    These are the switch settings I am using on my EVM.

    SW2 depends on the boot mode you are using

    SW3[7:0] 1000 0001

    SW5[9:0] 00 0001 0100

    SW8[1:0] 11

    On JAMR2

    SW2[1-2] = [OFF, ON]

    OFF is towards the interior of the board, ON is towards the edge of the board.

    Please check the switch settings and hardware connections once again.

    regards,
    Venkat

  • Thanks for your reply Venkat.

    when i tried with GLSDK 7.04.. i enabled TVP5158 decoder in kernal configuration and i used arago project root file system.

    In boot message i can see like.

    [    2.372611] mousedev: PS/2 mouse device common for all mice
    [    2.383235] input: LDC 3001 TouchScreen Controller as /devices/44000000.ocp/48070000.i2c/i2c-0/0-0018/input/input0
    [    2.395058] i2c-core: driver [rtc-ds1307] using legacy suspend method
    [    2.401542] i2c-core: driver [rtc-ds1307] using legacy resume method
    [    2.408618] omap_rtc 48838000.rtcss: rtc core: registered 48838000.rtcss as rtc0
    [    2.416678] i2c /dev entries driver
    [    2.422952] tvp5158 1-0058: Camera sensor driver registered
    [    2.429032] ov1063x 1-0037: Failed writing register 0x0103!
    [    2.434640] ov1063x: probe of 1-0037 failed with error -121
    [    2.441177] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
    [    2.447336] vip 48970000.vip: No explicit pinctrl resources data.
    [    2.454412] vip 48970000.vip: loading firmware vpdma-1b8.bin
    [    2.460405] vpe 489d0000.vpe: Device registered as /dev/video0

    But when i used customized kernel.

    By following this we can see “/dev/video0 /dev/video1 /dev/video2 “, without even connecting camera to input video port of JAMR3 board. If we connect camera, its not getting detected.

    Below are the messages.

    [ 6.406210] tvp5158 1-0058: Unable to of_probe

    [ 6.411333] i2c 1-0058: Driver tvp5158 requests probe deferral

    [ 6.418440] tvp5158 1-0058: Unable to of_probe

    [ 6.422921] i2c 1-0058: Driver tvp5158 requests probe deferral

    Here am getting error like "setting endpoint "

    [    3.575965] vip1-s1: Port A enabled but no endpoints found
    [    3.581411] vip1-s0: Port B enabled but no endpoints found[    3.586956] usbcore: registered new interface driver usbtv
    [    3.592484] Driver for 1-wire Dallas network protocol.
    [    3.597708] vip1-s1: Port B enabled but no endpoints found

    i don't know how to set the end points..

    i need help on how to set Device tree and kernel configuration....

    please provide me your kernel configuration file so that it will be useful to me..

    Am new to this..plz help me..

    regards,

    Niranjan B

     

  • Niranjan,

    TVP5158 is enabled by default in GLSDK kernel configuration. You can look at
    the file "board_support/linux/ti_config_fragments/audio_display.cfg" to confirm this.

    audio_display.cfg
    45: CONFIG_VIDEO_TVP5158=y

    You can also check for the same by running

    # zcat /proc/config.gz | grep -i tvp

    on the target.

    Can you please confirm that this is the case on your system with the default
    GLSDK 7.04 kernel? Please also build the kernel with the default GLSDK
    configuration via "make linux" and confirm that it behaves in the same
    fashion.

    Please let me know if the tvp5158 probe using the default GLSDK kernel
    continues to be successful after connecting a camera. If possible, please try
    with a DVD player instead of the camera (or) please ensure that the camera is
    functional via other means.


    On a side note, I would recommend moving the latest SDK for the DRA7xx EVM.
    This will not help with your current issue but it will be easier for us to
    provide support for future issues.

    www.ti.com/.../processor-sdk-dra7x
    software-dl.ti.com/.../index_FDS.html

    regards,
    Venkat
  • Thank you Venkat.

    i Downloaded PROCESSOR-SDK-LINUX-AUTOMOTIVE  03_01_00_03 and i installed it..But here i couldn't find Kernel configuration inside the folder...

    ti-processor-SDK/Board support

    but in GLSDK 7.04 with kernel 3.14 i can find kernel configuration... where i can download kernel configuration (4.4)..?please provide me the Link.and the steps you followed..

    GLSDK 7.04  - Here am using rear view camera with RCA Connector.i connected the camera to VIP Port.. but am getting error like-

    [ 6.406210] tvp5158 1-0058: Unable to of_probe

    [ 6.411333] i2c 1-0058: Driver tvp5158 requests probe deferral

    [ 6.418440] tvp5158 1-0058: Unable to of_probe

    [ 6.422921] i2c 1-0058: Driver tvp5158 requests probe deferral

    but I connected the same camera with RCA to USB converter to the board (DRA74x) via USB hub.i tested with simple Opencv code to capture frames from webcam,.here also am getting error like-

    VIDIOC_QUERYCTRL:Inappropriate ioctl for device‏

    VIDIOC_QUERYCTRL:Inappropriate ioctl for device‏

    VIDIOC_QUERYCTRL:Inappropriate ioctl for device‏

    its not capturing the frames.....

    Am new to this please help me regarding this..

    regards,

    Niranjan

  • hi,

    am waiting for updates...

    please help me regarding this..

    regards,

    Niranjan B

  • Niranjan,

    Can you please respond to the below two questions for my post above?

    regards,
    Venkat

    1) Can you please confirm that this is the case on your system with the default
    GLSDK 7.04 kernel? Please also build the kernel with the default GLSDK
    configuration via "make linux" and confirm that it behaves in the same
    fashion.

    2) Please let me know if the tvp5158 probe using the default GLSDK kernel
    continues to be successful after connecting a camera. If possible, please try
    with a DVD player instead of the camera (or) please ensure that the camera is
    functional via other means.
  • hello venkat,

    1) In GLSDK-7.04 by default..... "TVP5158" is enabled. but if i tried "make linux" if showing error like...... " unable to STOP ".

    And i tested-

    root@dra7xx-evm:~# dmabuftest -s 4:800x480 -d /dev/video0 -c 1280x720@YUYV

    Opening Display..

    using 1 connectors, 1280x800 display, multiplanar: 1

    Opening V4L2..

    Exported buffer fd = 6

    Exported buffer fd = 8

    Exported buffer fd = 10

    Exported buffer fd = 12

    Exported buffer fd = 14

    Exported buffer fd = 16

    ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

    ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

    ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

    ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

    ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

    ERROR:v4l2_qbuf:453: VIDIOC_QBUF failed: Bad address (-1)

     

    2) Ya TVP5158 is using default GLSDK kernel..i changed the switch settings in "JAMR3" Board.... SW2=[OFF, ON] and i connected my RCA camera(reverse parking camera) and i run my simple opencv code to capture and display. but am getting two errors like..

    [ 6.406210] tvp5158 1-0058: Unable to of_probe

    [ 6.411333] i2c 1-0058: Driver tvp5158 requests probe deferral

    [ 6.418440] tvp5158 1-0058: Unable to of_probe

    [ 6.422921] i2c 1-0058: Driver tvp5158 requests probe deferral

    [    2.551643] vip 48970000.vip: VPDMA firmware loaded
    [    2.556651] vip1-s1: Port A enabled but no endpoints found
    [    2.562100] vip1-s0: Port B enabled but no endpoints found
    [    2.573170] Driver for 1-wire Dallas network protocol.
    [    2.578354] vip1-s1: Port B enabled but no endpoints found

    but i found that they have used "JAMR3" board for Audio applications only....whether i can use TVP5158 port with VIP to capture video in JAMR3 Board..please help me..

    please provide me the proper steps to be followed...

    regards,

    Niranjan B

     

  • hello venkat,

    Are there any solution regarding the above query?

    If any.... please let me know.

    Thank You


    Regards,

    Niranjan.B
  • Niranjan,

    >> but i found that they have used "JAMR3" board for Audio applications only....whether i can use TVP5158 port with VIP to capture video in JAMR3 Board..please help me..

    Yes. JAMR3 can be used for capturing analog video using TVP5158. Here is a video showing the exact usecase you are trying to do with GLSDK 7.04.

    www.youtube.com/watch

    The usecase you are trying out is a standard usecase that we test. I am not sure what is wrong. I am waiting for our VIP expert to be back from leave so that he can provide some debug pointers.

    regards,
    Venkat
  • Hi Niranjan,

    I think that the bad address indicates that the device is not present

    Do you see any logs printed by the tvp5158 driver

    Maybe you can run the app with "strace -f"

    Also check if the /dev/video devices are registered for the analog cameras

    You should see somthing like 'tvp5158: NTSC video detected' in the kernel bootlog

    Regards,

    Nikhil D