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.

SK-TDA4VM: DS90UB960 cannot connect to imx390

Part Number: SK-TDA4VM

Tool/software:

Hi export,

    Device Tree Overlays We Used:

        k3-j722s-evm-fpdlink-fusion.dtbo

        k3-fpdlink-imx390-rcm-0-0.dtbo

    These overlays have been correctly included via uEnv.txt.

Hardware Connection Topology

IMX390 (LI-IMX390-FPDLINKIII-120H, without ISP)
   ⇅
DS90UB953
   ⇅
DS90UB960
   ⇅
SK-TDA4VM

Current Status

    After boot, using media-ctl to inspect the topology shows the connection up to the DS90UB953 serializer is detected correctly.

    However, the IMX390 sensor fails to initialize, and no camera stream is available.

    The imx390 kernel module is loaded correctly.

    Based on dmesg, the IMX390 fails during probe with an I2C read error (error -121).

Relevant dmesg Logs

[   12.656592] imx390 10-0021: inck rate: 27027027 Hz
[   12.707615] imx390 10-0021: imx390_read: failed to read reg 0x0330: -121
[   12.714641] imx390: probe of 10-0021 failed with error -121

Kernel Modules Loaded (lsmod)

imx390                102400  0
ds90ub953              16384  1
ds90ub960              36864  1

Media Topology

As shown in the attached image, the following links are established and visible:

j721e-csi2rx → cdns_csi2rx → ds90ub960 → ds90ub953

However, the IMX390 camera does not appear in the media graph and cannot be accessed.

Here is my dtso:

k3-j721e-sk-fpdlink-fusion.dtso
// SPDX-License-Identifier: GPL-2.0
/*
 * DT Overlay for Fusion (FPD-Link III) board on J721E SK,
 * AM68 SK or AM69 SK.
 * https://svtronics.com/portfolio/evm577pfusion-v1-0-fusion/
 *
 * Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

&{/} {
	clk_fusion_25M_fixed: fixed-clock-25M {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <25000000>;
	};
};


&cam0_i2c {
	#address-cells = <1>;
	#size-cells = <0>;

	deser@3d {
		compatible = "ti,ds90ub960-q1";
		reg = <0x3d>;
		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 <1200000000>;
					remote-endpoint = <&csi2_phy0>;
				};
			};
		};

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

&cdns_csi2rx0 {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		csi0_port0: port@0 {
			reg = <0>;
			status = "okay";

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

			};
		};
	};
};

&ti_csi2rx0 {
	status = "okay";
};

&dphy0 {
	status = "okay";
};

k3-fpdlink-imx390-rcm-0-0.dtso
// SPDX-License-Identifier: GPL-2.0
/*
 * IMX390 FPD-Link 3 Camera Module
 * Copyright (c) 2023 Texas Instruments Incorporated - http://www.ti.com/
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

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

	/* FPDLink RX 0 */
	port@0 {
		reg = <0>;

		ub960_fpd3_1_in: endpoint {
			remote-endpoint = <&ub953_1_out>;
		};
	};
};

&ds90ub960_0_links {
	#address-cells = <1>;
	#size-cells = <0>;

	link@0 {
		reg = <0>;
		i2c-alias = <0x18>;

		ti,rx-mode = <3>;

		serializer: 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_1_in: endpoint {
						data-lanes = <1 2 3 4>;
						remote-endpoint = <&sensor_1_out>;
					};
				};

				port@1 {
					reg = <1>;

					ub953_1_out: endpoint {
						remote-endpoint = <&ub960_fpd3_1_in>;
					};
				};
			};

			i2c {
				#address-cells = <1>;
				#size-cells = <0>;

				sensor@21 {
					compatible = "sony,imx390";
					reg = <0x21>;

					clocks = <&serializer>;
					clock-names = "inck";
					assigned-clocks = <&serializer>;
					assigned-clock-rates = <27000000>;

					xclr-gpios = <&serializer 1 GPIO_ACTIVE_LOW>;
					error0-gpios = <&serializer 2 GPIO_ACTIVE_HIGH>;
					error1-gpios = <&serializer 3 GPIO_ACTIVE_HIGH>;
					comready-gpios = <&serializer 0 GPIO_ACTIVE_HIGH>;

					port {
						sensor_1_out: endpoint {
							remote-endpoint = <&ub953_1_in>;
						};
					};
				};
			};
		};
	};
};

We also confirmed the occupancy of i2c, 0x3d is the address of ds90ub960, 0x18 is the address of ds90ub953 registered remotely.

  • Hi Kathy,

    Which SDK version are you currently using? The k3-fpdlink-imx390-rcm-0-0.dtbo overlay is meant to be used when enabling the D3 RCM (rugged camera module) IMX390 sensor: D3RCM-IMX390-953. Could you please start by taking a look at the FAQ I linked below and let me know if you have any follow up questions.

    FAQhttps://e2e.ti.com/support/processors-group/processors/f/processors-forum/1403196/faq-what-are-the-common-reasons-a-csi-sensor-fails-to-probe-in-v4l2-environment

    Imaging Release Noteshttps://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/10_01_00_04/exports/docs/imaging/imaging_release_notes.html

    Thank you,

    Fabiana

  • Hi,

    Thank you very much for your response.

    Our SDK version: 10.01.00.04.

    We have currently included the RCM-IMX390 as a backup option. In the meantime, we have followed the debugging steps provided in the FAQ to verify that the CSI2-RX interface is functioning correctly. Please see the logs below:

    root@tda4vm-sk:/opt/edgeai-gst-apps# dmesg | grep csi 
    [ 1.195456] i2c 6-003d: Fixed dependency cycle(s) with /bus@100000/ticsi2rx@4500000/csi-bridge@4504000 
    [ 12.576556] cdns-csi2rx 4504000.csi-bridge: Probed CSI2RX with 4/4 lanes, 4 streams, external D-PHY

    However, we encountered the following errors when attempting to read from the IMX390 sensor:

    root@tda4vm-sk:/opt/edgeai-gst-apps# dmesg | grep 390 
    [ 12.810529] imx390 10-0021: inck rate: 27027027 Hz 
    [ 12.883302] imx390 10-0021: imx390_read: failed to read reg 0x0330: -121 
    [ 12.895409] imx390: probe of 10-0021 failed with error -121

    We have confirmed that the camera module is properly connected and the sensor is detected. However, based on the error messages, we suspect that the issue might be related to incorrect GPIO pin configuration, which could be preventing the sensor registers from being read correctly.

    We have confirmed that the camera module is properly connected and that the sensor is being detected. However, based on the error message, we suspect the failure may be caused by incorrect GPIO configuration, which is preventing successful register access.

    Upon checking the GPIO pinout against the reference design (please see attached image), we noticed that most GPIO pin assignments are different, except for the FRAME SYNC pin.

    Therefore, we would like to ask for your advice on the following:

    1. Is it possible to modify the GPIO configuration directly in the .dtso file?

    2. From our understanding, since the device tree uses compatible = "sony,imx390", it is loading the IMX390 kernel driver accordingly. Could you confirm if the GPIO configuration (such as RESET, FSYNC, etc.) is managed from within the driver based on this compatible string?

    We greatly appreciate. Thank you!

  • Hi Kathy,

    Due to a holiday, please expect a delay in my response. Thank you for understanding.

    Best Regards,

    Fabiana

  • Hi Kathy,

    The GPIO configuration is managed by the device tree, specifically here:

    					xclr-gpios = <&serializer 1 GPIO_ACTIVE_LOW>;
    					error0-gpios = <&serializer 2 GPIO_ACTIVE_HIGH>;
    					error1-gpios = <&serializer 3 GPIO_ACTIVE_HIGH>;
    					comready-gpios = <&serializer 0 GPIO_ACTIVE_HIGH>;

    These values are passed to the imx390 driver. If they are incorrect, you will need to change them to the correct values for your custom board.

    Best,
    Jared