--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ compatible = "maginon,mc-1200ac", "mediatek,mt7621-soc";
+ model = "Maginon MC-1200AC";
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ aliases {
+ led-running = &led_blue_top;
+ led-boot = &led_red_top;
+ led-failsafe = &led_red_top;
+ led-upgrade = &led_red_top;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_blue_top: led_blue {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_red_top: led_red {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ label = "reset";
+ };
+
+ touch {
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ label = "touch";
+ };
+
+ pair {
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ label = "pair";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ nvmem-cells = <&eeprom_factory_8000>;
+ nvmem-cell-names = "eeprom";
+ };
+};
+
+&gmac0 {
+ nvmem-cells = <&macaddr_factory_e000>;
+ nvmem-cell-names = "mac-address";
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ nvmem-cells = <&macaddr_factory_e006>;
+ nvmem-cell-names = "mac-address";
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x00 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "Config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "Factory";
+ reg = <0x40000 0x10000>;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x400>;
+ };
+
+ eeprom_factory_8000: eeprom@8000 {
+ reg = <0x8000 0x4da8>;
+ };
+
+ macaddr_factory_e000: macaddr@e000 {
+ reg = <0xe000 0x6>;
+ };
+
+ macaddr_factory_e006: macaddr@e006 {
+ reg = <0xe006 0x6>;
+ };
+ };
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xf30000>;
+ compatible = "denx,fit";
+ };
+
+ partition@f80000 {
+ label = "vendor";
+ reg = <0xf80000 0x80000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt";
+ function = "gpio";
+ };
+};
endef
TARGET_DEVICES += linksys_re7000
+define Device/maginon_mc-1200ac
+ $(Device/dsa-migration)
+ DEVICE_VENDOR := Maginon
+ DEVICE_MODEL := MC-1200AC
+ DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap kmod-usb3 -uboot-envtools
+ KERNEL_LOADADDR := 0x82000000
+ KERNEL := kernel-bin | relocate-kernel $(loadaddr-y) | lzma | \
+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
+ IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
+ append-rootfs | pad-rootfs | check-size | append-metadata
+ IMAGE_SIZE := 15552k
+endef
+TARGET_DEVICES += maginon_mc-1200ac
+
define Device/mediatek_ap-mt7621a-v60
$(Device/dsa-migration)
IMAGE_SIZE := 7872k