No captured data from v4l2 driver (TC358743)

Hi Strojak,

There could be a number of reasons…

  1. Run dmesg | grep tc35 to see if there are any errors. If nothing is being printed it’s probably because your device tree isn’t correct so it’s not being probed, if there are some errors then post them here and we can help try and debug

  2. Send us the output of media-ctl -p -d /dev/media0 (you may need to install v4l-utils and/or media-ctl first)

I ported it from imx185, and now it works on my tx2

[ 8355.294772] tc358743v1 2-000f: -----Chip status-----
[ 8355.300109] tc358743v1 2-000f: Chip ID: 0x00
[ 8355.304783] tc358743v1 2-000f: Chip revision: 0x00
[ 8355.309668] tc358743v1 2-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
[ 8355.316337] tc358743v1 2-000f: Sleep mode: off
[ 8355.320827] tc358743v1 2-000f: Cable detected (+5V power): yes
[ 8355.326932] tc358743v1 2-000f: DDC lines enabled: yes
[ 8355.332236] tc358743v1 2-000f: Hotplug enabled: no
[ 8355.338912] tc358743v1 2-000f: CEC enabled: no
[ 8355.343388] tc358743v1 2-000f: -----Signal status-----
[ 8355.348553] tc358743v1 2-000f: TMDS signal detected: yes
[ 8355.353897] tc358743v1 2-000f: Stable sync signal: yes
[ 8355.359128] tc358743v1 2-000f: PHY PLL locked: yes
[ 8355.363934] tc358743v1 2-000f: PHY DE detected: yes
[ 8355.371009] tc358743v1 2-000f: Detected format: 1920x1080p30.0 (2200x1125)
[ 8355.371013] tc358743v1 2-000f: horizontal: fp = 0, -sync = 280, bp = 0
[ 8355.371016] tc358743v1 2-000f: vertical: fp = 0, -sync = 45, bp = 0
[ 8355.371018] tc358743v1 2-000f: pixelclock: 74250000
[ 8355.371020] tc358743v1 2-000f: flags (0x0):
[ 8355.371022] tc358743v1 2-000f: standards (0x0):
[ 8355.371025] tc358743v1 2-000f: Configured format: 640x480p59.94 (800x525)
[ 8355.371027] tc358743v1 2-000f: horizontal: fp = 16, -sync = 96, bp = 48
[ 8355.371029] tc358743v1 2-000f: vertical: fp = 10, -sync = 2, bp = 33
[ 8355.371031] tc358743v1 2-000f: pixelclock: 25175000
[ 8355.371032] tc358743v1 2-000f: flags (0x0):
[ 8355.371034] tc358743v1 2-000f: standards (0x3): CEA DMT
[ 8355.371036] tc358743v1 2-000f: -----CSI-TX status-----
[ 8355.376219] tc358743v1 2-000f: Lanes needed: 2
[ 8355.380966] tc358743v1 2-000f: Lanes in use: 2
[ 8355.385651] tc358743v1 2-000f: Waiting for particular sync signal: no
[ 8355.392352] tc358743v1 2-000f: Transmit mode: no
[ 8355.397255] tc358743v1 2-000f: Receive mode: no
[ 8355.402009] tc358743v1 2-000f: Stopped: no
[ 8355.406129] tc358743v1 2-000f: Color space: YCbCr 422 16-bit
[ 8355.411980] tc358743v1 2-000f: -----DVI-D status-----
[ 8355.417046] tc358743v1 2-000f: HDCP encrypted content: no
[ 8355.422460] tc358743v1 2-000f: Input color space: RGB full range
[ 8358.438499] tc358743v1 2-000f: imx185_power_off: power off

Hello Robert,

Thank you for the help. Yes, that was my bad. I added the header file to the wrong location.

I was able to build the .ko and after fixing a couple of other problems I am able to load the driver. ( bopied the module to the folder and ran depmod and modprobe commands and also updated the device tree)

now it looks the driver is loaded correctly, video0 can be detected in ls /dev/video0 but I am not able to capture any picture.

here are the results of media-ctl -p -d /dev/media0

Media controller API version 0.1.0

Media device information

driver vi
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 0.0.0

Device topology

  • entity 1: nvcsi–1 (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    pad0: Sink
    <- “tc358743 6-000f”:0 [ENABLED]
    pad1: Source
    -> “vi-output, tc358743 6-000f”:0 [ENABLED]

  • entity 4: tc358743 6-000f (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev1
    pad0: Source
    [fmt:UYVY8_1X16/1280x720 field:none colorspace:smpte170m]
    [dv.caps:BT.656/1120 min:1x1@0 max:10000x10000@165000000 stds:CEA-861,DMT,CVT,GTF caps:progressive,reduced-blanking,custom]
    [dv.detect:BT.656/1120 1280x720p60 (1650x750) stds: flags:]
    [dv.current:BT.656/1120 1280x720p60 (1650x750) stds: flags:]
    -> “nvcsi–1”:0 [ENABLED]

  • entity 6: vi-output, tc358743 6-000f (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video0
    pad0: Sink
    <- “nvcsi–1”:1 [ENABLED]

and here is the dmesg | grep tc358743 output

[ 1812.222736] tc358743 6-000f: Calling tc358743_g_input_status

[ 1812.223334] tc358743 6-000f: tc358743_g_input_status: status =0x0
[ 1812.223337] tc358743 6-000f: Now getting and setting dv timings
[ 1812.223341] tc358743 6-000f: Calling tc358743_query_dv_timings
[ 1812.226754] tc358743 6-000f: 495:tc358743_get_detected_timings: width 1280 heigh 720 interlaced 0
[ 1812.226762] tc358743 6-000f: tc358743_query_dv_timings: 1280x720p60.0 (1650x750)
[ 1812.226765] tc358743 6-000f: tc358743_s_dv_timings
[ 1812.226768] tc358743 6-000f: tc358743_s_dv_timings: no change
[ 1812.228132] tc358743 6-000f: tc358743_enum_frame_size()
[ 1812.228139] tc358743 6-000f: fse->code 8207, index 0
[ 1812.228143] tc358743 6-000f: ----------------------------------------
[ 1812.228151] tc358743 6-000f: Trying to find frmfmt that matches fse->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207, MEDIA_BUS_FMT_RGB888_1X24: 4106)
[ 1812.228154] tc358743 6-000f: Code ok
[ 1812.228158] tc358743 6-000f: Index ok
[ 1812.228164] tc358743 6-000f: !!! tc358743_enum_frame_size() complete successfully, width: 1280, height: 720
[ 1812.228173] tc358743 6-000f: tc358743_enum_frame_interval()
[ 1812.228177] tc358743 6-000f: ----------------------------------------
[ 1812.228183] tc358743 6-000f: Trying to find frame interfval that matches fie->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207)
[ 1812.228186] tc358743 6-000f: Code ok
[ 1812.228191] tc358743 6-000f: Matched width 1280 and 1280, height 720 and 720
[ 1812.228195] tc358743 6-000f: w/h ok or end (i=0, num=2)
[ 1812.228199] tc358743 6-000f: i ok
[ 1812.228203] tc358743 6-000f: index ok
[ 1812.228207] tc358743 6-000f: !!! tc358743_enum_frame_interval() completed successfully, interval: 1/30
[ 1812.228221] tc358743 6-000f: tc358743_enum_frame_interval()
[ 1812.228225] tc358743 6-000f: ----------------------------------------
[ 1812.228230] tc358743 6-000f: Trying to find frame interfval that matches fie->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207)
[ 1812.228233] tc358743 6-000f: Code ok
[ 1812.228238] tc358743 6-000f: Matched width 1280 and 1280, height 720 and 720
[ 1812.228242] tc358743 6-000f: w/h ok or end (i=0, num=2)
[ 1812.228245] tc358743 6-000f: i ok
[ 1812.228248] tc358743 6-000f: index ok
[ 1812.228253] tc358743 6-000f: !!! tc358743_enum_frame_interval() completed successfully, interval: 1/50
[ 1812.228261] tc358743 6-000f: tc358743_enum_frame_interval()
[ 1812.228265] tc358743 6-000f: ----------------------------------------
[ 1812.228270] tc358743 6-000f: Trying to find frame interfval that matches fie->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207)
[ 1812.228273] tc358743 6-000f: Code ok
[ 1812.228277] tc358743 6-000f: Matched width 1280 and 1280, height 720 and 720
[ 1812.228281] tc358743 6-000f: w/h ok or end (i=0, num=2)
[ 1812.228284] tc358743 6-000f: i ok
[ 1812.228287] tc358743 6-000f: index ok
[ 1812.228291] tc358743 6-000f: !!! tc358743_enum_frame_interval() completed successfully, interval: 1/60
[ 1812.228300] tc358743 6-000f: tc358743_enum_frame_interval()
[ 1812.228303] tc358743 6-000f: ----------------------------------------
[ 1812.228308] tc358743 6-000f: Trying to find frame interfval that matches fie->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207)
[ 1812.228311] tc358743 6-000f: Code ok
[ 1812.228315] tc358743 6-000f: Matched width 1280 and 1280, height 720 and 720
[ 1812.228319] tc358743 6-000f: w/h ok or end (i=0, num=2)
[ 1812.228322] tc358743 6-000f: i ok
[ 1812.228327] tc358743 6-000f: Error in tc358743_enum_frame_interval num framerates (3 outside 3)
[ 1812.237520] tc358743 6-000f: tc358743_enum_frame_size()
[ 1812.237524] tc358743 6-000f: fse->code 8207, index 1
[ 1812.237525] tc358743 6-000f: ----------------------------------------
[ 1812.237529] tc358743 6-000f: Trying to find frmfmt that matches fse->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207, MEDIA_BUS_FMT_RGB888_1X24: 4106)
[ 1812.237531] tc358743 6-000f: Code ok
[ 1812.237532] tc358743 6-000f: Index ok
[ 1812.237535] tc358743 6-000f: !!! tc358743_enum_frame_size() complete successfully, width: 1920, height: 1080
[ 1812.237539] tc358743 6-000f: tc358743_enum_frame_interval()
[ 1812.237541] tc358743 6-000f: ----------------------------------------
[ 1812.237543] tc358743 6-000f: Trying to find frame interfval that matches fie->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207)
[ 1812.237545] tc358743 6-000f: Code ok
[ 1812.237547] tc358743 6-000f: Matched width 1920 and 1920, height 1080 and 1080
[ 1812.237549] tc358743 6-000f: w/h ok or end (i=1, num=2)
[ 1812.237550] tc358743 6-000f: i ok
[ 1812.237552] tc358743 6-000f: index ok
[ 1812.237554] tc358743 6-000f: !!! tc358743_enum_frame_interval() completed successfully, interval: 1/30
[ 1812.237561] tc358743 6-000f: tc358743_enum_frame_interval()
[ 1812.237563] tc358743 6-000f: ----------------------------------------
[ 1812.237566] tc358743 6-000f: Trying to find frame interfval that matches fie->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207)
[ 1812.237567] tc358743 6-000f: Code ok
[ 1812.237569] tc358743 6-000f: Matched width 1920 and 1920, height 1080 and 1080
[ 1812.237571] tc358743 6-000f: w/h ok or end (i=1, num=2)
[ 1812.237573] tc358743 6-000f: i ok
[ 1812.237574] tc358743 6-000f: index ok
[ 1812.237576] tc358743 6-000f: !!! tc358743_enum_frame_interval() completed successfully, interval: 1/50
[ 1812.237581] tc358743 6-000f: tc358743_enum_frame_interval()
[ 1812.237582] tc358743 6-000f: ----------------------------------------
[ 1812.237585] tc358743 6-000f: Trying to find frame interfval that matches fie->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207)
[ 1812.237586] tc358743 6-000f: Code ok
[ 1812.237588] tc358743 6-000f: Matched width 1920 and 1920, height 1080 and 1080
[ 1812.237590] tc358743 6-000f: w/h ok or end (i=1, num=2)
[ 1812.237591] tc358743 6-000f: i ok
[ 1812.237593] tc358743 6-000f: index ok
[ 1812.237595] tc358743 6-000f: !!! tc358743_enum_frame_interval() completed successfully, interval: 1/60
[ 1812.237599] tc358743 6-000f: tc358743_enum_frame_interval()
[ 1812.237600] tc358743 6-000f: ----------------------------------------
[ 1812.237603] tc358743 6-000f: Trying to find frame interfval that matches fie->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207)
[ 1812.237604] tc358743 6-000f: Code ok
[ 1812.237606] tc358743 6-000f: Matched width 1920 and 1920, height 1080 and 1080
[ 1812.237608] tc358743 6-000f: w/h ok or end (i=1, num=2)
[ 1812.237610] tc358743 6-000f: i ok
[ 1812.237612] tc358743 6-000f: Error in tc358743_enum_frame_interval num framerates (3 outside 3)
[ 1812.246396] tc358743 6-000f: tc358743_enum_frame_size()
[ 1812.246400] tc358743 6-000f: fse->code 8207, index 2
[ 1812.246406] tc358743 6-000f: ----------------------------------------
[ 1812.246411] tc358743 6-000f: Trying to find frmfmt that matches fse->code, code: 8207 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207, MEDIA_BUS_FMT_RGB888_1X24: 4106)
[ 1812.246416] tc358743 6-000f: Code ok
[ 1812.246422] tc358743 6-000f: Error in tc358743_enum_frame_size, 2 outside of num_frmfmt (2)
[ 1812.254868] tc358743 6-000f: tc358743_enum_frame_size()
[ 1812.254873] tc358743 6-000f: fse->code 4106, index 0
[ 1812.254876] tc358743 6-000f: ----------------------------------------
[ 1812.254879] tc358743 6-000f: Trying to find frmfmt that matches fse->code, code: 4106 (UYVY: 1498831189, ARGB32: 875713089, MEDIA_BUS_FMT_UYVY8_1X16: 8207, MEDIA_BUS_FMT_RGB888_1X24: 4106)
[ 1812.254883] tc358743 6-000f: Error in tc358743_enum_frame_size fse->code, code: 4106, UYVY: 1498831189, ARGB32: 875713089
[ 1812.266758] tc358743 6-000f: Calling tc358743_get_fmt
[ 1812.266763] tc358743 6-000f: Here 6b, colorspace: 1
[ 1812.266765] tc358743 6-000f: get fmt complete

Any suggestions?

Thank you!

@robert.j.h.chandler

Never mind! It was a loose cable! now it works… Thank you again! :)