// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
 * Device Tree Source for the R-Car V4H White Hawk CPU and BreakOut boards
 *
 * Copyright (C) 2022 Renesas Electronics Corp.
 */

/dts-v1/;
#include "r8a779g0-white-hawk-cpu.dtsi"
#include "white-hawk-common.dtsi"

/ {
	model = "Renesas White Hawk CPU and Breakout boards based on r8a779g0";
	compatible = "renesas,white-hawk-breakout", "renesas,white-hawk-cpu", "renesas,r8a779g0";

	sn65dsi86_refclk2: clk-x16 {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <38400000>;
	};

	mini-dp-con2 {
		compatible = "dp-connector";
		label = "CN15";
		type = "mini";

		port {
			mini_dp_con_in2: endpoint {
				remote-endpoint = <&sn65dsi86_out2>;
			};
		};
	};
};

&dsc {
	status = "okay";
};

&dsi1 {
	status = "okay";

	ports {
		port@1 {
			dsi1_out: endpoint {
				remote-endpoint = <&sn65dsi86_in2>;
				data-lanes = <1 2 3 4>;
			};
		};
	};
};

&i2c4 {
	pinctrl-0 = <&i2c4_pins>;
	pinctrl-names = "default";

	status = "okay";
	clock-frequency = <400000>;

	bridge@2c {
		pinctrl-0 = <&irq1_pins>;
		pinctrl-names = "default";

		compatible = "ti,sn65dsi86";
		reg = <0x2c>;

		clocks = <&sn65dsi86_refclk2>;
		clock-names = "refclk";

		interrupts-extended = <&intc_ex 1 IRQ_TYPE_LEVEL_HIGH>;

		enable-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;

		vccio-supply = <&reg_1p8v>;
		vpll-supply = <&reg_1p8v>;
		vcca-supply = <&reg_1p2v>;
		vcc-supply = <&reg_1p2v>;

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

			port@0 {
				reg = <0>;
				sn65dsi86_in2: endpoint {
					remote-endpoint = <&dsi1_out>;
				};
			};

			port@1 {
				reg = <1>;
				sn65dsi86_out2: endpoint {
					remote-endpoint = <&mini_dp_con_in2>;
				};
			};
		};
	};
};

&pfc {
	i2c4_pins: i2c4 {
		groups = "i2c4";
		function = "i2c4";
	};

	irq1_pins: irq1 {
		groups = "intc_ex_irq1_a";
		function = "intc_ex";
	};
};