// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <dario.binacchi@amarulasolutions.com>
 * Copyright (C) 2026 Engicam srl
 *
 * Ampire AM-1280800W8TZQW-T00H 10.1" 1280x800 LVDS panel. Its touchscreen
 * controller is connected over USB.
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/clock/st,stm32mp25-rcc.h>

&{/} {
	panel-lvds {
		compatible = "ampire,am-1280800w8tzqw-t00h";
		backlight = <&backlight>;
		power-supply = <&reg_3v3>;

		port {
			panel_in: endpoint {
				remote-endpoint = <&lvds_out>;
			};
		};
	};
};

&framebuffer {
	clocks = <&rcc CK_BUS_LTDC>, <&rcc CK_KER_LTDC>,
		 <&rcc CK_BUS_LVDS>, <&rcc CK_KER_LVDSPHY>;
};

&ltdc {
	status = "okay";

	port {
		ltdc_out: endpoint {
			remote-endpoint = <&lvds_in>;
		};
	};
};

&lvds {
	status = "okay";

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

		port@0 {
			reg = <0>;

			lvds_in: endpoint {
				remote-endpoint = <&ltdc_out>;
			};
		};

		port@1 {
			reg = <1>;

			lvds_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};
};