// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/dts-v1/;

#include "en751627.dtsi"

/ {
	model = "Zyxel EX3301-T0";
	compatible = "zyxel,ex3301-t0", "econet,en751627";

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	chosen {
		stdout-path = "/serial@1fbf0000:115200";
	};
};

&nand {
	status = "okay";
	econet,bmt;

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0all {
			label = "all_of_flash";
			reg = <0x0 0x8000000>;
			read-only;
		};

		partition@0 {
			label = "bootloader";
			reg = <0x0 0x40000>;
			read-only;
		};

		partition@40000 {
			label = "romfile";
			reg = <0x40000 0x40000>;
			read-only;
		};

		partition@80000 {
			label = "tclinux";
			reg = <0x80000 0x2800000>;
			read-only;
			econet,enable-remap;
		};

		/* Nested inside of tclinux */
		partition@480000 {
			label = "rootfs";
			reg = <0x480000 0x2400000>;
			linux,rootfs;
			read-only;
		};

		partition@2880000 {
			label = "tclinux_alt";
			reg = <0x2880000 0x2620000>;
		};

		partition@4ea0000 {
			label = "wwan";
			reg = <0x4ea0000 0x100000>;
		};

		partition@4fa0000 {
			label = "factory_data";
			reg = <0x4fa0000 0x400000>;
		};

		partition@53a0000 {
			label = "rom-d";
			reg = <0x53a0000 0x100000>;
		};

		partition@54a0000 {
			label = "misc";
			reg = <0x54a0000 0x2000000>;
		};

		factory: partition@74a0000 {
			label = "factory";
			reg = <0x74a0000 0x80000>;
		};

		partition@7520000 {
			label = "reservearea";
			reg = <0x7520000 0xc0000>;
		};
	};
};

&pcie0 {
	status = "okay";
};
&slot0 {
	status = "okay";

	wifi@0,0 {
		compatible = "mediatek,mt76";
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x0000>;
		big-endian;
	};
};

&pcie1 {
	status = "okay";

	/* Slot 1 is a second link to the same wifi chip */
};
