// SPDX-License-Identifier: GPL-2.0-or-later or MIT

/include/ "fsl/p1010si-pre.dtsi"
#include "firebox-t1x.dtsi"

/ {
	model = "Watchguard Firebox T10";
	compatible = "watchguard,firebox-t10";

	ifc: ifc@ffe1e000 {
		reg = <0x0 0xffe1e000 0 0x2000>;

		/* NOR, NAND Flashes and CPLD on board */
		ranges = <0x0 0x0 0x0 0xee000000 0x02000000
			0x1 0x0 0x0 0xff800000 0x00010000
			0x3 0x0 0x0 0xffb00000 0x00000020>;

		nand@100000000 {
			compatible = "fsl,ifc-nand";
			reg = <0x1 0x0 0x10000>;

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

				/*
				 * Original partition layout:
				 * 0x000000000000-0x000000020000 : "NAND (RW) WG DTB Image"
				 * 0x000000020000-0x000000520000 : "NAND (RW) WG SYSA Kernel"
				 * 0x000000520000-0x000007f00000 : "NAND (RW) WG SYSA_CODE"
				 * 0x000007f00000-0x000008400000 : "NAND (RW) WG SYSB Kernel"
				 * 0x000008400000-0x000009c00000 : "NAND (RW) WG SYSB_CODE"
				 * 0x000009c00000-0x00000a100000 : "NAND (RW) WG SYSA2 Kernel"
				 * 0x00000a100000-0x000011ae0000 : "NAND (RW) WG SYSA_CODE2"
				 * 0x000011ae0000-0x000020000000 : "NAND (RW) WG SYSA_DATA"
				 */

				partition@0 {
					reg = <0x0 0x20000>;
					label = "wg-dtb";
					read-only;
				};

				partition@20000 {
					reg = <0x20000 0x500000>;
					label = "kernel";
				};

				partition@520000 {
					reg = <0x520000 0x79e0000>;
					label = "wg-sysa-rootfs";
					read-only;
				};

				partition@7f00000 {
					reg = <0x7f00000 0x500000>;
					label = "wg-sysb-kernel";
					read-only;
				};

				partition@8400000 {
					reg = <0x8400000 0x1800000>;
					label = "wg-sysb-rootfs";
					read-only;
				};

				partition@9c00000 {
					reg = <0x9c00000 0x500000>;
					label = "wg-sysa2-kernel";
					read-only;
				};

				partition@a100000 {
					reg = <0xa100000 0x79e0000>;
					label = "wg-sysa2-rootfs";
					read-only;
				};

				partition@11ae0000 {
					reg = <0x11ae0000 0xe520000>;
					label = "ubi";
				};
			};
		};
	};
};

/include/ "fsl/p1010si-post.dtsi"
