Rkisp-vir0 Error on Rock 3a

1、First you will change you dts code:

/ {
	ext_cam_clk: external-camera-clock {
        compatible = "fixed-clock";
        clock-frequency = <25000000>;
        clock-output-names = "CLK_CAMERA_25MHZ";
        #clock-cells = <0>;
    };
};

&i2c5 {
	status = "okay";	
	pinctrl-0 = <&i2c5m0_xfer>;
	
	ov5647: ov5647@36 {
		compatible = "ovti,ov5647";
		reg = <0x36>;
		status = "okay";
		clocks = <&ext_cam_clk>;
		pwdn-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_LOW>;

		port {
			camera_out: endpoint {
				remote-endpoint = <&dphy_in>;
				data-lanes = <1 2>;
			};
		};
	};
};

&gpio1 {
	cam_power {
		gpio-hog;
		gpios = <RK_PB1 GPIO_ACTIVE_HIGH>;
		output-high;
	};
};

&rkisp {
	status = "okay";
};

&rkisp_mmu {
	status = "okay";
};

&csi2_dphy0 {
	status = "okay";
	ports {
		#address-cells = <1>;
		#size-cells = <0>;
		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			dphy_in: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&camera_out>;
				data-lanes = <1 2>;
			};
		};
		port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			dphy_out: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&isp0_in>;
			};
		};
	};
};

&csi2_dphy_hw {
      status = "okay";
};

&rkisp_vir0 {
	status = "okay";

	port {
		#address-cells = <1>;
		#size-cells = <0>;

		isp0_in: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dphy_out>;
		};
	};

};

2、Second replace your ov5647 driver file at /driver/media/i2c/
ov5647.zip (8.8 KB)

3、I only used on rock3a board, and my kernel version is 4.19. 219, other boards have not been verified

1 Like