Rock 3A Camera support

Just for fun, I wasn’t sure if it was possible to change the mode with v4l2-ctl, so i added a property to switch mode with overlay (or decompiling dtb and changing mode and then recompiling) without recompiling the kernel.

Maybe someone finds this useful.

Property is camera-mode:

&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>;
		camera-mode = <0>; /* 0 - full, 1 - 192x01080@30, 2, 3 - 640x480@60 */

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

add_ov5647_prop_mode.patch.zip (596 Bytes)