Thread 中讨论的其他器件:AWR2243
工具与软件:
大家好!
我已根据 imx219.c 为 AWR2243编写了一个定制驱动程序、并且能够使用 v4l2启动流。
以下是 media-ctl 输出:
root@j722s-evm:/# media-ctl -p
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]
<- "imx219-dummy":0 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range] CTRL-A Z for hel-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE] Offline | ttyUSB2 pad2: Source
pad3: Source
pad4: Source
- entity 15: imx219-dummy (1 pad, 1 link, 0 routes)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[stream:0 fmt:SRGGB8_1X8/4096x64 field:none colorspace:raw xfer:none quantization:full-range
crop.bounds:(0,0)/4096x64
crop:(0,0)/4096x64]
-> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
- entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video2
pad0: Sink
<- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
- entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video3
pad0: Sink
<- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
- entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video4
pad0: Sink
<- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
- entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video5
pad0: Sink
<- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
- entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video6
pad0: Sink
<- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
- entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video7
pad0: Sink
<- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
将所有节点配置为相同的帧格式后、我可以启动挂起的流。 未捕获任何数据。
初始化期间内核不抛出错误。
root@j722s-evm:/# dmesg| grep csi [ 8.417891] platform imx219-dummy: Fixed dependency cycle(s) with /bus@f0000/ticsi2rx@30102000/csi-bridge@30101000 [ 8.430287] platform 30101000.csi-bridge: Fixed dependency cycle(s) with /imx219-dummy [ 9.292152] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY
我检查了 DPHY_LANE_CONTROL (0x30101040)寄存器、发现其返回0x00000000、即未启用时钟或数据通道。
器件树叠加层如下:
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for Dummy CSI2 sensor
/dts-v1/;
/plugin/;
&{/} {
imx219_dummy: imx219-dummy {
compatible = "sony,imx219-dummy";
status = "okay";
// clocks = <&clk_imx219_fixed>;
// clock-names = "xclk";
// Add explicit dependency on CSI2RX
//cdns_csi2rx0-supply;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg=<0>;
imx219_dummy_out: endpoint {
remote-endpoint = <&csi2rx0_in_sensor>;
// bus-type = <4>; /* CSI2 DPHY */
link-frequencies = /bits/ 64 <300000000>;
clock-lanes = <0>;
data-lanes = <1 2>;
};
};
};
};
};
&cdns_csi2rx0 {
ports {
#address-cells = <1>;
#size-cells = <0>;
csi0_port0:port@0 {
reg = <0>;
status = "okay";
csi2rx0_in_sensor: endpoint {
remote-endpoint = <&imx219_dummy_out>;
bus-type = <4>; /* CSI2 DPHY */
clock-lanes = <0>;
data-lanes = <1 2>;
};
};
};
};
&ti_csi2rx0 {
status = "okay";
};
&dphy0 {
status = "okay";
};
什么可能导致通道未在 DPHY 级别启用?
谢谢!
Jin