工具/软件:
尊敬的 TI 专家:
我正在尝试将 Pcam5c(具有内置 ISP 的 ov5640)连接到 SK-AM62A-LP。
PSDK 的版本为 11.01.07.05。
我按如下方式修改了器件树、
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index 3a6d18c141d0..57a967b91b6e 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -248,6 +248,11 @@ sound_master: simple-audio-card,codec {
clocks = <&tlv320_mclk>;
};
};
+ clk_ov5640_fixed: ov5640-xclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <12000000>;
+ };
};
&mcu_pmx0 {
@@ -626,6 +631,13 @@ exp2: gpio@23 {
"RGMII2_BRD_CONN_DET", "CSI_SEL2",
"CSI_EN", "AUTO_100M_1000M_CONFIG",
"CSI_VLDO_SEL", "SoC_WLAN_SDIO_RST";
+ p19-hog {
+ /* P19 - CSI_SEL2 */
+ gpio-hog;
+ gpios = <19 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "CSI_SEL2";
+ };
};
sii9022: bridge-hdmi@3b {
@@ -663,7 +675,60 @@ &main_i2c2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c2_pins_default>;
- clock-frequency = <400000>;
+
+ i2c-switch@71 {
+ compatible = "nxp,pca9543";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x71>;
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ ov5640: camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ clocks = <&clk_ov5640_fixed>;
+ powerdown-gpios = <&exp1 13 GPIO_ACTIVE_LOW>;
+ clock-names = "xclk";
+ port {
+ csi2_cam0: endpoint {
+ remote-endpoint = <&csi2rx0_in_sensor>;
+ 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 = <&csi2_cam0>;
+ bus-type = <4>; /* CSI2 DPHY. */
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&ti_csi2rx0 {
+ status = "okay";
+};
+
+&dphy0 {
+ status = "okay";
};
&sdhci0 {
对设备树的修改似乎正常工作。
[ 5.980358] ov5640 4-003c: supply DOVDD not found, using dummy regulator [ 5.983954] ov5640 4-003c: supply AVDD not found, using dummy regulator [ 5.985083] ov5640 4-003c: supply DVDD not found, using dummy regulator ... [ 6.108100] /bus@f0000/i2c@20020000/i2c-switch@71/i2c@1/camera@3c: Fixed dependency cycle(s) with /bus@f0000/ticsi2rx@30102000/csi-bridge@30101000 [ 6.130838] /bus@f0000/ticsi2rx@30102000/csi-bridge@30101000: Fixed dependency cycle(s) with /bus@f0000/i2c@20020000/i2c-switch@71/i2c@1/camera@3c [ 6.154938] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY
当我登录时、将显示消息。
CSI Camera 0 detected
device = /dev/video-ov5640-cam0
name = ov5640
format = [fmt:YUYV8_1X16/1280x720]
subdev_id = /dev/v4l-ov5640-subdev0
isp_required = no
接下来、我尝试使用以下命令进行摄像头流式传输。
gst-launch-1.0 -v v4l2src device=/dev/video-ov5640-cam0 io-mode=5 ! \ video/x-raw, width=1280, height=720, framerate=30/1,format=YUY2 ! \ kmssink driver-name=tidss sync=false
结果如下、HDMI 显示屏上不显示任何图像。
root@am62axx-evm:/opt/edgeai-gst-apps# gst-launch-1.0 -v v4l2src device=/dev/video-ov5640-cam0 io-mode=5 ! \ rate=30/1,format=YUY2 ! \ kmssin> video/x-raw, width=1280, height=720, framerate=30/1,format=YUY2 ! \ > kmssink driver-name=tidss sync=false Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1920 /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 1080 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2, interlace-mode=(string)progressive, colorimetry=(string)bt709 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2, interlace-mode=(string)progressive, colorimetry=(string)bt709 /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2, interlace-mode=(string)progressive, colorimetry=(string)bt709 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2, interlace-mode=(string)progressive, colorimetry=(string)bt709
如果您有解决方案、如果您能告诉我、我将不胜感激。
此致、
Takayuki