--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later or MIT
+/*
+ * WatchGuard XTM 330 (NC5AE7) Device Tree Source File
+ *
+ * Copyright (C) 2025 Pawel Dembicki <paweldembicki@gmail.com>
+ */
+
+/dts-v1/;
+
+/include/ "fsl/p2020si-pre.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "WatchGuard XTM 330 (NC5AE7)";
+ compatible = "watchguard,xtm330";
+
+ aliases {
+ ethernet0 = &enet0;
+ ethernet1 = &enet2;
+ serial0 = &serial0;
+ serial1 = &serial1;
+ pci0 = &pci2;
+ };
+
+ chosen {
+ bootargs-override = "console=ttyS0,115200";
+ };
+
+ memory {
+ device_type = "memory";
+ };
+
+ lbc: localbus@ffe05000 {
+ reg = <0 0xffe05000 0 0x1000>;
+
+ /* NOR and NAND Flashes */
+ ranges = < 0x0 0x0 0x0 0xefe00000 0x00200000
+ 0x1 0x0 0x0 0xffa00000 0x00040000 >;
+
+ nor@0,0 {
+ compatible = "cfi-flash";
+ reg = <0x0 0x0 0x200000>;
+ bank-width = <2>;
+ device-width = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "cfg0";
+ reg = <0x00000000 0x00020000>;
+ };
+
+ partition@20000 {
+ label = "cfg1";
+ reg = <0x00020000 0x00010000>;
+ };
+
+ partition@30000 {
+ label = "mfg-data";
+ reg = <0x00030000 0x00010000>;
+ };
+
+ partition@40000 {
+ label = "bootopt";
+ reg = <0x00040000 0x000b0000>;
+ };
+
+ partition@f0000 {
+ label = "u-boot-env";
+ reg = <0x000f0000 0x00010000>;
+ };
+
+ partition@100000 {
+ label = "u-boot";
+ reg = <0x00100000 0x00080000>;
+ };
+
+ partition@180000 {
+ label = "u-boot-failsafe";
+ reg = <0x00180000 0x00080000>;
+ };
+ };
+ };
+
+ nand@1,0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "fsl,p2020-fcm-nand", "fsl,elbc-fcm-nand";
+ reg = <0x1 0x0 0x40000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "dtb";
+ reg = <0x00000000 0x00020000>;
+ };
+
+ partition@20000 {
+ label = "kernel";
+ reg = <0x00020000 0x00500000>;
+ };
+
+ partition@520000 {
+ label = "ubi";
+ reg = <0x00520000 0x1fae0000>;
+ };
+ };
+ };
+ };
+
+ soc: soc@ffe00000 {
+ ranges = <0x0 0x0 0xffe00000 0x100000>;
+
+ gpio0: gpio-controller@fc00 {
+ usb-hub-reset-hog {
+ gpio-hog;
+ gpios = <12 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "usb-hub-reset";
+ };
+ };
+
+ i2c@3000 {
+ rtc@32 {
+ compatible = "ricoh,rs5c372a";
+ reg = <0x32>;
+ };
+
+ hwmon@2d {
+ compatible = "winbond,w83793";
+ reg = <0x2d>;
+ };
+
+ eeprom@54 {
+ compatible = "atmel,24c04";
+ reg = <0x54>;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ mac_addr_0: macaddr@0 {
+ compatible = "mac-base";
+ reg = <0x4e 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
+ };
+
+ usb@22000 {
+ phy_type = "ulpi";
+ dr_mode = "host";
+ };
+
+ mdio@24520 {
+ switch@10 {
+ compatible = "marvell,mv88e6085";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x10>;
+ dsa,member = <0 0>;
+
+ reset-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ label = "port0";
+
+ nvmem-cells = <&mac_addr_0 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@1 {
+ reg = <1>;
+ label = "port1";
+
+ nvmem-cells = <&mac_addr_0 1>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "port2";
+
+ nvmem-cells = <&mac_addr_0 2>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "port3";
+
+ nvmem-cells = <&mac_addr_0 3>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@4 {
+ reg = <4>;
+ label = "internal1";
+ };
+
+ port@5 {
+ reg = <5>;
+ phy-mode = "rgmii-id";
+ ethernet = <&enet2>;
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+
+ switch@11 {
+ compatible = "marvell,mv88e6085";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x11>;
+ dsa,member = <1 0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ label = "internal2";
+ };
+
+ port@1 {
+ reg = <1>;
+ label = "port4";
+
+ nvmem-cells = <&mac_addr_0 4>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "port5";
+
+ nvmem-cells = <&mac_addr_0 5>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "port6";
+
+ nvmem-cells = <&mac_addr_0 6>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@5 {
+ reg = <5>;
+ phy-mode = "rgmii-id";
+ ethernet = <&enet0>;
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
+
+ mdio@25520 {
+ status = "disabled";
+ };
+
+ mdio@26520 {
+ status = "disabled";
+ };
+
+ enet0: ethernet@24000 {
+ phy-connection-type = "rgmii-id";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+
+ enet1: ethernet@25000 {
+ status = "disabled";
+ };
+
+ enet2: ethernet@26000 {
+ phy-connection-type = "rgmii-id";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+
+ pci0: pcie@ffe08000 {
+ reg = <0 0xffe08000 0 0x1000>;
+ ranges = <0x2000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000
+ 0x1000000 0x0 0x00000000 0x0 0xffc20000 0x0 0x10000>;
+ status = "disabled";
+
+ pcie@0 {
+ ranges = < 0x2000000 0x0 0xc0000000
+ 0x2000000 0x0 0xc0000000
+ 0x0 0x20000000
+
+ 0x1000000 0x0 0x0
+ 0x1000000 0x0 0x0
+ 0x0 0x100000>;
+ };
+ };
+
+ pci1: pcie@ffe09000 {
+ reg = <0 0xffe09000 0 0x1000>;
+ ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
+ 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
+ status = "disabled";
+
+ pcie@0 {
+ ranges = < 0x2000000 0x0 0xa0000000
+ 0x2000000 0x0 0xa0000000
+ 0x0 0x20000000
+
+ 0x1000000 0x0 0x0
+ 0x1000000 0x0 0x0
+ 0x0 0x100000>;
+ };
+ };
+
+ pci2: pcie@ffe0a000 {
+ reg = <0 0xffe0a000 0 0x1000>;
+ ranges = <0x2000000 0x0 0x80000000 0x0 0x80000000 0x0 0x20000000
+ 0x1000000 0x0 0x00000000 0x0 0xffc00000 0x0 0x10000>;
+ pcie@0 {
+ ranges = < 0x2000000 0x0 0x80000000
+ 0x2000000 0x0 0x80000000
+ 0x0 0x20000000
+
+ 0x1000000 0x0 0x0
+ 0x1000000 0x0 0x0
+ 0x0 0x10000>;
+ };
+ };
+};
+
+/include/ "fsl/p2020si-post.dtsi"
DEVICE_MODEL := P2020RDB
DEVICE_DTS_DIR := $(DTS_DIR)/fsl
DEVICE_PACKAGES := kmod-hwmon-lm90 kmod-rtc-ds1307 \
- kmod-gpio-pca953x kmod-eeprom-at24
+ kmod-gpio-pca953x
BLOCKSIZE := 128k
KERNEL := kernel-bin | gzip | \
fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
pad-rootfs $$(BLOCKSIZE) | append-metadata
endef
TARGET_DEVICES += freescale_p2020rdb
+
+define Device/watchguard_xtm330
+ DEVICE_VENDOR := WatchGuard
+ DEVICE_MODEL := XTM 330
+ DEVICE_VARIANT := NC5AE7
+ DEVICE_PACKAGES := kmod-dsa-mv88e6xxx kmod-hwmon-w83793 \
+ kmod-rtc-rs5c372a
+ BLOCKSIZE := 128k
+ KERNEL = kernel-bin | fit none $(KDIR)/image-$$(DEVICE_DTS).dtb
+ KERNEL_NAME := zImage.la3000000
+ KERNEL_ENTRY := 0x3000000
+ KERNEL_LOADADDR := 0x3000000
+ IMAGES := sysupgrade.bin
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += watchguard_xtm330