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.

TDA4VEN-Q1: Adding new image sensor to Linux

Part Number: TDA4VEN-Q1

Tool/software:

Hi, experts

On the TDA4VEN we used your serial deserialiser solution for getting data from the camera, the data flow is as follows:

OVX1F(x4) --> DS90UB933 --> DS90UB960 --> TDA4VEN(CSIRX).

I've successfully lit the camera on main2_0 before, and now I want to light it on the A core.

I refer to this link 3.2.2.3. CSI2RX — Processor SDK J722S Documentation,but I don't find the /dev/videoX node under TI-CSI2RX, can you provide a specific guide for me to refer to, thanks!

root@j722s-evm:~# v4l2-ctl --list-devices
TI-CSI2RX (platform:30102000.ticsi2rx):
	/dev/media0

TI-CSI2RX (platform:30122000.ticsi2rx):
	/dev/media1

wave5-dec (platform:30210000.video-codec):
	/dev/video0
	/dev/video1

e5010 (platform:fd20000.e5010):
	/dev/video2

board: custom board

sdk: 10_00_00_08

Best Regards,

Bing

  • Hi Bing,

    This is not a sensor is that is supported out of box. Please share all the steps you've taken up to this point to enable this sensor and share the output of media-ctl -p?

    Please go through the following FAQ and let me know if you have any further questions: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1403223/faq-most-common-problems-encountered-when-developing-camera-applications-on-the-am6x

    Thank you,

    Fabiana

  • Hi Fabiana,

    Please share all the steps you've taken up to this point to enable this sensor

    I didn't change anything, just the device tree below.

    &{/} {
    	clk_imx219_fixed_00: imx219-xclk-00 {
    		compatible = "fixed-clock";
    		#clock-cells = <0>;
    		clock-frequency = <24000000>;
    	};
    
    	clk_imx219_fixed_01: imx219-xclk-01 {
    		compatible = "fixed-clock";
    		#clock-cells = <0>;
    		clock-frequency = <24000000>;
    	};
    
    	clk_imx219_fixed_02: imx219-xclk-02 {
    		compatible = "fixed-clock";
    		#clock-cells = <0>;
    		clock-frequency = <24000000>;
    	};
    
    	clk_imx219_fixed_03: imx219-xclk-03 {
    		compatible = "fixed-clock";
    		#clock-cells = <0>;
    		clock-frequency = <24000000>;
    	};
    };
    
    &main_i2c0 {
    	#address-cells = <1>;
    	#size-cells = <0>;
    	status = "okay";
    
    		deser@30 {
    			compatible = "ti,ds90ub960-q1";
    			reg = <0x30>;
    
    			clock-names = "refclk";
    			clocks = <&clk_fusion_25M_fixed>;
    			i2c-alias-pool = <0x4a 0x4b 0x4c 0x4d 0x4e 0x4f>;
    			ports {
    				#address-cells = <1>;
    				#size-cells = <0>;
    
    				port@0 {
    					reg = <0>;
    					ub960_in_0: endpoint{
    							remote_endpoint = <&ub953_out_0>;
    					};
    				};
    
    				port@1 {
    					reg = <1>;
    					ub960_in_1: endpoint{
    							remote_endpoint = <&ub953_out_1>;
    					};
    				};
    
    				port@2 {
    					reg = <2>;
    					ub960_in_2: endpoint{
    							remote_endpoint = <&ub953_out_2>;
    					};
    				};
    
    				port@3 {
    					reg = <3>;
    					ub960_in_3: endpoint{
    							remote_endpoint = <&ub953_out_3>;
    					};
    				};
    
    				port@4 {
    					reg = <4>;
    					ub960_out0: endpoint {
    						bus-type = <4>;
    						clock-lanes = <0>;
    						data-lanes = <1 2 3 4>;
    						link-frequencies = /bits/ 64 <800000000>;
    						remote-endpoint = <&csi2rx0_in_sensor>;
    					};
    				};
    			};
    
    			links {
    				#address-cells = <1>;
    				#size-cells = <0>;
    
    				link@0 {
    					reg = <0>;
    					i2c-alias = <0x44>;
    
    					ti,rx-mode = <3>;
    
    					serializer0: serializer {
    						compatible = "ti,ds90ub953-q1";
    						gpio-controller;
    						#gpio-cells = <2>;
    						#clock-cells = <0>;
    
    						ports {
    							#address-cells = <1>;
    							#size-cells = <0>;
    
    							port@0 {
    								reg = <0>;
    								ub953_in_0: endpoint {
    									data-lanes = <1 2 3 4>;
    									remote-endpoint = <&isx031_out_0>;
    								};
    							};
    
    							port@1 {
    								reg = <1>;
    								ub953_out_0: endpoint {
    									remote-endpoint = <&ub960_in_0>;
    								};
    							};
    						};
    						i2c {
    							#address-cells = <1>;
    							#size-cells = <0>;
    							isx031_0@6c {
    								compatible = "sony,imx219";
    								reg = <0x6c>;
    								clocks = <&clk_imx219_fixed_00>;
    								clock-names = "xclk";
    								port {
    									isx031_out_0: endpoint {
    										remote-endpoint = <&ub953_in_0>;
    									};
    								};
    							};
    						};
    					};
    				};
    
    				link@1 {
    					reg = <1>;
    					i2c-alias = <0x45>;
    
    					ti,rx-mode = <3>;
    
    					serializer1: serializer {
    						compatible = "ti,ds90ub953-q1";
    						gpio-controller;
    						#gpio-cells = <2>;
    
    						#clock-cells = <0>;
    
    						ports {
    							#address-cells = <1>;
    							#size-cells = <0>;
    
    							port@0 {
    								reg = <0>;
    								ub953_in_1: endpoint {
    									data-lanes = <1 2 3 4>;
    									remote-endpoint = <&isx031_out_1>;
    								};
    							};
    
    							port@1 {
    								reg = <1>;
    
    								ub953_out_1: endpoint {
    									remote-endpoint = <&ub960_in_1>;
    								};
    							};
    						};
    						i2c {
    							#address-cells = <1>;
    							#size-cells = <0>;
    							isx031_1@6c {
    								compatible = "sony,imx219";
    								reg = <0x6c>;
    								clocks = <&clk_imx219_fixed_01>;
    								clock-names = "xclk";
    								port {
    									isx031_out_1: endpoint {
    										remote-endpoint = <&ub953_in_1>;
    									};
    								};
    							};
    						};
    					};
    				};
    
    				link@2 {
    					reg = <2>;
    					i2c-alias = <0x46>;
    
    					ti,rx-mode = <3>;
    
    					serializer2: serializer {
    						compatible = "ti,ds90ub953-q1";
    						gpio-controller;
    						#gpio-cells = <2>;
    
    						#clock-cells = <0>;
    
    						ports {
    							#address-cells = <1>;
    							#size-cells = <0>;
    
    							port@0 {
    								reg = <0>;
    								ub953_in_2: endpoint {
    									data-lanes = <1 2 3 4>;
    									remote-endpoint = <&isx031_out_2>;
    								};
    							};
    
    							port@1 {
    								reg = <1>;
    
    								ub953_out_2: endpoint {
    									remote-endpoint = <&ub960_in_2>;
    								};
    							};
    						};
    						i2c {
    							#address-cells = <1>;
    							#size-cells = <0>;
    							isx031_2@6c {
    								compatible = "sony,imx219";
    								reg = <0x6c>;
    								clocks = <&clk_imx219_fixed_02>;
    								clock-names = "xclk";
    								port {
    									isx031_out_2: endpoint {
    										remote-endpoint = <&ub953_in_2>;
    									};
    								};
    							};
    						};
    					};
    				};
    
    				link@3 {
    					reg = <3>;
    					i2c-alias = <0x47>;
    
    					ti,rx-mode = <3>;
    
    					serializer3: serializer {
    						compatible = "ti,ds90ub953-q1";
    						gpio-controller;
    						#gpio-cells = <2>;
    
    						#clock-cells = <0>;
    
    						ports {
    							#address-cells = <1>;
    							#size-cells = <0>;
    
    							port@0 {
    								reg = <0>;
    								ub953_in_3: endpoint {
    									data-lanes = <1 2 3 4>;
    									remote-endpoint = <&isx031_out_3>;
    								};
    							};
    
    							port@1 {
    								reg = <1>;
    
    								ub953_out_3: endpoint {
    									remote-endpoint = <&ub960_in_3>;
    								};
    							};
    						};
    						i2c {
    							#address-cells = <1>;
    							#size-cells = <0>;
    							isx031_3@6c {
    								compatible = "sony,imx219";
    								reg = <0x6c>;
    								clocks = <&clk_imx219_fixed_03>;
    								clock-names = "xclk";
    								port {
    									isx031_out_3: endpoint {
    										remote-endpoint = <&ub953_in_3>;
    									};
    								};
    							};
    						};
    					};
    				};
    
    			};
    		};
    };
    
    
    &cdns_csi2rx0 {
    	ports {
    		#address-cells = <1>;
    		#size-cells = <0>;
    
    		csi0_port0: port@0 {
    			reg = <0>;
    			status = "okay";
    
    			csi2rx0_in_sensor: endpoint {
    				remote-endpoint = <&ub960_out0>;
    				bus-type = <4>; /* CSI2 DPHY. */
    				clock-lanes = <0>;
    				data-lanes = <1 2 3 4>;
    			};
    		};
    	};
    };
    
    &ti_csi2rx0 {
    	status = "okay";
    };
    
    &dphy0 {
    	status = "okay";
    };

    I haven't changed the sensor, deserialiser and serialiser driver matching yet.

    share the output of media-ctl -p

    root@j722s-evm:~# media-ctl -p -d /dev/media0 
    Media controller API version 6.6.32
    
    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial          
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.6.32
    
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
    	routes:
    		0/0 -> 1/0 [ACTIVE]
    	pad0: Sink
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
    	pad1: Source
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		-> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
    	pad2: Source
    		-> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
    	pad3: Source
    		-> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
    	pad4: Source
    		-> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
    	pad5: Source
    		-> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
    	pad6: Source
    		-> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    
    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
    	routes:
    		0/0 -> 1/0 [ACTIVE]
    	pad0: Sink
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		<- "ds90ub960 1-0030":4 [ENABLED,IMMUTABLE]
    	pad1: Source
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    	pad2: Source
    	pad3: Source
    	pad4: Source
    
    - entity 15: ds90ub960 1-0030 (6 pads, 1 link, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev2
    	routes:
    		0/0 -> 4/0 [ACTIVE]
    	pad0: Sink
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    	pad1: Sink
    	pad2: Sink
    	pad3: Sink
    	pad4: Source
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		-> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
    	pad5: Source
    
    - entity 26: 30102000.ticsi2rx context 0 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
    	pad0: Sink
    		<- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 32: 30102000.ticsi2rx context 1 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
    	pad0: Sink
    		<- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 38: 30102000.ticsi2rx context 2 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
    	pad0: Sink
    		<- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 44: 30102000.ticsi2rx context 3 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video6
    	pad0: Sink
    		<- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 50: 30102000.ticsi2rx context 4 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video7
    	pad0: Sink
    		<- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 56: 30102000.ticsi2rx context 5 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video8
    	pad0: Sink
    		<- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
    

    Why is there only one routes:, please help to check what's wrong!

    Best Regards,

    Bing

  • Hi Bing,

    Please follow the "Enable A New CSI-2 Sensor" section of this guide to get started: https://dev.ti.com/tirex/explore/node?node=A__AR3wevo2133UK-QLr4RUgQ__AM67-ACADEMY__XufTZAH__LATEST&placeholder=true

    Thank you,

    Fabiana