工具/软件:
您好导出、
我们使用的设备树叠加层:
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的地址。