// SPDX-License-Identifier: BSD-3-Clause
/*
 * Copyright (c) 2022, Linaro Ltd.
 */

/dts-v1/;

#include "qrb5165-rb5.dts"

&camcc {
	status = "okay";
};

&camss {
	vdda-phy-supply = <&vreg_l5a_0p88>;
	vdda-pll-supply = <&vreg_l9a_1p2>;
	status = "okay";

	ports {
		/* The port index denotes CSIPHY id i.e. csiphy2 */
		port@2 {
			csiphy2_ep: endpoint {
				clock-lanes = <7>;
				data-lanes = <0 1 2 3>;
				remote-endpoint = <&imx577_ep>;
			};
		};
	};
};

&cci1 {
	status = "okay";
};

&cci1_i2c0 {
	camera@1a {
		compatible = "sony,imx577";
		reg = <0x1a>;

		reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>;
		pinctrl-names = "default", "suspend";
		pinctrl-0 = <&cam2_default>;
		pinctrl-1 = <&cam2_suspend>;

		clocks = <&camcc CAM_CC_MCLK2_CLK>;
		assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>;
		assigned-clock-rates = <24000000>;

		dovdd-supply  = <&vreg_l7f_1p8>;
		avdd-supply = <&vdc_5v>;
		dvdd-supply = <&vdc_5v>;

		port {
			imx577_ep: endpoint {
				clock-lanes = <1>;
				link-frequencies = /bits/ 64 <600000000>;
				data-lanes = <1 2 3 4>;
				remote-endpoint = <&csiphy2_ep>;
			};
		};
	};
};