OpenEdv-开源电子网

 找回密码
 立即注册
查看: 393|回复: 0

RK3562J双摄问题求助,isp问题

[复制链接]

1

主题

1

帖子

0

精华

新手入门

积分
10
金钱
10
注册时间
2020-11-5
在线时间
2 小时
发表于 2026-7-22 15:14:33 | 显示全部楼层 |阅读模式
2金钱
大佬们,我使用的是正点原子RK3562J开发板,接入两个SC132GS摄像头模组,当前遇到的问题是两个摄像头同时接入,isp取图失败;
环境:
RK3562J开发板,自制sc132gs转接板,使用2lane模式,目前单个摄像头已驱动成功,两个CSI接口都正常捕获图像,开启rkaiq_3A_server,参数加载生效,画面不再过暗,因此想进行下一步双摄同时抓图。
现象:
接入单个摄像头,MIPI0和MIPI1两个接口都可以出图,我修改dts配置两个通路来接入两个摄像头,因为是两个I2C硬件,因此sc132gs配置的地址是一样的都是0x30,两个摄像头同时接入后,不开rkaiq_3A_server,捕获任意一个摄像头都失败;
开发板启动后第一次捕获MIPI0,dmesg输出:
  1. [   13.060620] rkisp_hw ff3f0000.isp: set isp clk = 297000000Hz
  2. [   13.062758] rkcif-mipi-lvds: stream[0] start streaming
  3. [   13.063476] rkcif-mipi-lvds: Allocate dummy buffer, size: 0x002a3000
  4. [   13.063723] rockchip-mipi-csi2 mipi0-csi2: stream on, src_sd: 00000000258714a2, sd_name:rockchip-csi2-dphy1
  5. [   13.063739] rockchip-mipi-csi2 mipi0-csi2: stream ON
  6. [   13.063782] rockchip-csi2-dphy1: dphy1, data_rate_mbps 360
  7. [   13.063809] rockchip-csi2-dphy csi2-dphy1: csi2_dphy_s_stream stream on:1, dphy1, ret 0
  8. [   13.063822] sc132gs 4-0030: sc132gs_s_stream: on: 1, 1080x1280@30
  9. [   13.128627] sc132gs 4-0030: set reg done, send startstream
  10. [   13.135949] rkcif-mipi-lvds: stream[0] start stopping, total mode 0x1, cur 0x1
  11. [   13.213371] rockchip-mipi-csi2 mipi0-csi2: stream off, src_sd: 00000000258714a2, sd_name:rockchip-csi2-dphy1
  12. [   13.213410] rockchip-mipi-csi2 mipi0-csi2: stream OFF
  13. [   13.213434] rockchip-csi2-dphy csi2-dphy1: csi2_dphy_s_stream_stop stream stop, dphy1
  14. [   13.213452] rockchip-csi2-dphy csi2-dphy1: csi2_dphy_s_stream stream on:0, dphy1, ret 0
  15. [   13.213478] sc132gs 4-0030: sc132gs_s_stream: on: 0, 1080x1280@30
  16. [   13.214176] rkcif-mipi-lvds: stream[0] stopping finished, dma_en 0x0
  17. select timeout
复制代码

再次抓同一个节点,报错:

  1. [  147.170311] rkisp-vir0: waiting on params stream on event timeout
复制代码
但此时抓cif节点是可以捕获到数据的。
已确认的事:
两个摄像头I2C识别正常,通过逻辑分析仪抓I2C通信正常。
驱动代码使用的kernel6.1中sc132gs.c,无修改。
dts如下:
  1. &i2c4 {
  2.         status = "okay";

  3.         sc132gs_0: sc132gs_0@30 {
  4.                 compatible = "smartsens,sc132gs";
  5.                 reg = <0x30>;
  6.                 clocks = <&ext_cam1_clk>;
  7.                 clock-names = "xvclk";
  8.                 pwdn-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
  9.                 // reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
  10.                 rockchip,camera-module-index = <0>;
  11.                 rockchip,camera-module-facing = "left";
  12.                 rockchip,camera-module-name = "CHRTC-SC132GS";
  13.                 rockchip,camera-module-lens-name = "2lane";

  14.                 port {
  15.                         sc132gs_out0: endpoint {
  16.                                 remote-endpoint = <&mipi_dphy1_sc132gs>;
  17.                                 data-lanes = <1 2>;
  18.                         };
  19.                 };
  20.         };
  21. };

  22. &i2c5 {
  23.         status = "okay";

  24.         sc132gs_1: sc132gs_1@30 {
  25.                 compatible = "smartsens,sc132gs";
  26.                 reg = <0x30>;
  27.                 clocks = <&ext_cam2_clk>;
  28.                 clock-names = "xvclk";
  29.                 pwdn-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
  30.                 // reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
  31.                 rockchip,camera-module-index = <1>;
  32.                 rockchip,camera-module-facing = "right";
  33.                 rockchip,camera-module-name = "CHRTC-SC132GS";
  34.                 rockchip,camera-module-lens-name = "2lane";

  35.                 port {
  36.                         sc132gs_out1: endpoint {
  37.                                 remote-endpoint = <&mipi_dphy4_sc132gs>;
  38.                                 data-lanes = <1 2>;
  39.                         };
  40.                 };
  41.         };
  42. };

  43. &csi2_dphy1 {
  44.         status = "okay";

  45.         ports {
  46.                 #address-cells = <1>;
  47.                 #size-cells = <0>;
  48.                 port@0 {
  49.                         reg = <0>;
  50.                         #address-cells = <1>;
  51.                         #size-cells = <0>;
  52.                         mipi_dphy1_sc132gs: endpoint@1 {
  53.                                 reg = <1>;
  54.                                 remote-endpoint = <&sc132gs_out0>;
  55.                                 data-lanes = <1 2>;
  56.                         };                       
  57.                 };
  58.                 port@1 {
  59.                         reg = <1>;
  60.                         #address-cells = <1>;
  61.                         #size-cells = <0>;

  62.                         csidphy1_out: endpoint@0 {
  63.                                 reg = <0>;
  64.                                 remote-endpoint = <&mipi0_csi2_input>;
  65.                         };
  66.                 };
  67.         };
  68. };

  69. &csi2_dphy4 {
  70.         status = "okay";

  71.         ports {
  72.                 #address-cells = <1>;
  73.                 #size-cells = <0>;
  74.                 port@0 {
  75.                         reg = <0>;
  76.                         #address-cells = <1>;
  77.                         #size-cells = <0>;

  78.                         mipi_dphy4_sc132gs: endpoint@1 {
  79.                                 reg = <1>;
  80.                                 remote-endpoint = <&sc132gs_out1>;
  81.                                 data-lanes = <1 2>;
  82.                         };       
  83.                 };
  84.                 port@1 {
  85.                         reg = <1>;
  86.                         #address-cells = <1>;
  87.                         #size-cells = <0>;

  88.                         csidphy4_out: endpoint@0 {
  89.                                 reg = <0>;
  90.                                 remote-endpoint = <&mipi2_csi2_input>;
  91.                         };
  92.                 };
  93.         };
  94. };


  95. &csi2_dphy0_hw {
  96.         status = "okay";
  97. };

  98. &csi2_dphy1_hw {
  99.         status = "okay";
  100. };


  101. &mipi0_csi2 {
  102.         status = "okay";

  103.         ports {
  104.                 #address-cells = <1>;
  105.                 #size-cells = <0>;

  106.                 port@0 {
  107.                         reg = <0>;
  108.                         #address-cells = <1>;
  109.                         #size-cells = <0>;

  110.                         mipi0_csi2_input: endpoint@1 {
  111.                                 reg = <1>;
  112.                                 remote-endpoint = <&csidphy1_out>;
  113.                         };
  114.                 };

  115.                 port@1 {
  116.                         reg = <1>;
  117.                         #address-cells = <1>;
  118.                         #size-cells = <0>;

  119.                         mipi0_csi2_output: endpoint@0 {
  120.                                 reg = <0>;
  121.                                 remote-endpoint = <&cif_mipi_in0>;
  122.                         };
  123.                 };
  124.         };
  125. };

  126. &mipi2_csi2 {
  127.         status = "okay";

  128.         ports {
  129.                 #address-cells = <1>;
  130.                 #size-cells = <0>;

  131.                 port@0 {
  132.                         reg = <0>;
  133.                         #address-cells = <1>;
  134.                         #size-cells = <0>;

  135.                         mipi2_csi2_input: endpoint@1 {
  136.                                 reg = <1>;
  137.                                 remote-endpoint = <&csidphy4_out>;
  138.                         };
  139.                 };

  140.                 port@1 {
  141.                         reg = <1>;
  142.                         #address-cells = <1>;
  143.                         #size-cells = <0>;

  144.                         mipi2_csi2_output: endpoint@0 {
  145.                                 reg = <0>;
  146.                                 remote-endpoint = <&cif_mipi_in2>;
  147.                         };
  148.                 };
  149.         };
  150. };

  151. &rkcif_mipi_lvds {
  152.         status = "okay";

  153.         port {
  154.                 cif_mipi_in0: endpoint {
  155.                         remote-endpoint = <&mipi0_csi2_output>;
  156.                 };
  157.         };
  158. };

  159. &rkcif_mipi_lvds2 {
  160.         status = "okay";

  161.         port {
  162.                 cif_mipi_in2: endpoint {
  163.                         remote-endpoint = <&mipi2_csi2_output>;
  164.                 };
  165.         };
  166. };

  167. &rkcif_mipi_lvds_sditf {
  168.         status = "okay";

  169.         port {
  170.                 mipi_lvds_sditf: endpoint {
  171.                         remote-endpoint = <&isp_vir0>;
  172.                 };
  173.         };
  174. };

  175. &rkcif_mipi_lvds2_sditf {
  176.         status = "okay";

  177.         port {
  178.                 mipi_lvds2_sditf: endpoint {
  179.                         remote-endpoint = <&isp_vir2>;
  180.                 };
  181.         };
  182. };

  183. &rkisp_vir0 {
  184.         status = "okay";

  185.         port {
  186.                 #address-cells = <1>;
  187.                 #size-cells = <0>;

  188.                 isp_vir0: endpoint@0 {
  189.                         reg = <0>;
  190.                         remote-endpoint = <&mipi_lvds_sditf>;
  191.                 };       
  192.         };
  193. };

  194. &rkisp_vir2 {
  195.         status = "okay";

  196.         port {
  197.                 #address-cells = <1>;
  198.                 #size-cells = <0>;

  199.                 isp_vir2: endpoint@0 {
  200.                         reg = <0>;
  201.                         remote-endpoint = <&mipi_lvds2_sditf>;
  202.                 };
  203.         };
  204. };

  205. &rkcif {
  206.         status = "okay";
  207. };

  208. &rkcif_mmu {
  209.         status = "okay";
  210. };

  211. &rkisp {
  212.         status = "okay";
  213. };

  214. &rkisp_mmu {
  215.         status = "okay";
  216. };
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

原子哥极力推荐上一条 /1 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2026-8-2 20:03

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表