SK-TDA4VM: SK-TDA4VM: Set up IMX390 RCM camera to stream via customized ds90ub954 board

Part Number: SK-TDA4VM

Tool/software:

Hi Supporting,

I'm encounter the issue to enable the video stream with ds90ub954.  Currently I'm testing with the SDK09.02

The k3-j721e-sk-fusion.dtso had been changed as the following,

&main_i2c3 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	i2c-switch@70 {
		compatible = "nxp,pca9543";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x70>;

		cam0_i2c: i2c@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;

			deser@30 {
				compatible = "ti,ds90ub954-q1";
				reg = <0x30>;
				clocks = <&clk_fusion_25M_fixed>;
				clock-names = "refclk";
				i2c-alias-pool = <0x4a 0x4b 0x4c 0x4d 0x4e 0x4f>;

				ds90ub960_0_ports: ports {
					#address-cells = <1>;
					#size-cells = <0>;

					/* CSI-2 TX */
					port@4 {
						reg = <4>;
						ds90ub960_0_csi_out: endpoint {
							clock-lanes = <0>;
							data-lanes = <1 2 3 4>;
							link-frequencies = /bits/ 64 <800000000>;
							remote-endpoint = <&csi2_phy0>;
						};
					};
				};

				ds90ub960_0_links: links {
					#address-cells = <1>;
					#size-cells = <0>;
				};
			};
		};
	};
};

&csi0_port0 {
	status = "okay";

	csi2_phy0: endpoint {
		remote-endpoint = <&ds90ub960_0_csi_out>;
		clock-lanes = <0>;
		data-lanes = <1 2 3 4>;
		link-frequencies = /bits/ 64 <800000000>;
	};
};

And the k3-fpdlink-imx390-rcm-0-0.dtso k3-fpdlink-imx390-rcm-0-1.dtso k3-fpdlink-imx390-rcm-0-2.dtso and k3-fpdlink-imx390-rcm-0-3.dtso had been apply using the camera IMX390.

When the changes had been apply, the following log will apprealed after login to console,

IMX390 Camera 0 detected
device = /dev/video-imx390-cam0
name = imx390
format = [fmt:SRGGB12_1X12/1936x1100 field: none]
subdev_id = /dev/v4l-imx390-subdev0
isp_required = yes
ldc_required = yes
VIDIOC_SUBDEV_S_ROUTING failed: -22
Unable to setup routes: Invalid argument (22)
Unable to setup formats: Invalid argument (22)
Unable to parse stream: ''cdns_csi2rx.4504000.csi-bridge':0/ [fmt:SRGGB12_1X12/1936x1100 field: none]'
Unable to setup formats: Invalid argument (22)

and the following log from media-ctl -p

root@tda4vm-sk:/opt/edgeai-gst-apps# media-ctl -p
Media controller API version 6.1.80

Media device information
------------------------
driver          j721e-csi2rx
model           TI-CSI2RX
serial          
bus info        platform:4500000.ticsi2rx
hw revision     0x1
driver version  6.1.80

Device topology
- entity 1: 4500000.ticsi2rx (17 pads, 17 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
  routes:
   0/1 -> 3/0 [ACTIVE]
  pad0: Sink
   [stream:1 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
   <- "cdns_csi2rx.4504000.csi-bridge":1 [ENABLED,IMMUTABLE]
  pad1: Source
   -> "4500000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
  pad2: Source
   -> "4500000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
  pad3: Source
   [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
   -> "4500000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
  pad4: Source
   -> "4500000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
  pad5: Source
   -> "4500000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
  pad6: Source
   -> "4500000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
  pad7: Source
   -> "4500000.ticsi2rx context 6":0 [ENABLED,IMMUTABLE]
  pad8: Source
   -> "4500000.ticsi2rx context 7":0 [ENABLED,IMMUTABLE]
  pad9: Source
   -> "4500000.ticsi2rx context 8":0 [ENABLED,IMMUTABLE]
  pad10: Source
   -> "4500000.ticsi2rx context 9":0 [ENABLED,IMMUTABLE]
  pad11: Source
   -> "4500000.ticsi2rx context 10":0 [ENABLED,IMMUTABLE]
  pad12: Source
   -> "4500000.ticsi2rx context 11":0 [ENABLED,IMMUTABLE]
  pad13: Source
   -> "4500000.ticsi2rx context 12":0 [ENABLED,IMMUTABLE]
  pad14: Source
   -> "4500000.ticsi2rx context 13":0 [ENABLED,IMMUTABLE]
  pad15: Source
   -> "4500000.ticsi2rx context 14":0 [ENABLED,IMMUTABLE]
  pad16: Source
   -> "4500000.ticsi2rx context 15":0 [ENABLED,IMMUTABLE]

- entity 19: cdns_csi2rx.4504000.csi-bridge (5 pads, 2 links, 1 route)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev1
  routes:
   0/1 -> 1/1 [ACTIVE]
  pad0: Sink
   [stream:1 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
   <- "ds90ub960 6-0030":2 [ENABLED,IMMUTABLE]
  pad1: Source
   [stream:1 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
   -> "4500000.ticsi2rx":0 [ENABLED,IMMUTABLE]
  pad2: Source
  pad3: Source
  pad4: Source

- entity 25: ds90ub960 6-0030 (3 pads, 2 links, 1 route)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev2
  routes:
   0/0 -> 2/0 [ACTIVE]
  pad0: Sink
   [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
  pad1: Sink
   <- "ds90ub953 6-0045":1 [ENABLED,IMMUTABLE]
  pad2: Source
   [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
   -> "cdns_csi2rx.4504000.csi-bridge":0 [ENABLED,IMMUTABLE]

- entity 31: ds90ub953 6-0045 (2 pads, 2 links, 1 route)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev3
  routes:
   0/0 -> 1/0 [ACTIVE]
  pad0: Sink
   [stream:0 fmt:SRGGB12_1X12/1936x1100 field:none]
   <- "imx390 10-001a":0 [ENABLED,IMMUTABLE]
  pad1: Source
   [stream:0 fmt:SRGGB12_1X12/1936x1100 field:none]
   -> "ds90ub960 6-0030":1 [ENABLED,IMMUTABLE]

- entity 36: imx390 10-001a (1 pad, 1 link, 2 routes)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev4
  routes:
   0/0 -> 0/0 [ACTIVE]
   0/0 -> 0/1 [INACTIVE]
  pad0: Source
   [stream:0 fmt:SRGGB12_1X12/1936x1100@1/30 field:none colorspace:smpte170m]
   -> "ds90ub953 6-0045":0 [ENABLED,IMMUTABLE]

- entity 42: 4500000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video2
  pad0: Sink
   <- "4500000.ticsi2rx":1 [ENABLED,IMMUTABLE]

- entity 48: 4500000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video3
  pad0: Sink
   <- "4500000.ticsi2rx":2 [ENABLED,IMMUTABLE]

- entity 54: 4500000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video4
  pad0: Sink
   <- "4500000.ticsi2rx":3 [ENABLED,IMMUTABLE]

- entity 60: 4500000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video5
  pad0: Sink
   <- "4500000.ticsi2rx":4 [ENABLED,IMMUTABLE]

- entity 66: 4500000.ticsi2rx context 4 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video6
  pad0: Sink
   <- "4500000.ticsi2rx":5 [ENABLED,IMMUTABLE]

- entity 72: 4500000.ticsi2rx context 5 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video7
  pad0: Sink
   <- "4500000.ticsi2rx":6 [ENABLED,IMMUTABLE]

- entity 78: 4500000.ticsi2rx context 6 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video8
  pad0: Sink
   <- "4500000.ticsi2rx":7 [ENABLED,IMMUTABLE]

- entity 84: 4500000.ticsi2rx context 7 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video9
  pad0: Sink
   <- "4500000.ticsi2rx":8 [ENABLED,IMMUTABLE]

- entity 90: 4500000.ticsi2rx context 8 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video10
  pad0: Sink
   <- "4500000.ticsi2rx":9 [ENABLED,IMMUTABLE]

- entity 96: 4500000.ticsi2rx context 9 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video11
  pad0: Sink
   <- "4500000.ticsi2rx":10 [ENABLED,IMMUTABLE]

- entity 102: 4500000.ticsi2rx context 10 (1 pad, 1 link, 0 route)
              type Node subtype V4L flags 0
              device node name /dev/video12
  pad0: Sink
   <- "4500000.ticsi2rx":11 [ENABLED,IMMUTABLE]

- entity 108: 4500000.ticsi2rx context 11 (1 pad, 1 link, 0 route)
              type Node subtype V4L flags 0
              device node name /dev/video13
  pad0: Sink
   <- "4500000.ticsi2rx":12 [ENABLED,IMMUTABLE]

- entity 114: 4500000.ticsi2rx context 12 (1 pad, 1 link, 0 route)
              type Node subtype V4L flags 0
              device node name /dev/video14
  pad0: Sink
   <- "4500000.ticsi2rx":13 [ENABLED,IMMUTABLE]

- entity 120: 4500000.ticsi2rx context 13 (1 pad, 1 link, 0 route)
              type Node subtype V4L flags 0
              device node name /dev/video15
  pad0: Sink
   <- "4500000.ticsi2rx":14 [ENABLED,IMMUTABLE]

- entity 126: 4500000.ticsi2rx context 14 (1 pad, 1 link, 0 route)
              type Node subtype V4L flags 0
              device node name /dev/video16
  pad0: Sink
   <- "4500000.ticsi2rx":15 [ENABLED,IMMUTABLE]

- entity 132: 4500000.ticsi2rx context 15 (1 pad, 1 link, 0 route)
              type Node subtype V4L flags 0
              device node name /dev/video17
  pad0: Sink
   <- "4500000.ticsi2rx":16 [ENABLED,IMMUTABLE]

The i2c information as the following,

root@tda4vm-sk:/opt/edgeai-gst-apps# i2cdetect -r -y 6
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- UU -- -- -- -- 4a -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: UU -- -- -- -- -- -- --                         
root@tda4vm-sk:/opt/edgeai-gst-apps# 

How can I set the correct format for the "ds90ub960 6-0030" and the "cdns_csi2rx.4504000.csi-bridge" ? 

  • The format of ds90ub960 6-0030 can be updated by the following,

    media-ctl --set-v4l2 '"ds90ub960 6-0030":0 [fmt:SRGGB12_1X12/1936x1100 field:none]'

    But when I'm trying to modify the format setting of cdns_csi2rx.4504000.csi-bridge and 4500000.ticsi2rx but failed, The following command had been executed

    root@tda4vm-sk:/opt/edgeai-gst-apps# media-ctl --set-v4l2 '"cdns_csi2rx.4504000.csi-bridge":0 [fmt:SRGGB12_1X12/1936x1100 field:none]'
    Unable to setup formats: Invalid argument (22)
    root@tda4vm-sk:/opt/edgeai-gst-apps# media-ctl --set-v4l2 '"4500000.ticsi2rx":0 [fmt:SRGGB12_1X12/1936x1100 field:none]'
    Unable to setup formats: Invalid argument (22)

    Can someone help to clarify it? Thanks in advance!