// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
 * Copyright (c) Toradex
 *
 * VGA output connected to the Colibri parallel RGB LCD interface through a
 * non-programmable video DAC with a DVI connector.
 *
 * The VGA output is available on multiple carrier boards (including Iris,
 * Eval, Aster) without VESA DDC I2C signals.
 */

/dts-v1/;
/plugin/;

&{/} {
	vga-encoder {
		compatible = "dumb-vga-dac";

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

			port@0 {
				reg = <0>;

				vga_enc_in: endpoint {
					remote-endpoint = <&lcdif_out>;
				};
			};

			port@1 {
				reg = <1>;

				vga_enc_out: endpoint {
					remote-endpoint = <&dvi_connector_in>;
				};
			};
		};
	};

	dvi-connector {
		compatible = "dvi-connector";
		analog;

		port {
			dvi_connector_in: endpoint {
				remote-endpoint = <&vga_enc_out>;
			};
		};
	};
};

&lcdif {
	status = "okay";
};

&lcdif_out {
	remote-endpoint = <&vga_enc_in>;
};