I am trying to interface HDMI to CSI2 convertor module from waveshare based on Toshiba IC TC358743.
I am using yocto project to build image
$ DISTRO=fsl-imx-wayland MACHINE=imx8mp-lpddr4-frdm source imx-setup-release.sh -b frdm_sources_whinlatter
and i have selected the driver using this command
bitbake -c menuconfig /virtual/kernel
and it is reflecting in the .config file also
CONFIG_VIDEO_TC358743=y
CONFIG_VIDEO_TC358743_CEC=y
and i have modified the dts file accordingly here i am attaching the dts file for your reference.
But i couldnt able to communicate with the IC
even for i2cdetect -y 1 it is not locking (UU) to 0x0F address. but i can able to see the device address in i2c1.
What i am missing in dts file or in driver selection?
we don't have official verified code for this, the link I sent to you shared the dts settings, you can compare with your own, to check if you miss something
pls refer to the link as below, to check if you set correctly or not
This Issue is resolved but i am facing one more regarding video pipeline from CSI2 to HDMI using Gstremer, i couldnt able to understand whether its the dts issue or something else.
here i am attaching response log from the device for your reference. and the dts file,
root@imx8mp-lpddr4-frdm:~# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- UU
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@imx8mp-lpddr4-frdm:~# v4l2-ctl --list-devices
():
/dev/v4l-subdev0
FSL Capture Media Device (platform:32c00000.bus:camera):
/dev/media0
mxc-isi_v1 (platform:32e00000.isi:cap_devic):
/dev/video3
mxc-isi-m2m_v1 (platform:32e00000.isi:m2m_devic):
/dev/video2
vsi_v4l2dec (platform:vsi_v4l2dec):
/dev/video1
vsi_v4l2enc (platform:vsi_v4l2enc):
/dev/video0
root@imx8mp-lpddr4-frdm:~# v4l2-ctl -d /dev/v4l-subdev1 --query-dv-timings
Active width: 1280
Active height: 720
Total width: 1650
Total height: 750
Frame format: progressive
Polarities: -vsync -hsync
Pixelclock: 74250000 Hz (60.00 frames per second)
Horizontal frontporch: 0
Horizontal sync: 370
Horizontal backporch: 0
Vertical frontporch: 0
Vertical sync: 30
Vertical backporch: 0
Standards:
Flags:
root@imx8mp-lpddr4-frdm:~# v4l2-ctl -d /dev/v4l-subdev1 --set-dv-bt-timings query
BT timings set
root@imx8mp-lpddr4-frdm:~# media-ctl -p
Media controller API version 6.18.2
Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial
bus info platform:32c00000.bus:camera
hw revision 0x0
driver version 6.18.2
Device topology
- entity 1: mxc_isi.0 (16 pads, 2 links, 0 routes)
type V4L2 subdev subtype Unknown flags 0
pad0: SINK
<- "mxc-mipi-csi2.0":4 [ENABLED]
pad1: SINK
pad2: SINK
pad3: SINK
pad4: SINK
pad5: SINK
pad6: SINK
pad7: SINK
pad8: SINK
pad9: SINK
pad10: SINK
pad11: SINK
pad12: SOURCE
-> "mxc_isi.0.capture":0 [ENABLED]
pad13: SOURCE
pad14: SOURCE
pad15: SINK
- entity 18: mxc_isi.0.capture (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video3
pad0: SINK
<- "mxc_isi.0":12 [ENABLED]
- entity 22: mxc-mipi-csi2.0 (8 pads, 2 links)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: SINK
<- "tc358743 1-000f":0 [ENABLED,IMMUTABLE]
pad1: SINK
pad2: SINK
pad3: SINK
pad4: SOURCE
-> "mxc_isi.0":0 [ENABLED]
pad5: SOURCE
pad6: SOURCE
pad7: SOURCE
- entity 31: tc358743 1-000f (1 pad, 1 link, 0 routes)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: SOURCE
[stream:0 fmt:RGB888_1X24/1280x720 field:none colorspace:srgb]
[dv.caps:BT.656/1120 min:640x350@13000000 max:1920x1200@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:]
-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]
root@imx8mp-lpddr4-frdm:~# gst-launch-1.0 v4l2src device=/dev/video3 num-buffers=10 ! \
> video/x-raw,format=YUY2,width=1920,height=1080,framerate=60/1 ! \
> fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-good/1.26.6.imx/sys/v4l2/gstv4l2src.c(957): gst_v4l2src_decide_allocation (): /GstPipeline:pipel
ine0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.025120625
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
/usr/src/debug/gstreamer1.0/1.26.6.imx/libs/gst/base/gstbasesrc.c(3187): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l
2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...
and i am not seeing anything on external display also (Connected over HDMI)
pls refer to the chapter 7.3.9 Camera preview of linux user guide, you need to use media-ctl to create a connection