// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
 */

/dts-v1/;
#include "rk3326-863-lp3-v10.dtsi"

/ {
	model = "Rockchip rk3326 863 avb board";
	compatible = "rockchip,rk3326-863-lp3-v10-avb", "rockchip,rk3326";
};

&firmware_android {
	compatible = "android,firmware";
	boot_devices = "ff390000.dwmmc,ff3b0000.nandc";
	vbmeta {
		compatible = "android,vbmeta";
		parts = "vbmeta,boot,system,vendor,dtbo";
	};
	fstab {
		compatible = "android,fstab";
		vendor {
			compatible = "android,vendor";
			dev = "/dev/block/by-name/vendor";
			type = "ext4";
			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
			fsmgr_flags = "wait,avb";
		};
	};
};

&i2c2 {
	status = "okay";

	gc0312@21 {
		status = "okay";
		compatible = "galaxycore,gc0312";
		reg = <0x21>;
		pinctrl-names = "default";
		pinctrl-0 = <&cif_clkout_m0>;

		clocks = <&cru SCLK_CIF_OUT>;
		clock-names = "xvclk";

		avdd-supply = <&vcc2v8_dvp>;
		dovdd-supply = <&vcc1v8_dvp>;
		dvdd-supply = <&vcc1v8_dvp>;

		pwdn-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;

		port {
			gc0312_out: endpoint {
				remote-endpoint = <&dvp_in_fcam>;
			};
		};
	};

	gc2145@3c {
		status = "okay";
		compatible = "galaxycore,gc2145";
		reg = <0x3c>;
		pinctrl-names = "default";
		pinctrl-0 = <&cif_clkout_m0>;

		clocks = <&cru SCLK_CIF_OUT>;
		clock-names = "xvclk";

		avdd-supply = <&vcc2v8_dvp>;
		dovdd-supply = <&vcc1v8_dvp>;
		dvdd-supply = <&vcc1v8_dvp>;

		pwdn-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;

		port {
			gc2145_out: endpoint {
				remote-endpoint = <&dvp_in_bcam>;
			};
		};
	};
};

&isp_mmu {
	status = "okay";
};

&rkisp1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&cif_clkout_m0 &dvp_d0d1_m0 &dvp_d2d9_m0 &dvp_d10d11_m0>;

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

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

			dvp_in_fcam: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&gc0312_out>;
			};

			dvp_in_bcam: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&gc2145_out>;
			};
		};
	};
};
