// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * dts file for AppliedMicro (APM) Merlin Board
 *
 * Copyright (C) 2015, Applied Micro Circuits Corporation
 */

/dts-v1/;

/include/ "apm-shadowcat.dtsi"

/ {
	model = "APM X-Gene Merlin board";
	compatible = "apm,merlin", "apm,xgene-shadowcat";

	chosen { };

	memory {
		device_type = "memory";
		reg = < 0x1 0x00000000 0x0 0x80000000 >;
	};

	gpio-keys {
		compatible = "gpio-keys";
		button {
			label = "POWER";
			linux,code = <116>;
			linux,input-type = <0x1>;
			interrupt-parent = <&sbgpio>;
			interrupts = <0x0 0x1>;
		};
	};

	poweroff_mbox: poweroff_mbox@10548000 {
		compatible = "syscon";
		reg = <0x0 0x10548000 0x0 0x30>;
	};

	poweroff: poweroff@10548010 {
		compatible = "syscon-poweroff";
		regmap = <&poweroff_mbox>;
		offset = <0x10>;
		mask = <0x1>;
	};
};

&serial0 {
	status = "okay";
};

&sata1 {
	status = "okay";
};

&sata2 {
	status = "okay";
};

&sata3 {
	status = "okay";
};

&sgenet0 {
	status = "okay";
};

&xgenet1 {
	status = "okay";
};

&mmc0 {
	status = "okay";
};

&i2c4 {
	rtc68: rtc@68 {
		compatible = "dallas,ds1337";
		reg = <0x68>;
		status = "okay";
	};
};

&mdio {
	sgenet0phy: phy@0 {
		reg = <0x0>;
	};
};