// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2022 Wesion, Inc. All rights reserved.
 */

/dts-v1/;

#include "amlogic-t7.dtsi"

/ {
	model = "Khadas vim4";
	compatible = "khadas,vim4", "amlogic,a311d2", "amlogic,t7";

	aliases {
		serial0 = &uart_a;
	};

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x0 0x2 0x0>; /* 8 GB */
	};

	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		/* 3 MiB reserved for ARM Trusted Firmware (BL31) */
		secmon_reserved: secmon@5000000 {
			reg = <0x0 0x05000000 0x0 0x300000>;
			no-map;
		};

		/* 32 MiB reserved for ARM Trusted Firmware (BL32) */
		secmon_reserved_bl32: secmon@5300000 {
			reg = <0x0 0x05300000 0x0 0x2000000>;
			no-map;
		};
	};

	xtal: xtal-clk {
		compatible = "fixed-clock";
		clock-frequency = <24000000>;
		clock-output-names = "xtal";
		#clock-cells = <0>;
	};

};

&uart_a {
	status = "okay";
	clocks = <&xtal>, <&xtal>, <&xtal>;
	clock-names = "xtal", "pclk", "baud";
};