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无法连接到 imx390

Guru**** 2337880 points
Other Parts Discussed in Thread: SK-TDA4VM
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1501885/sk-tda4vm-ds90ub960-cannot-connect-to-imx390

器件型号:SK-TDA4VM

工具/软件:

您好导出、

   我们使用的设备树叠加层:

       k3-j722s-evm-fpdlink-fusion.dtbo

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

   已通过 uEnv.txt 正确包含这些重叠内容。

硬件连接拓扑

IMX390 (LI-IMX390-FPDLINKIII-120H、不带 ISP)
  ⇅μ s
DS90UB953
  ⇅μ s
DS90UB960
  ⇅μ s
SK-TDA4VM

当前状态

   启动后、使用 media-ctl 检查该拓扑、显示了是否正确检测到与 DS90UB953串行器的连接。

   但是、IMX390传感器无法初始化、并且没有可用的摄像头流。

   imx390内核模块已正确加载。

   根据 dmesg、IMX390在探测期间出现故障、并出现 I2C 读取错误(错误-121)。

相关的 dmesg 日志

[  12.656592] imx390 10-0021:插入频率:27027027 Hz
[12.707615]  imx390 10-0021:imx390_read:无法读取寄存器0x0330:-121
[  12.714641] imx390:10-0021的探测器失败、错误为-121

加载的内核模块(lsmod)

imx390               102400 0
ds90ub953             16384 1.
ds90ub960             36864 1.

媒体拓扑

如附图所示、以下链接已建立并可见:

j721e-csi2rx→cdns_csi2rx→ds90ub960→ds90ub953

但是、IMX390摄像头不会出现在媒体图中、并且无法访问。

这是我的 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.
 * svtronics.com/.../
 *
 * 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>;
						};
					};
				};
			};
		};
	};
};

我们还确认 I2C 的占用地址为 ds90ub960的地址、0x18为远程注册的 ds90ub953的地址。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Kathy:

     您当前使用的是哪个 SDK 版本?  启用 D3 RCM (加固型摄像头模块) IMX390传感器 D3RCM-IMX390-953时 、应使用 k3-fpdlink-imx390-RCM-0.dtbo 叠加层。 您能先看一下我在下面链接的常见问题解答、如果您有任何后续问题、请告诉我。

    常见问题解答 : https://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

    映像发行说明 : https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/10_01_00_04/exports/docs/imaging/imaging_release_notes.html

    谢谢您、

    法比亚纳

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

    非常感谢您的答复。

    我们的 SDK 版本:10.01.00.04。

    我们目前已将 RCM-IMX390作为备份选项。 同时、我们已经按照常见问题解答中提供的调试步骤验证 CSI2-RX 接口是否正常工作。 请查看以下日志:

    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

    不过、我们在尝试从 IMX390传感器读取时遇到以下错误:

    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

    我们已确认摄像头模块已正确连接且检测到传感器。 但是、基于错误消息、我们怀疑该问题可能与错误的 GPIO 引脚配置有关、这可能会妨碍正确读取传感器寄存器。

    我们已确认摄像头模块已正确连接并且正在检测到传感器。 但是、根据错误消息、我们怀疑该故障可能是由错误的 GPIO 配置引起的、这会阻止成功访问寄存器。

    根据参考设计检查 GPIO 引脚排列(请参阅随附的图)时、我们注意到除了帧同步引脚外、大多数 GPIO 引脚分配是不同的。

    因此、我们希望就以下问题征求您的意见:

    1. 是否可以直接在.dtso文件中修改 GPIO 配置?

    2. 根据我们的理解、由于设备树使用compatible = "sony,imx390"、它正在相应地加载 IMX390内核驱动程序。 您能否确认是否根据该兼容字符串从驱动器内管理 GPIO 配置(例如复位、FSYNC 等)?

    我们非常感谢。 谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Kathy:

    由于假期、请预计我的回复会延迟。 感谢您的理解。

    此致、

    法比亚纳

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Kathy:

    GPIO 配置由器件树管理、具体如下:

    					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>;

    这些值将被传递到 imx390驱动程序。 如果错误、您需要将其更改为适合定制电路板的正确值。

    此致、
    Jared