VEYE IMAGING Forum
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    • Register
    • Login

    移植imx462摄像头驱动到rk3588时出现了以下的问题,不知道怎么解决,内核版本是5.10

    Scheduled Pinned Locked Moved VEYE MIPI camera
    29 Posts 2 Posters 13.6k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      aike
      last edited by aike

      移植完成驱动之后没有识别到摄像头的传感器,这个怎么解决呢
      85449cf6-2c46-478e-a0fd-94326e6c4ade-image.png

      veye_xummV 1 Reply Last reply Reply Quote 0
      • veye_xummV Offline
        veye_xumm @aike
        last edited by

        @aike 应该还是dts中各个node之间链接关系不对。

        Questions will be answered as soon as possible, please be patient.
        如果你使用中文,请直接用中文提问。
        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

        1 Reply Last reply Reply Quote 0
        • A Offline
          aike
          last edited by

          调试串口出现了以下的信息,驱动应该是移植成功了吧,为什么还是检测不到摄像头传感器呢
          2df3fc19-da02-4363-8289-53616ee04f31-image.png
          eff073ca-80b2-4a63-9ea3-c5ecd0a61d02-image.png

          veye_xummV 1 Reply Last reply Reply Quote 0
          • veye_xummV Offline
            veye_xumm @aike
            last edited by

            @aike 能显示出相机型号,表示i2c已经调通了。但是由于你的dts没有配对,所以报了你后面这个图的错误,进而没有产生/dev/video0.

            Questions will be answered as soon as possible, please be patient.
            如果你使用中文,请直接用中文提问。
            May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

            1 Reply Last reply Reply Quote 0
            • A Offline
              aike
              last edited by

              现在又出现了这个问题,04b5bd18-b767-4907-b393-8df847101d63-image.png

              veye_xummV 1 Reply Last reply Reply Quote 0
              • veye_xummV Offline
                veye_xumm @aike
                last edited by

                @aike 这个提示i2c不通,你看看这次是否吧resetpin的控制方面的dts改错了。

                Questions will be answered as soon as possible, please be patient.
                如果你使用中文,请直接用中文提问。
                May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                1 Reply Last reply Reply Quote 0
                • A Offline
                  aike
                  last edited by

                  rk3588-veyecam2m.txt 这是摄像头接口的原理图(Uploading 100%) f0353728-900d-476b-9ac1-4841d167dc32-image.png
                  v4l2-ctl --list-device
                  rk_hdmirx (fdee0000.hdmirx-controller):
                  /dev/video20

                  rkisp-statistics (platform: rkisp):
                  /dev/video18
                  /dev/video19

                  rkcif-mipi-lvds2 (platform:rkcif):
                  /dev/media0

                  rkisp_mainpath (platform:rkisp0-vir2):
                  /dev/video11
                  /dev/video12
                  /dev/video13
                  /dev/video14
                  /dev/video15
                  /dev/video16
                  /dev/video17
                  /dev/media1

                  Failed to open /dev/video0: No such device
                  接口配对关系.txt
                  请问哪个node没有没有配对呢

                  veye_xummV 1 Reply Last reply Reply Quote 0
                  • veye_xummV Offline
                    veye_xumm @aike
                    last edited by

                    @aike
                    第一步,i2c要调通。上次你曾经调好过。
                    504a0002-d5f8-4806-801c-ae53792f926e-image.png
                    第二步,dts中关于mipi接口的节点连接关系要写对。你这个原理图是外设接插件的,并没有能表明最终接入到3588用的是哪几个接口。
                    如果这个板子本身有默认支持的camera,比如ov5640之类的,你可以 参考那个dts。
                    或者你把这个板子原生支持的摄像头的dts和你现在移植的VEYE模组的dts都发出来,我帮你看看。

                    Questions will be answered as soon as possible, please be patient.
                    如果你使用中文,请直接用中文提问。
                    May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      aike
                      last edited by

                      这是原生支持的imx219摄像头,我是用camera3和camera4[0_1733196166905_tl3588-evm-imx219.dts](Uploading 100%)
                      这是veye模组的摄像头rk3588-veyecam2m.txt veye模组的摄像头也需要用两个,也就是camera3和camera4,目前只是在调试camera3接口,

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        aike
                        last edited by

                        刚刚dts文件没有传上去,我用txt再传输一边imx219摄像头的dts
                        tl3588-evm-imx219.txt

                        veye_xummV 1 Reply Last reply Reply Quote 0
                        • veye_xummV Offline
                          veye_xumm @aike
                          last edited by

                          @aike 你现在i2c是通的,能识别到摄像头型号,对吗?

                          Questions will be answered as soon as possible, please be patient.
                          如果你使用中文,请直接用中文提问。
                          May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                          1 Reply Last reply Reply Quote 0
                          • A Offline
                            aike
                            last edited by

                            对的,像这样i2c能识别到摄像头型号504a0002-d5f8-4806-801c-ae53792f926e-image.png

                            veye_xummV 1 Reply Last reply Reply Quote 0
                            • veye_xummV Offline
                              veye_xumm @aike
                              last edited by

                              @aike 试试这个

                              // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
                              /*
                               * Copyright (c) 2022 www.veye.cc
                               *
                               */
                              #include "tl3588-evm.dts"
                              
                              &i2c1 {
                                      status = "okay";
                                      // pinctrl-names = "default";
                                      // pinctrl-0 = <&i2c1m2_xfer>;
                              
                                      veyecam2m: veyecam2m@3b{
                                             compatible = "veye,veyecam2m";
                                             reg = <0x3b>;
                              	      	   clocks = <&cru CLK_MIPI_CAMARAOUT_M1>;
                              	           clock-names = "xvclk";
                                             status = "okay";
                              
                                          //    pinctrl-names = "default";
                              			//    pinctrl-0 = <&mipim1_camera1_clk>;
                                             //power-domains = <&power RK3588_PD_VI>;
                                             //power-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
                                             reset-gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>;
                              			   //pwdn-gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>;
                                             //avdd-supply = <&vcc_mipidcphy1>;
                                             //firefly,clkout-enabled-index = <0>;
                                             rockchip,camera-module-index = <0>;
                                             rockchip,camera-module-facing = "back";
                                             rockchip,camera-module-name = "NC";
                                             rockchip,camera-module-lens-name = "NC";
                                             port {
                                                      veyecam2m_out0: endpoint {
                                                             remote-endpoint = <&mipi_dphy1_in_ucam0>;
                                                             data-lanes = <1 2>;
                                                     };
                                             };
                                     };
                              
                              };
                              &csi2_dphy0_hw {
                              	status = "okay";
                              };
                              
                              &csi2_dphy1 {
                              	status = "okay";
                              
                              	ports {
                              		#address-cells = <1>;
                              		#size-cells = <0>;
                              		port@0 {
                              			reg = <0>;
                              			#address-cells = <1>;
                              			#size-cells = <0>;
                              
                              			mipi_dphy1_in_ucam0: endpoint@1 {
                              				reg = <1>;
                              				remote-endpoint = <&veyecam2m_out0>;
                              				data-lanes = <1 2>;
                              			};
                              		};
                              		port@1 {
                              			reg = <1>;
                              			#address-cells = <1>;
                              			#size-cells = <0>;
                              
                              			csidphy1_out: endpoint@0 {
                              				reg = <0>;
                              				remote-endpoint = <&mipi2_csi2_input>;
                              			};
                              		};
                              	};
                              };
                              
                              &mipi2_csi2_hw {
                                      status = "okay";
                              };
                              
                              &mipi2_csi2 {
                              	status = "okay";
                              
                              	ports {
                              		#address-cells = <1>;
                              		#size-cells = <0>;
                              
                              		port@0 {
                              			reg = <0>;
                              			#address-cells = <1>;
                              			#size-cells = <0>;
                              
                              			mipi2_csi2_input: endpoint@1 {
                              				reg = <1>;
                              				remote-endpoint = <&csi_dphy1_out>;
                              			};
                              		};
                              
                              		port@1 {
                              			reg = <1>;
                              			#address-cells = <1>;
                              			#size-cells = <0>;
                              
                              			mipi2_csi2_output: endpoint@0 {
                              				reg = <0>;
                              				remote-endpoint = <&cif_mipi2_in0>;
                              			};
                              		};
                              	};
                              };
                              
                              &rkcif_mipi_lvds2 {
                              	status = "okay";
                              	firefly,yuv_camera;
                              
                              	port {
                              		cif_mipi2_in0: endpoint {
                              			remote-endpoint = <&mipi2_csi2_output>;
                              		};
                              	};
                              };
                              
                              &rkcif_mipi_lvds2_sditf {
                              	status = "disabled";
                              
                              	port {
                              		mipi_lvds2_sditf: endpoint {
                              			remote-endpoint = <&isp0_vir2>;
                              		};
                              	};
                              };
                              
                              &rkisp0_vir2 {
                              	status = "disabled";
                              
                              	port {
                              		#address-cells = <1>;
                              		#size-cells = <0>;
                              
                              		isp0_vir2: endpoint@0 {
                              			reg = <0>;
                              			remote-endpoint = <&mipi_lvds2_sditf>;
                              		};
                              	};
                              };
                              &gpio2 {
                                      pinctrl-names = "default";
                                      pinctrl-0 = <&mipidphy0_pwr>;
                              
                                      camera3-pwdn-set {
                                              gpio-hog;
                                              gpios = <19 GPIO_ACTIVE_HIGH>;
                                              output-high;
                                      };
                              };
                              
                              &pinctrl {
                              	cam {
                              		mipidphy0_pwr: mipidphy1-pwr {
                              			rockchip,pins =
                              				/* camera power en */
                              				<2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
                              		};
                              	};
                              };
                              
                              &rkcif {
                              	status = "okay";
                              //	memory-region = <&cif_reserved>;
                              };
                              
                              &rkcif_mmu {
                              	status = "okay";
                              };
                              
                              &rkisp0 {
                              	status = "disabled";
                              };
                              
                              &isp0_mmu {
                              	status = "disabled";
                              };
                              
                              
                              
                              

                              Questions will be answered as soon as possible, please be patient.
                              如果你使用中文,请直接用中文提问。
                              May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                aike
                                last edited by

                                上面的代码编译出错,我把这里连接之后在和设备树一起编译内核,再把veyecam2m编译成veyecam2m.ko模块移植进去之后还是有问题1021e000-13cd-4e9b-8e82-18e42f513c5e-image.png
                                这个是错误截图551af68b-55f8-4e5e-a977-a3ff01b3b24d-image.png

                                veye_xummV 1 Reply Last reply Reply Quote 0
                                • veye_xummV Offline
                                  veye_xumm @aike
                                  last edited by

                                  @aike 我觉得dts没问题,你可以试试把veyecam2m直接编译到内核里面,而不是独立ko的形式试试。
                                  关于dts的逻辑关系,你可以参考这篇文章。
                                  https://www.cnblogs.com/armsom/articles/17449250.html

                                  Questions will be answered as soon as possible, please be patient.
                                  如果你使用中文,请直接用中文提问。
                                  May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    aike
                                    last edited by

                                    直接整合到内核之后没有看到update sensor info failed 的报错信息,但是没有看到isp的设备文件和拓扑接口a1a38816-046e-4c1c-af51-cbf7a6ae82fb-image.png
                                    摄像头拓扑结构图
                                    摄像头拓扑结构图.txt
                                    抓取图片也有问题
                                    5e11fa89-ed17-4569-8bdd-428dfbdcfe33-image.png
                                    ce6d7b4c-e192-4560-bef5-fb3b2757d1e8-image.png

                                    1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      aike
                                      last edited by

                                      应该是又更近了一步,现在无论是自己基于v4l2写的程序或者是gstreamer获取信息显示的画面都是绿色的v4l2_capture.jpg gstreamer.png
                                      这是什么情况呢

                                      veye_xummV 1 Reply Last reply Reply Quote 0
                                      • veye_xummV Offline
                                        veye_xumm @aike
                                        last edited by

                                        @aike 首先,我们这个模组是带有isp的,因此在dts中,isp部分都给bypass掉了。
                                        其次,你可以先试试我们wiki上的gstreamer例子,看看能不能预览。

                                        Questions will be answered as soon as possible, please be patient.
                                        如果你使用中文,请直接用中文提问。
                                        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                                        1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          aike
                                          last edited by

                                          我用gitee上面的gstreamer测试工具测试的时候出现了这些问题62fb8af1-4847-4e61-84f2-64eeecded9d8-image.png
                                          同时串口会打印这些
                                          fd3b438f-ce10-493b-9539-e7a9677d5040-image.png
                                          请问这个问题怎么解决

                                          veye_xummV 1 Reply Last reply Reply Quote 0
                                          • veye_xummV Offline
                                            veye_xumm @aike
                                            last edited by

                                            @aike 这个我们在其他的板卡上没有遇到过。你的板子本身没有带gstreamer吗? 或者问问板卡厂家。

                                            Questions will be answered as soon as possible, please be patient.
                                            如果你使用中文,请直接用中文提问。
                                            May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • First post
                                              Last post