Navigation

    VEYE IMAGING Forum

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    1. Home
    2. 潘阳刚
    潘
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 9
    • Best 0
    • Groups 0

    潘阳刚

    @潘阳刚

    0
    Reputation
    1
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Email wyjpyg@163.com

    潘阳刚 Follow

    Latest posts made by 潘阳刚

    • RE: 相机抓图相关问题

      @veye_xumm 地址是什么?

      posted in Rockchip App camera
      潘
      潘阳刚
    • RE: 相机抓图相关问题

      capture.txt @veye_xumm 我没有直接替换,原始文件和您给我的文件只有如下几处不一样,我进行了修改:
      A2.png

      A1.png
      绿色的几行本不在原始文件中。
      其他有区别但是我未作改动的:
      A4.png

      A3.png

      其他的都一致。现在的问题有没有可能是转接板PCB设计不恰当导致的?
      capture.txt

      posted in Rockchip App camera
      潘
      潘阳刚
    • RE: 相机抓图相关问题

      @veye_xumm 确实缺少支持,我修改了这个文件。重新烧录镜像之后再次尝试,现在的log是这样的:

      v4l2-ctl -d /dev/video0 --set-fmt-video=width=1080,height=1280,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1088x1280.raw
      [ 1189.005947] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_update_sensor_mbus fail to get dphy param, used default value
      [ 1189.009415] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_update_sensor_mbus fail to get dphy param, used default value
      [ 1189.009978] rockchip-mipi-csi2 fdd10000.mipi0-csi2: stream on, src_sd: 000000002ff232b9, sd_name:rockchip-csi2-dphy0
      [ 1189.010005] rockchip-mipi-csi2 fdd10000.mipi0-csi2: stream ON
      [ 1189.010037] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_update_sensor_mbus fail to get dphy param, used default value
      [ 1189.010057] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_update_sensor_mbus fail to get dphy param, used default value
      [ 1189.010084] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_update_sensor_mbus fail to get dphy param, used default value
      <[ 1189.032767] rockchip-mipi-csi2 fdd10000.mipi0-csi2: stream off, src_sd: 000000002ff232b9, sd_name:rockchip-csi2-dphy0
      [ 1189.032803] rockchip-mipi-csi2 fdd10000.mipi0-csi2: stream OFF
      

      还是没能获取到图像数据。

      posted in Rockchip App camera
      潘
      潘阳刚
    • 相机抓图相关问题

      我尝试做转接板让edge2开发板支持raw-mipi-sc132m相机。
      编译好驱动后,更改设备树如下:

      // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
      / {
      	vcc_mipidphy0: vcc-mipidcphy0-regulator {//cam2-sc132m
      		status = "okay";
      		compatible = "regulator-fixed";
      		gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
      		pinctrl-names = "default";
      		pinctrl-0 = <&mipidphy0_pwr>;
      		regulator-name = "vcc_mipidphy0";
      		enable-active-high;
      		regulator-always-on;
      	};
      };
      &csi2_dcphy0 {//cam2
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi_in_dcphy0: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&mvcam_out0>;
      				data-lanes = <1 2>;
      			};
      		};
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			csidcphy0_out: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&mipi0_csi2_input>;
      			};
      		};
      	};
      };
      
      &mipi_dcphy0 {
      	status = "okay";
      };
      
      &csi2_dcphy1 {//cam1
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi_in_dcphy1: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&imx415f_out1>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			csidcphy1_out: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&mipi1_csi2_input>;
      			};
      		};
      	};
      };
      
      &mipi_dcphy1 {
      	status = "okay";
      };
      
      &csi2_dphy0 {//cam3
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipidphy0_in_ucam0: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&imx415c_out0>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			csidphy0_out: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&mipi2_csi2_input>;
      			};
      		};
      	};
      };
      
      &csi2_dphy0_hw {
      	status = "okay";
      };
      
      &i2c4 {//cam2
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c4m3_xfer>;
      
      	dw9714b: dw9714b@c {
      		compatible = "dongwoon,dw9714";
      		status = "disable";
      		reg = <0x0c>;
      		pinctrl-names = "focusb_gpios";
      		pinctrl-0 = <&focusb_gpio>;
      		focus-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
      		rockchip,vcm-start-current = <20>;
      		rockchip,vcm-rated-current = <76>;
      		rockchip,vcm-step-mode = <0>;
      		rockchip,camera-module-index = <0>;
      		rockchip,camera-module-facing = "back";
      	};
      
      	imx415b: imx415b@1a {
      		compatible = "sony,imx415";
      		status = "disable";
      		reg = <0x1a>;
      		clocks = <&cru CLK_MIPI_CAMARAOUT_M1>;
      		clock-names = "xvclk";
      		power-domains = <&power RK3588_PD_VI>;
      		pinctrl-names = "default", "camb_gpios";
      		pinctrl-0 = <&mipim1_camera1_clk>, <&camb_gpio>;
      		rockchip,grf = <&sys_grf>;
      		reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>;
      		pwdn-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
      		rockchip,camera-module-index = <0>;
      		rockchip,camera-module-facing = "back";
      		rockchip,camera-module-name = "CMK-OT2022-PX1";
      		rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20";
      		lens-focus = <&dw9714b>;
      		port {
      			imx415b_out0: endpoint {
      				remote-endpoint = <&mipi_in_dcphy0>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      	};
      	mvcam: mvcam@3b{
              compatible = "veye,mvcam";
      		status = "okay";
              reg = <0x3b>;
              clocks = <&cru CLK_MIPI_CAMARAOUT_M1>;
              clock-names = "xvclk";
              pinctrl-names = "default";
              pinctrl-0 = <&mipim1_camera1_clk>;
              power-domains = <&power RK3588_PD_VI>;
      
              //power-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
              reset-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//用原来的19和20引脚,SC132M似乎不需要考虑这两个引脚
              pwdn-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
      
              //avdd-supply = <&vcc_mipidcphy0>;
              //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 {
                  mvcam_out0: endpoint {
                      remote-endpoint = <&mipi_in_dcphy0>;
                      data-lanes = <1 2>;
                  };
              };
          };
      };
      
      &i2c3 {//cam1
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c3m0_xfer>;
      
      	dw9714f: dw9714f@c {
      		compatible = "dongwoon,dw9714";
      		status = "okay";
      		reg = <0x0c>;
      		pinctrl-names = "focusf_gpios";
      		pinctrl-0 = <&focusf_gpio>;
      		focus-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
      		rockchip,vcm-start-current = <20>;
      		rockchip,vcm-rated-current = <76>;
      		rockchip,vcm-step-mode = <0>;
      		rockchip,camera-module-index = <1>;
      		rockchip,camera-module-facing = "front";
      	};
      
      	imx415f: imx415f@1a {
      		compatible = "sony,imx415";
      		status = "okay";
      		reg = <0x1a>;
      		clocks = <&cru CLK_MIPI_CAMARAOUT_M2>;
      		clock-names = "xvclk";
      		power-domains = <&power RK3588_PD_VI>;
      		pinctrl-names = "default", "camf_gpios";
      		pinctrl-0 = <&mipim1_camera2_clk>, <&camf_gpio>;
      		rockchip,grf = <&sys_grf>;
      		reset-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>;
      		pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
      		rockchip,camera-module-index = <1>;
      		rockchip,camera-module-facing = "front";
      		rockchip,camera-module-name = "CMK-OT2022-PX1";
      		rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20";
      		lens-focus = <&dw9714f>;
      		port {
      			imx415f_out1: endpoint {
      				remote-endpoint = <&mipi_in_dcphy1>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      	};
      };
      
      &i2c8 {//cam3
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c8m2_xfer>;
      
      	dw9714c: dw9714c@c {
      		compatible = "dongwoon,dw9714";
      		status = "okay";
      		reg = <0x0c>;
      		pinctrl-names = "focusc_gpios";
      		pinctrl-0 = <&focusc_gpio>;
      		focus-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
      		rockchip,vcm-start-current = <20>;
      		rockchip,vcm-rated-current = <76>;
      		rockchip,vcm-step-mode = <0>;
      		rockchip,camera-module-index = <0>;
      		rockchip,camera-module-facing = "back";
      	};
      
      	imx415: imx415@1a {
      		compatible = "sony,imx415";
      		reg = <0x1a>;
      		clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
      		clock-names = "xvclk";
      		pinctrl-names = "default", "camc_gpios";
      		pinctrl-0 = <&mipim1_camera3_clk>, <&camc_gpio>;
      		power-domains = <&power RK3588_PD_VI>;
      		reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;	
      		pwdn-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
      		rockchip,camera-module-index = <0>;
      		rockchip,camera-module-facing = "back";
      		rockchip,camera-module-name = "CMK-OT2022-PX1";
      		rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20";
      		lens-focus = <&dw9714c>;
      		port {
      			imx415c_out0: endpoint {
      				remote-endpoint = <&mipidphy0_in_ucam0>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      	};
      };
      
      &pinctrl {
      	cam {
      		mipidphy0_pwr: mipidphy0-pwr {
      			rockchip,pins =
      				/* camera power en */
      				<1 RK_PB2 RK_FUNC_GPIO &pcfg_output_high>;
      		};
      		camf_gpio: camf-gpio {//imx415
      			rockchip,pins =
      				<3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>,
      				<3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		camb_gpio: camb-gpio {//imx415
      			rockchip,pins =
      				<1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
      				<1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		camc_gpio: camc-gpio {//imx415
      			rockchip,pins =
      				<3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
      				<1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		focusb_gpio: focusb-gpio {//dw9714
      			rockchip,pins =
      				<1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		focusf_gpio: focusf-gpio {//dw9714
      			rockchip,pins =
      				<1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		focusc_gpio: focusc-gpio {//dw9714
      			rockchip,pins =
      				<1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      	};
      };
      
      &mipi0_csi2 {//cam2
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi0_csi2_input: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&csidcphy0_out>;
      			};
      		};
      
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi0_csi2_output: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&cif_mipi_in0>;
      			};
      		};
      	};
      };
      
      &mipi1_csi2 {//cam1
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi1_csi2_input: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&csidcphy1_out>;
      			};
      		};
      
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi1_csi2_output: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&cif_mipi_in1>;
      			};
      		};
      	};
      };
      
      &mipi2_csi2 {//cam3
      	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 = <&csidphy0_out>;
      			};
      		};
      
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi2_csi2_output: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&cif_mipi2_in0>;
      			};
      		};
      	};
      };
      
      &rkcif {
      	status = "okay";
      };
      
      &rkcif_mipi_lvds {
      	status = "okay";
      
      	port {
      		cif_mipi_in0: endpoint {
      			remote-endpoint = <&mipi0_csi2_output>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds_sditf {
      	status = "okay";
      
      	port {
      		mipi_lvds_sditf: endpoint {
      			remote-endpoint = <&isp0_vir0>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds1 {
      	status = "okay";
      
      	port {
      		cif_mipi_in1: endpoint {
      			remote-endpoint = <&mipi1_csi2_output>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds1_sditf {
      	status = "okay";
      
      	port {
      		mipi1_lvds_sditf: endpoint {
      			remote-endpoint = <&isp0_vir1>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds2 {
      	status = "okay";
      
      	port {
      		cif_mipi2_in0: endpoint {
      			remote-endpoint = <&mipi2_csi2_output>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds2_sditf {
      	status = "okay";
      
      	port {
      		mipi_lvds2_sditf: endpoint {
      			remote-endpoint = <&isp1_vir0>;
      		};
      	};
      };
      
      &rkcif_mmu {
      	status = "okay";
      };
      
      &rkisp0 {
      	status = "okay";
      
      };
      
      &isp0_mmu {
      	status = "okay";
      };
      
      &rkisp0_vir0 {
      	status = "okay";
      
      	port {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		isp0_vir0: endpoint@0 {
      			reg = <0>;
      			remote-endpoint = <&mipi_lvds_sditf>;
      		};
      	};
      };
      
      &rkisp0_vir1 {
      	status = "okay";
      
      	port {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		isp0_vir1: endpoint@0 {
      			reg = <0>;
      			remote-endpoint = <&mipi1_lvds_sditf>;
      		};
      	};
      };
      
      &rkisp1 {
      	status = "okay";
      };
      
      &isp1_mmu {
      	status = "okay";
      };
      
      &rkisp1_vir0 {
      	status = "okay";
      
      	port {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		isp1_vir0: endpoint@0 {
      			reg = <0>;
      			remote-endpoint = <&mipi_lvds2_sditf>;
      		};
      	};
      };
      
      

      开发板能够识别到相机:

      [   10.868932] mvcam 4-003b: veye mv series camera driver version: 01.01.04
      [   11.872574] mvcam 4-003b: camera is: RAW-MIPI-SC132M
      [   11.873598] mvcam 4-003b: firmware version: 0x1040000
      [   11.877481] mvcam 4-003b: mvcam_get_mipifeature: lane num 2, datarate 1500000000 bps
      [   11.877588] mvcam 4-003b: Success to get mvcam endpoint data lanes, dts uses 2 lanes
      [   11.891182] mvcam 4-003b: mvcam_enum_controls success
      

      但是使用命令

      v4l2-ctl -d /dev/video0 --set-fmt-video=width=1080,height=1280,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1088x1280.raw
      

      会报错:

      [ 2912.107051] rkcif-mipi-lvds: ERROR: csi size err, intstat:0x1000000, lastline:0!!
      

      之后我通过v4l2-ctl -L命令发现:

      [ 3120.790050] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_update_sensor_mbus fail to get dphy param, used default value
      

      我不知道哪里出现了问题,请问我该如何排查?

      posted in Rockchip App camera
      潘
      潘阳刚
    • RE: 有关veye_mvcam驱动编译的问题

      @veye_xumm 有没有1.8V的其他图像传感器?

      posted in Rockchip App camera
      潘
      潘阳刚
    • RE: 有关veye_mvcam驱动编译的问题

      @潘阳刚 根据veye为适配firefly开发板所制作的转接板所示,需要添加1.8V和3.3V的电平转换。RK3588s引脚电平为1.8V,直接采用软线排改变rk3588s引脚线序的方式不可取。

      posted in Rockchip App camera
      潘
      潘阳刚
    • RE: 有关veye_mvcam驱动编译的问题

      @veye_xumm 11号引脚power enable需要多少V?我将该引脚拉高,电压表测量结果为1.8V,log显示没有检测到相机。我也检测了电源引脚,为3.3V,没有问题。

      posted in Rockchip App camera
      潘
      潘阳刚
    • RE: 有关veye_mvcam驱动编译的问题

      @veye_xumm 您好,我注释掉了有关RKMODULE_GET_CSI_DSI_INFO的case,编译通过了,我连接好相机后却没能识别到相机。我使用的是i2c-3和i2c-4。

      [   10.906532] mvcam 3-003b: veye mv series camera driver version: 01.01.04
      [   11.909428] mvcam: mvcam_read: Reading register 0x04 failed
      [   11.909481] mvcam 3-003b: failed to read chip id
      [   11.909905] mvcam 4-003b: veye mv series camera driver version: 01.01.04
      [   12.912928] mvcam: mvcam_read: Reading register 0x04 failed
      [   12.913033] mvcam 4-003b: failed to read chip id
      

      我觉得我的硬件连线没有问题,与电路原理图一一对应,通过定制的软线排连接。图像传感器也没有发热。我希望先排查软件方面的问题,但是我不知道该从何处开始排查起,或者有哪些可以使用的工具。图片里左侧为开发板相机接口线序,右侧为SC132M接口线序。
      0fc7c6b7-acd4-4a31-9039-7a6d6294b484-image.png
      设备树相关代码:

      &csi2_dcphy0 {
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi_in_dcphy0: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&mvcamb_out0>;
      				data-lanes = <1 2>;
      			};
      		};
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			csidcphy0_out: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&mipi0_csi2_input>;
      			};
      		};
      	};
      };
      
      &mipi_dcphy0 {
      	status = "okay";
      };
      
      &csi2_dcphy1 {
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi_in_dcphy1: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&mvcamf_out1>;
      				data-lanes = <1 2>;
      			};
      		};
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			csidcphy1_out: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&mipi1_csi2_input>;
      			};
      		};
      	};
      };
      
      &mipi_dcphy1 {
      	status = "okay";
      };
      
      &csi2_dphy0 {
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipidphy0_in_ucam0: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&imx415c_out0>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			csidphy0_out: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&mipi2_csi2_input>;
      			};
      		};
      	};
      };
      
      &csi2_dphy0_hw {
      	status = "okay";
      };
      
      &i2c4 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c4m3_xfer>;
      
      	dw9714b: dw9714b@c {
      		compatible = "dongwoon,dw9714";
      		status = "okay";
      		reg = <0x0c>;
      		pinctrl-names = "focusb_gpios";
      		pinctrl-0 = <&focusb_gpio>;
      		focus-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
      		rockchip,vcm-start-current = <20>;
      		rockchip,vcm-rated-current = <76>;
      		rockchip,vcm-step-mode = <0>;
      		rockchip,camera-module-index = <0>;
      		rockchip,camera-module-facing = "back";
      	};
      
      	imx415b: imx415b@1a {
      		compatible = "sony,imx415";
      		status = "okay";
      		reg = <0x1a>;
      		clocks = <&cru CLK_MIPI_CAMARAOUT_M1>;
      		clock-names = "xvclk";
      		power-domains = <&power RK3588_PD_VI>;
      		pinctrl-names = "default", "camb_gpios";
      		pinctrl-0 = <&mipim1_camera1_clk>, <&camb_gpio>;
      		rockchip,grf = <&sys_grf>;
      		reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>;
      		pwdn-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
      		rockchip,camera-module-index = <0>;
      		rockchip,camera-module-facing = "back";
      		rockchip,camera-module-name = "CMK-OT2022-PX1";
      		rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20";
      		lens-focus = <&dw9714b>;
      		port {
      			imx415b_out0: endpoint {
      				remote-endpoint = <&mipi_in_dcphy0>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      	};
      	mvcamb: mvcamb@3b{
      		compatible = "veye,mvcam";
      		reg = <0x3b>;
      		clocks = <&cru CLK_MIPI_CAMARAOUT_M1>;
      		clock-names = "xvclk";
      		pinctrl-names = "default";
      		pinctrl-0 = <&mipim1_camera1_clk>;
      		power-domains = <&power RK3588_PD_VI>;
      
      		//power-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
      		reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;//&gpio3 RK_PC4 GPIO_ACTIVE_HIGH
      		pwdn-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;//&gpio3 RK_PC1 GPIO_ACTIVE_HIGH
      
      		//avdd-supply = <&vcc_mipidcphy0>;
      		//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 {
      			mvcamb_out0: endpoint {
      					remote-endpoint = <&mipi_in_dcphy0>;//&mipidphy0_in_ucam0
      					data-lanes = <1 2>;
      			};
      		};
          };
      };
      
      &i2c3 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c3m0_xfer>;
      
      	dw9714f: dw9714f@c {
      		compatible = "dongwoon,dw9714";
      		status = "okay";
      		reg = <0x0c>;
      		pinctrl-names = "focusf_gpios";
      		pinctrl-0 = <&focusf_gpio>;
      		focus-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
      		rockchip,vcm-start-current = <20>;
      		rockchip,vcm-rated-current = <76>;
      		rockchip,vcm-step-mode = <0>;
      		rockchip,camera-module-index = <1>;
      		rockchip,camera-module-facing = "front";
      	};
      
      	imx415f: imx415f@1a {
      		compatible = "sony,imx415";
      		status = "okay";
      		reg = <0x1a>;
      		clocks = <&cru CLK_MIPI_CAMARAOUT_M2>;
      		clock-names = "xvclk";
      		power-domains = <&power RK3588_PD_VI>;
      		pinctrl-names = "default", "camf_gpios";
      		pinctrl-0 = <&mipim1_camera2_clk>, <&camf_gpio>;
      		rockchip,grf = <&sys_grf>;
      		reset-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>;
      		pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
      		rockchip,camera-module-index = <1>;
      		rockchip,camera-module-facing = "front";
      		rockchip,camera-module-name = "CMK-OT2022-PX1";
      		rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20";
      		lens-focus = <&dw9714f>;
      		port {
      			imx415f_out1: endpoint {
      				remote-endpoint = <&mipi_in_dcphy1>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      	};
      	mvcamf: mvcamf@3b{
      		compatible = "veye,mvcam";
      		reg = <0x3b>;
      		clocks = <&cru CLK_MIPI_CAMARAOUT_M2>;
      		clock-names = "xvclk";
      		pinctrl-names = "default";
      		pinctrl-0 = <&mipim1_camera2_clk>;
      		power-domains = <&power RK3588_PD_VI>;
      
      		//power-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
      		reset-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;//&gpio3 RK_PC4 GPIO_ACTIVE_HIGH
      		pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;//&gpio3 RK_PC1 GPIO_ACTIVE_HIGH
      
      		//avdd-supply = <&vcc_mipidcphy0>;
      		//firefly,clkout-enabled-index = <0>;
      		rockchip,camera-module-index = <1>;
      		rockchip,camera-module-facing = "back";
      		rockchip,camera-module-name = "NC";
      		rockchip,camera-module-lens-name = "NC";
      		port {
      			mvcamf_out1: endpoint {
      					remote-endpoint = <&mipi_in_dcphy1>;//&mipidphy0_in_ucam0
      					data-lanes = <1 2>;
      			};
      		};
          };
      };
      
      &i2c8 {
      	status = "okay";
      	pinctrl-names = "default";
      	pinctrl-0 = <&i2c8m2_xfer>;
      
      	dw9714c: dw9714c@c {
      		compatible = "dongwoon,dw9714";
      		status = "okay";
      		reg = <0x0c>;
      		pinctrl-names = "focusc_gpios";
      		pinctrl-0 = <&focusc_gpio>;
      		focus-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
      		rockchip,vcm-start-current = <20>;
      		rockchip,vcm-rated-current = <76>;
      		rockchip,vcm-step-mode = <0>;
      		rockchip,camera-module-index = <0>;
      		rockchip,camera-module-facing = "back";
      	};
      
      	imx415: imx415@1a {
      		compatible = "sony,imx415";
      		reg = <0x1a>;
      		clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
      		clock-names = "xvclk";
      		pinctrl-names = "default", "camc_gpios";
      		pinctrl-0 = <&mipim1_camera3_clk>, <&camc_gpio>;
      		power-domains = <&power RK3588_PD_VI>;
      		reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;	
      		pwdn-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
      		rockchip,camera-module-index = <0>;
      		rockchip,camera-module-facing = "back";
      		rockchip,camera-module-name = "CMK-OT2022-PX1";
      		rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20";
      		lens-focus = <&dw9714c>;
      		port {
      			imx415c_out0: endpoint {
      				remote-endpoint = <&mipidphy0_in_ucam0>;
      				data-lanes = <1 2 3 4>;
      			};
      		};
      	};
      };
      
      &pinctrl {
      	cam {
      		camf_gpio: camf-gpio {
      			rockchip,pins =
      				<3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>,
      				<3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		camb_gpio: camb-gpio {
      			rockchip,pins =
      				<1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
      				<1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		camc_gpio: camc-gpio {
      			rockchip,pins =
      				<3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
      				<1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		focusb_gpio: focusb-gpio {
      			rockchip,pins =
      				<1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		focusf_gpio: focusf-gpio {
      			rockchip,pins =
      				<1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      		focusc_gpio: focusc-gpio {
      			rockchip,pins =
      				<1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
      		};
      	};
      };
      
      &mipi0_csi2 {
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi0_csi2_input: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&csidcphy0_out>;
      			};
      		};
      
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi0_csi2_output: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&cif_mipi_in0>;
      			};
      		};
      	};
      };
      
      &mipi1_csi2 {
      	status = "okay";
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		port@0 {
      			reg = <0>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi1_csi2_input: endpoint@1 {
      				reg = <1>;
      				remote-endpoint = <&csidcphy1_out>;
      			};
      		};
      
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi1_csi2_output: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&cif_mipi_in1>;
      			};
      		};
      	};
      };
      
      &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 = <&csidphy0_out>;
      			};
      		};
      
      		port@1 {
      			reg = <1>;
      			#address-cells = <1>;
      			#size-cells = <0>;
      
      			mipi2_csi2_output: endpoint@0 {
      				reg = <0>;
      				remote-endpoint = <&cif_mipi2_in0>;
      			};
      		};
      	};
      };
      
      &rkcif {
      	status = "okay";
      };
      
      &rkcif_mipi_lvds {
      	status = "okay";
      
      	port {
      		cif_mipi_in0: endpoint {
      			remote-endpoint = <&mipi0_csi2_output>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds_sditf {
      	status = "okay";
      
      	port {
      		mipi_lvds_sditf: endpoint {
      			remote-endpoint = <&isp0_vir0>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds1 {
      	status = "okay";
      
      	port {
      		cif_mipi_in1: endpoint {
      			remote-endpoint = <&mipi1_csi2_output>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds1_sditf {
      	status = "okay";
      
      	port {
      		mipi1_lvds_sditf: endpoint {
      			remote-endpoint = <&isp0_vir1>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds2 {
      	status = "okay";
      
      	port {
      		cif_mipi2_in0: endpoint {
      			remote-endpoint = <&mipi2_csi2_output>;
      		};
      	};
      };
      
      &rkcif_mipi_lvds2_sditf {
      	status = "okay";
      
      	port {
      		mipi_lvds2_sditf: endpoint {
      			remote-endpoint = <&isp1_vir0>;
      		};
      	};
      };
      
      &rkcif_mmu {
      	status = "okay";
      };
      
      &rkisp0 {
      	status = "okay";
      
      };
      
      &isp0_mmu {
      	status = "okay";
      };
      
      &rkisp0_vir0 {
      	status = "okay";
      
      	port {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		isp0_vir0: endpoint@0 {
      			reg = <0>;
      			remote-endpoint = <&mipi_lvds_sditf>;
      		};
      	};
      };
      
      &rkisp0_vir1 {
      	status = "okay";
      
      	port {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		isp0_vir1: endpoint@0 {
      			reg = <0>;
      			remote-endpoint = <&mipi1_lvds_sditf>;
      		};
      	};
      };
      
      &rkisp1 {
      	status = "okay";
      };
      
      &isp1_mmu {
      	status = "okay";
      };
      
      &rkisp1_vir0 {
      	status = "okay";
      
      	port {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		isp1_vir0: endpoint@0 {
      			reg = <0>;
      			remote-endpoint = <&mipi_lvds2_sditf>;
      		};
      	};
      };
      
      posted in Rockchip App camera
      潘
      潘阳刚
    • 有关veye_mvcam驱动编译的问题

      我想在RK3588s (khadas的edge2开发板)上使用RAW MIPI SC132M,按照步骤修改了设备树文件,将veye_mvcam.c和veye_cam.h文件放到了对应的路径下,在编译过程中报错了,log如下。

      make[1]: Entering directory '/home/pyg/project/khadas/fenix/build/linux'
        SYNC    include/config/auto.conf.cmd
        CALL    scripts/atomic/check-atomics.sh
        CALL    scripts/checksyscalls.sh
        GEN     usr/initramfs_data.cpio
        SHIPPED usr/initramfs_inc_data
        AS      usr/initramfs_data.o
        AR      usr/built-in.a
        CHK     include/generated/compile.h
        UPD     include/generated/compile.h
        CC      init/version.o
        AR      init/built-in.a
        UPD     kernel/config_data
        GZIP    kernel/config_data.gz
        CC      kernel/configs.o
        AR      kernel/built-in.a
        CC      drivers/media/i2c/veye_mvcam.o
      drivers/media/i2c/veye_mvcam.c: In function 'mvcam_ioctl':
      drivers/media/i2c/veye_mvcam.c:859:10: error: 'RKMODULE_GET_CSI_DSI_INFO' undeclared (first use in this function); did you mean 'RKMODULE_GET_CHANNEL_INFO'?
        859 |     case RKMODULE_GET_CSI_DSI_INFO:
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~
            |          RKMODULE_GET_CHANNEL_INFO
      drivers/media/i2c/veye_mvcam.c:859:10: note: each undeclared identifier is reported only once for each function it appears in
      drivers/media/i2c/veye_mvcam.c:860:17: error: 'RKMODULE_CSI_INPUT' undeclared (first use in this function)
        860 |   *(int *)arg = RKMODULE_CSI_INPUT;
            |                 ^~~~~~~~~~~~~~~~~~
      drivers/media/i2c/veye_mvcam.c: In function 'mvcam_compat_ioctl32':
      drivers/media/i2c/veye_mvcam.c:918:10: error: 'RKMODULE_GET_CSI_DSI_INFO' undeclared (first use in this function); did you mean 'RKMODULE_GET_CHANNEL_INFO'?
        918 |     case RKMODULE_GET_CSI_DSI_INFO:
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~
            |          RKMODULE_GET_CHANNEL_INFO
      drivers/media/i2c/veye_mvcam.c:919:17: error: 'RKMODULE_CSI_INPUT' undeclared (first use in this function)
        919 |   *(int *)arg = RKMODULE_CSI_INPUT;
            |                 ^~~~~~~~~~~~~~~~~~
      make[4]: *** [scripts/Makefile.build:273: drivers/media/i2c/veye_mvcam.o] Error 1
      make[3]: *** [scripts/Makefile.build:516: drivers/media/i2c] Error 2
      make[3]: *** Waiting for unfinished jobs....
      make[2]: *** [scripts/Makefile.build:516: drivers/media] Error 2
      make[2]: *** Waiting for unfinished jobs....
      make[1]: *** [Makefile:1917: drivers] Error 2
      make[1]: Leaving directory '/home/pyg/project/khadas/fenix/build/linux'
      
      

      请问怎么才能让veye_mvcam.o编译通过,谢谢。

      posted in Rockchip App camera
      潘
      潘阳刚