Skip to content

ov8858 摄像头颜色不对,发黑,ISP没有起作用。 #21

@WIND-xx

Description

@WIND-xx

//phy u序列
&combphy1_usq {
status = "okay";
};

//phy P序列
&combphy2_psq {
status = "okay";
};

//dphy硬件
&csi2_dphy_hw {
status = "okay";
};
//摄像头D-PHY接口
&csi2_dphy0 {
status = "okay";
/*
* dphy0 only used for full mode,
* full mode and split mode are mutually exclusive
*/
ports {
#address-cells = <1>;
#size-cells = <0>;

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

		dphy0_in: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&ov8858_out>;
			data-lanes = <1 2 3 4>;
		};
	};

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

		dphy0_out: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&isp0_in>;
		};
	};
};

};

//摄像头D-PHY接口
&csi2_dphy1 {
status = "disabled";

/*
 * dphy1 only used for split mode,
 * can be used  concurrently  with dphy2
 * full mode and split mode are mutually exclusive
 */
ports {
	#address-cells = <1>;
	#size-cells = <0>;

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

		dphy1_in: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&ov8858_out>;
			data-lanes = <1 2 3 4>;
		};
	};

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

		dphy1_out: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&isp0_in>;
		};
	};
};

};
//摄像头D-PHY接口
&csi2_dphy2 {
status = "disabled";

/*
 * dphy2 only used for split mode,
 * can be used  concurrently  with dphy1
 * full mode and split mode are mutually exclusive
 */
ports {
	#address-cells = <1>;
	#size-cells = <0>;

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

		dphy2_in: endpoint@1 {
			reg = <1>;
			//remote-endpoint = <&gc5025_out>;
			data-lanes = <1 2>;
		};
	};

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

		dphy2_out: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&mipi_csi2_input>;
		};
	};
};

};

&mipi_csi2 {
status = "disabled";

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

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

		mipi_csi2_input: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&dphy2_out>;
			data-lanes = <1 2>;
		};
	};

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

		mipi_csi2_output: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&cif_mipi_in>;
			data-lanes = <1 2>;
		};
	};
};

};

//Rockchip Camera Interface
&rkcif {
status = "disabled";
};

//dvp接口摄像头
&rkcif_dvp {
status = "disabled";

port {
	/* Parallel bus endpoint */
	dvp_in_bcam: endpoint {
		// remote-endpoint = <&gc2145_out>;
		bus-width = <8>;
		vsync-active = <0>;
		hsync-active = <1>;
	};
};

};

//LVDS接口摄像头
&rkcif_mipi_lvds {
status = "disabled";

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

};

//摄像头内存管理
&rkcif_mmu {
status = "disabled";
};

//硬件图像处理器模块
&rkisp {
status = "okay";
};

//硬件图像处理器模块内存管理器
&rkisp_mmu {
status = "okay";
};

//图像处理接口
&rkisp_vir0 {
status = "okay";

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

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

};

&i2c4 {
/* i2c4 sda conflict with camera pwdn */
status = "okay";

/* 自动聚焦马达 */
dw9714: dw9714@0c {
    compatible = "dongwoon,dw9714";
    status = "okay";
    reg = <0x0c>;
    rockchip,camera-module-index = <0>;
    rockchip,vcm-start-current = <10>;
    rockchip,vcm-rated-current = <85>;
    rockchip,vcm-step-mode = <5>;
    rockchip,camera-module-facing = "back";
};

ov8858: ov8858@36 {
	status = "okay";
	compatible = "ovti,ov8858";
	reg = <0x36>;
	clocks = <&cru CLK_CIF_OUT>;
	clock-names = "xvclk";
	power-domains = <&power RK3568_PD_VI>;
	pinctrl-names = "default";
	pinctrl-0 = <&cif_clk>;
    reset-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;  /* 高电平有效 */
	pwdn-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
	power-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
	rockchip,camera-module-index = <0>;
	rockchip,camera-module-facing = "back";
    rockchip,camera-module-name = "HS5885-BNSM1018-V01"; /* 这两个跟镜头有关 在external下直接搜 配置错误会导致图像颜色不对 */
	rockchip,camera-module-lens-name = "default";
	lens-focus = <&dw9714>; /* 关联马达 */
	port {
		ov8858_out: endpoint {
			remote-endpoint = <&dphy0_in>;  /* 4-lanes要用dphy0,1和2只支持split mode */
			data-lanes = <1 2 3 4>;
		};
	};
};

};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions