ASR_BASE
Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/target/linux/ramips/dts/mt7620a.dtsi b/target/linux/ramips/dts/mt7620a.dtsi
new file mode 100644
index 0000000..ebcb659
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a.dtsi
@@ -0,0 +1,605 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ralink,mt7620a-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "mips,mips24KEc";
+ reg = <0>;
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ aliases {
+ spi0 = &spi0;
+ spi1 = &spi1;
+ serial0 = &uartlite;
+ };
+
+ palmbus: palmbus@10000000 {
+ compatible = "palmbus";
+ reg = <0x10000000 0x200000>;
+ ranges = <0x0 0x10000000 0x1FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "ralink,mt7620a-sysc", "ralink,rt3050-sysc", "syscon";
+ reg = <0x0 0x100>;
+ };
+
+ timer: timer@100 {
+ compatible = "ralink,mt7620a-timer", "ralink,rt2880-timer";
+ reg = <0x100 0x20>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ watchdog: watchdog@120 {
+ compatible = "ralink,mt7620a-wdt", "ralink,rt2880-wdt";
+ reg = <0x120 0x10>;
+
+ resets = <&rstctrl 8>;
+ reset-names = "wdt";
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ intc: intc@200 {
+ compatible = "ralink,mt7620a-intc", "ralink,rt2880-intc";
+ reg = <0x200 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "intc";
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ };
+
+ memc: memc@300 {
+ compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc";
+ reg = <0x300 0x100>;
+
+ resets = <&rstctrl 20>;
+ reset-names = "mc";
+
+ interrupt-parent = <&intc>;
+ interrupts = <3>;
+ };
+
+ uart: uart@500 {
+ compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0x500 0x100>;
+
+ resets = <&rstctrl 12>;
+ reset-names = "uart";
+
+ interrupt-parent = <&intc>;
+ interrupts = <5>;
+
+ reg-shift = <2>;
+
+ status = "disabled";
+ };
+
+ gpio0: gpio@600 {
+ compatible = "ralink,mt7620a-gpio", "ralink,rt2880-gpio";
+ reg = <0x600 0x34>;
+
+ resets = <&rstctrl 13>;
+ reset-names = "pio";
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <0>;
+ ralink,num-gpios = <24>;
+ ralink,register-map = [ 00 04 08 0c
+ 20 24 28 2c
+ 30 34 ];
+ };
+
+ gpio1: gpio@638 {
+ compatible = "ralink,mt7620a-gpio", "ralink,rt2880-gpio";
+ reg = <0x638 0x24>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <24>;
+ ralink,num-gpios = <16>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio2: gpio@660 {
+ compatible = "ralink,mt7620a-gpio", "ralink,rt2880-gpio";
+ reg = <0x660 0x24>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <40>;
+ ralink,num-gpios = <32>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio3: gpio@688 {
+ compatible = "ralink,mt7620a-gpio", "ralink,rt2880-gpio";
+ reg = <0x688 0x24>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <72>;
+ ralink,num-gpios = <1>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ i2c: i2c@900 {
+ compatible = "ralink,rt2880-i2c";
+ reg = <0x900 0x100>;
+
+ resets = <&rstctrl 16>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ };
+
+ i2s: i2s@a00 {
+ compatible = "mediatek,mt7620-i2s";
+ reg = <0xa00 0x100>;
+
+ resets = <&rstctrl 17>;
+ reset-names = "i2s";
+
+ interrupt-parent = <&intc>;
+ interrupts = <10>;
+
+ txdma-req = <2>;
+ rxdma-req = <3>;
+
+ dmas = <&gdma 4>,
+ <&gdma 6>;
+ dma-names = "tx", "rx";
+
+ status = "disabled";
+ };
+
+ spi0: spi@b00 {
+ compatible = "ralink,mt7620a-spi", "ralink,rt2880-spi";
+ reg = <0xb00 0x40>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>;
+ };
+
+ spi1: spi@b40 {
+ compatible = "ralink,rt2880-spi";
+ reg = <0xb40 0x60>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_cs1>;
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0xc00 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "uartl";
+
+ interrupt-parent = <&intc>;
+ interrupts = <12>;
+
+ reg-shift = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uartlite_pins>;
+ };
+
+ systick: systick@d00 {
+ compatible = "ralink,mt7620a-systick", "ralink,cevt-systick";
+ reg = <0xd00 0x10>;
+
+ resets = <&rstctrl 28>;
+ reset-names = "intc";
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <7>;
+ };
+
+ pcm: pcm@2000 {
+ compatible = "ralink,mt7620a-pcm";
+ reg = <0x2000 0x800>;
+
+ resets = <&rstctrl 11>;
+ reset-names = "pcm";
+
+ interrupt-parent = <&intc>;
+ interrupts = <4>;
+
+ status = "disabled";
+ };
+
+ gdma: gdma@2800 {
+ compatible = "ralink,mt7620a-gdma", "ralink,rt3883-gdma";
+ reg = <0x2800 0x800>;
+
+ resets = <&rstctrl 14>;
+ reset-names = "dma";
+
+ interrupt-parent = <&intc>;
+ interrupts = <7>;
+
+ #dma-cells = <1>;
+ #dma-channels = <16>;
+ #dma-requests = <16>;
+
+ status = "disabled";
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ };
+
+ pcm_i2s_pins: pcm_i2s {
+ pcm_i2s {
+ groups = "uartf";
+ function = "pcm i2s";
+ };
+ };
+
+ uartf_gpio_pins: uartf_gpio {
+ uartf_gpio {
+ groups = "uartf";
+ function = "gpio uartf";
+ };
+ };
+
+ gpio_i2s_pins: gpio_i2s {
+ gpio_i2s {
+ groups = "uartf";
+ function = "gpio i2s";
+ };
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ spi_cs1: spi1 {
+ spi1 {
+ groups = "spi refclk";
+ function = "spi refclk";
+ };
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ uartlite_pins: uartlite {
+ uart {
+ groups = "uartlite";
+ function = "uartlite";
+ };
+ };
+
+ mdio_pins: mdio {
+ mdio {
+ groups = "mdio";
+ function = "mdio";
+ };
+ };
+
+ mdio_refclk_pins: mdio_refclk {
+ mdio_refclk {
+ groups = "mdio";
+ function = "refclk";
+ };
+ };
+
+ ephy_pins: ephy {
+ ephy {
+ groups = "ephy";
+ function = "ephy";
+ };
+ };
+
+ wled_pins: wled {
+ wled {
+ groups = "wled";
+ function = "wled";
+ };
+ };
+
+ rgmii1_pins: rgmii1 {
+ rgmii1 {
+ groups = "rgmii1";
+ function = "rgmii1";
+ };
+ };
+
+ rgmii2_pins: rgmii2 {
+ rgmii2 {
+ groups = "rgmii2";
+ function = "rgmii2";
+ };
+ };
+
+ pcie_pins: pcie {
+ pcie {
+ groups = "pcie";
+ function = "pcie rst";
+ };
+ };
+
+ pa_pins: pa {
+ pa {
+ groups = "pa";
+ function = "pa";
+ };
+ };
+
+ sdhci_pins: sdhci {
+ sdhci {
+ groups = "nd_sd";
+ function = "sd";
+ };
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,mt7620a-reset", "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ usbphy: usbphy {
+ compatible = "mediatek,mt7620-usbphy";
+ #phy-cells = <0>;
+
+ ralink,sysctl = <&sysc>;
+ resets = <&rstctrl 22 &rstctrl 25>;
+ reset-names = "host", "device";
+
+ clocks = <&clkctrl 22 &clkctrl 25>;
+ clock-names = "host", "device";
+ };
+
+ ethernet: ethernet@10100000 {
+ compatible = "mediatek,mt7620-eth";
+ reg = <0x10100000 0x10000>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <5>;
+
+ resets = <&rstctrl 21 &rstctrl 23>;
+ reset-names = "fe", "esw";
+
+ mediatek,switch = <&gsw>;
+
+ port@4 {
+ compatible = "mediatek,mt7620a-gsw-port", "mediatek,eth-port";
+ reg = <4>;
+
+ status = "disabled";
+ };
+
+ port@5 {
+ compatible = "mediatek,mt7620a-gsw-port", "mediatek,eth-port";
+ reg = <5>;
+
+ status = "disabled";
+ };
+
+ mdio-bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ gsw: gsw@10110000 {
+ compatible = "mediatek,mt7620-gsw";
+ reg = <0x10110000 0x8000>;
+
+ resets = <&rstctrl 23>;
+ reset-names = "esw";
+
+ interrupt-parent = <&intc>;
+ interrupts = <17>;
+ };
+
+ sdhci: sdhci@10130000 {
+ compatible = "ralink,mt7620-sdhci";
+ reg = <0x10130000 0x4000>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <14>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdhci_pins>;
+
+ status = "disabled";
+ };
+
+ ehci: ehci@101c0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ehci";
+ reg = <0x101c0000 0x1000>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ status = "disabled";
+
+ ehci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ ohci: ohci@101c1000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ohci";
+ reg = <0x101c1000 0x1000>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ status = "disabled";
+
+ ohci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ pcie: pcie@10140000 {
+ compatible = "mediatek,mt7620-pci";
+ reg = <0x10140000 0x100
+ 0x10142000 0x100>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ resets = <&rstctrl 26>;
+ reset-names = "pcie0";
+
+ clocks = <&clkctrl 26>;
+ clock-names = "pcie0";
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <4>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_pins>;
+
+ device_type = "pci";
+
+ bus-range = <0 255>;
+ ranges = <
+ 0x02000000 0 0x00000000 0x20000000 0 0x10000000 /* pci memory */
+ 0x01000000 0 0x00000000 0x10160000 0 0x00010000 /* io space */
+ >;
+
+ status = "disabled";
+
+ pcie0: pcie@0,0 {
+ reg = <0x0000 0 0 0 0>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ device_type = "pci";
+
+ ranges;
+ };
+ };
+
+ wmac: wmac@10180000 {
+ compatible = "ralink,rt7620-wmac", "ralink,rt2880-wmac";
+ reg = <0x10180000 0x40000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <6>;
+
+ ralink,eeprom = "soc_wmac.eeprom";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts
new file mode 100644
index 0000000..ba251c2
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts
@@ -0,0 +1,113 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "aigale,ai-br100", "ralink,mt7620a-soc";
+ model = "Aigale Ai-BR100";
+
+ aliases {
+ led-boot = &led_wlan;
+ led-failsafe = &led_wlan;
+ led-running = &led_wlan;
+ led-upgrade = &led_wlan;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "blue:wan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wlan: wlan {
+ label = "blue:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "u-boot-env";
+ reg = <0x20000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x40000 0x7c0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts
new file mode 100644
index 0000000..752a940
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts
@@ -0,0 +1,150 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (C) 2018 Piotr Dymacz <pepe2k@gmail.com>
+ * All rights reserved.
+ */
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "alfa-network,ac1200rm", "ralink,mt7620a-soc";
+ model = "ALFA Network AC1200RM";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "nd_sd", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x1000>;
+ };
+
+ partition@31000 {
+ label = "config";
+ reg = <0x31000 0xf000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts
new file mode 100644
index 0000000..0991ae8
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts
@@ -0,0 +1,211 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "alfa-network,r36m-e4g", "ralink,mt7620a-soc";
+ model = "ALFA Network R36M-E4G";
+
+ aliases {
+ label-mac-device = &wmac;
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ chosen {
+ bootargs = "console=ttyS1,115200";
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ modem-enable {
+ gpio-export,name = "modem-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ modem-rf-enable {
+ gpio-export,name = "modem-rf-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ rtc-enable {
+ gpio-export,name = "rtc-enable";
+ gpio-export,output = <1>;
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ sim-select {
+ gpio-export,name = "sim-select";
+ gpio-export,output = <0>;
+ gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ sim1-detect {
+ gpio-export,name = "sim1-detect";
+ gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ sim2-detect {
+ gpio-export,name = "sim2-detect";
+ gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ 4g {
+ label = "orange:4g";
+ gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ led_system: system {
+ label = "green:system";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ sim1 {
+ label = "green:sim1";
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ sim2 {
+ label = "green:sim2";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "orange:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0radio";
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "ephy", "pcie", "rgmii1", "wled";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x1000>;
+ };
+
+ partition@31000 {
+ label = "config";
+ reg = <0x31000 0xf000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&uart {
+ status = "okay";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts
new file mode 100644
index 0000000..ca58d78
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts
@@ -0,0 +1,180 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "alfa-network,tube-e4g", "ralink,mt7620a-soc";
+ model = "ALFA Network Tube-E4G";
+
+ aliases {
+ label-mac-device = ðernet;
+ led-boot = &power;
+ led-failsafe = &power;
+ led-running = &power;
+ led-upgrade = &power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ modem-enable {
+ gpio-export,name = "modem-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ modem-rf-enable {
+ gpio-export,name = "modem-rf-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ sim-select {
+ gpio-export,name = "sim-select";
+ gpio-export,output = <0>;
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+
+ sim1-detect {
+ gpio-export,name = "sim1-detect";
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ sim2-detect {
+ gpio-export,name = "sim2-detect";
+ gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ 4g {
+ label = "green:4g";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ power: power {
+ label = "green:power";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ sim1 {
+ label = "green:sim1";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ sim2 {
+ label = "green:sim2";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pcie {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "ephy", "nd_sd", "pcie", "uartf";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x1000>;
+ };
+
+ partition@31000 {
+ label = "config";
+ reg = <0x31000 0xf000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7620a_asus_rp-n53.dts b/target/linux/ramips/dts/mt7620a_asus_rp-n53.dts
new file mode 100644
index 0000000..4c72c64
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_asus_rp-n53.dts
@@ -0,0 +1,172 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rp-n53", "ralink,mt7620a-soc";
+ model = "Asus RP-N53";
+
+ keys {
+ compatible = "gpio-keys";
+
+ touch {
+ label = "touch";
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ audio {
+ label = "audio";
+ gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ linux,code = <BTN_1>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ backlight {
+ label = "white:back";
+ gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi0 {
+ label = "blue:5g3";
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi1 {
+ label = "blue:5g2";
+ gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2 {
+ label = "blue:5g1";
+ gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi3 {
+ label = "blue:wifi";
+ gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi4 {
+ label = "blue:2g1";
+ gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi5 {
+ label = "blue:2g2";
+ gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi6 {
+ label = "blue:2g3";
+ gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+&i2s {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcm_i2s_pins>;
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&pcm {
+ status = "okay";
+};
+
+&gdma {
+ status = "okay";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ gpio {
+ groups = "mdio", "rgmii1";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci1814,5592";
+ reg = <0x0000 0 0 0 0>;
+ ralink,2ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts b/target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts
new file mode 100644
index 0000000..0710b25
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts
@@ -0,0 +1,13 @@
+#include "mt7620a_asus_rt-ac5x.dtsi"
+
+/ {
+ compatible = "asus,rt-ac51u", "ralink,mt7620a-soc";
+ model = "Asus RT-AC51U";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts b/target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts
new file mode 100644
index 0000000..acc6080
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_asus_rt-ac5x.dtsi"
+
+/ {
+ compatible = "asus,rt-ac54u", "ralink,mt7620a-soc";
+ model = "Asus RT-AC54U";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
new file mode 100644
index 0000000..423b4ed
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
@@ -0,0 +1,136 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = ðernet;
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wifi2g {
+ label = "blue:wifi2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&gpio0 {
+ enable-leds {
+ gpio-hog;
+ line-name = "enable-leds";
+ output-low;
+ gpios = <10 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "wled", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts
new file mode 100644
index 0000000..fc2b74d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "bdcom,wap2100-sk", "ralink,mt7620a-soc";
+ model = "BDCOM WAP2100-SK";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_power: wps {
+ label = "green:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf70000>;
+ };
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ default {
+ groups = "spi refclk", "uartf", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts
new file mode 100644
index 0000000..93a09f9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts
@@ -0,0 +1,175 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "buffalo,whr-1166d", "ralink,mt7620a-soc";
+ model = "Buffalo WHR-1166D";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "red:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_green: power2 {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2 {
+ label = "orange:wifi";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "green:internet";
+ gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
+ };
+
+ router {
+ label = "orange:router";
+ gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
+ };
+
+ router2 {
+ label = "green:router";
+ gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ bridge {
+ label = "bridge";
+ gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "wled", "nd_sd";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii-rxid";
+ };
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci0,0";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
new file mode 100644
index 0000000..95152bc
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
@@ -0,0 +1,151 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "buffalo,whr-300hp2", "ralink,mt7620a-soc";
+ model = "Buffalo WHR-300HP2";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "red:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_green: power2 {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2 {
+ label = "orange:wifi";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "green:internet";
+ gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
+ };
+
+ router {
+ label = "green:router";
+ gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
+ };
+
+ router2 {
+ label = "orange:router";
+ gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ bridge {
+ label = "bridge";
+ gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts
new file mode 100644
index 0000000..2269677
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts
@@ -0,0 +1,161 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "buffalo,whr-600d", "ralink,mt7620a-soc";
+ model = "Buffalo WHR-600D";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "red:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_green: power2 {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2 {
+ label = "orange:wifi";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "green:internet";
+ gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
+ };
+
+ router {
+ label = "green:router";
+ gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
+ };
+
+ router2 {
+ label = "orange:router";
+ gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ bridge {
+ label = "bridge";
+ gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci1814,5592";
+ reg = <0x0000 0 0 0 0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
new file mode 100644
index 0000000..7040744
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
@@ -0,0 +1,159 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = ðernet;
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_green: power_green {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ power_orange {
+ label = "orange:power";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ factory5g: partition@50000 {
+ label = "factory5g";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "Wolf_Config";
+ reg = <0x60000 0x10000>;
+ read-only;
+ };
+
+ partition@70000 {
+ label = "MyDlink";
+ reg = <0x70000 0x80000>;
+ read-only;
+ };
+
+ partition@f0000 {
+ label = "Jffs2";
+ reg = <0xf0000 0x80000>;
+ read-only;
+ };
+
+ partition@170000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x170000 0x690000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "ephy";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&wmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+
+ ralink,mtd-eeprom = <&factory 0x0>;
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&factory 0x28>;
+ mtd-mac-address-increment = <2>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
new file mode 100644
index 0000000..0c9f568
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
@@ -0,0 +1,178 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dch-m225", "ralink,mt7620a-soc";
+ model = "D-Link DCH-M225";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ status {
+ label = "red:status";
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "Audio-I2S";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&dailink0_master>;
+ simple-audio-card,frame-master = <&dailink0_master>;
+ simple-audio-card,widgets =
+ "Headphone", "Headphones";
+ simple-audio-card,routing =
+ "Headphones", "HP_L",
+ "Headphones", "HP_R";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,hp-det-gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+
+ dailink0_master: simple-audio-card,codec {
+ sound-dai = <&codec>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+
+ codec: wm8960@1a {
+ #sound-dai-cells = <0>;
+ compatible = "wlf,wm8960";
+ reg = <0x1a>;
+
+ wlf,shared-lrclk;
+ };
+};
+
+&i2s {
+ #sound-dai-cells = <0>;
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mdio_refclk_pins>;
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x4000>;
+ read-only;
+ };
+
+ factory: partition@34000 {
+ label = "factory";
+ reg = <0x34000 0x4000>;
+ read-only;
+ };
+
+ nvram: partition@38000 {
+ label = "nvram";
+ reg = <0x38000 0x8000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "upgrade_rec";
+ reg = <0x50000 0x100000>;
+ read-only;
+ };
+
+ partition@150000 {
+ compatible = "seama";
+ label = "firmware";
+ reg = <0x150000 0x6b0000>;
+ };
+ };
+ };
+};
+
+&gdma {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "rgmii1";
+ function = "gpio";
+ };
+
+ gpio_i2s {
+ groups = "uartf";
+ function = "gpio i2s";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
new file mode 100644
index 0000000..774d90c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
@@ -0,0 +1,128 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "dlink,dir-510l", "ralink,mt7620a-soc";
+ model = "D-Link DIR-510L";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ chosen {
+ bootargs = "console=ttyS1,57600";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ status-red {
+ label = "red:status";
+ gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+ðernet {
+ mediatek,portmap = "llllw";
+};
+
+&uart {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ label = "recovery";
+ reg = <0x10000 0x200000>;
+ read-only;
+ };
+
+ partition@210000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x210000 0xde0000>;
+ };
+
+ config: partition@ff0000 {
+ label = "config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76x0e@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mtd-mac-address = <&config 0xe490>;
+ mtd-mac-address-increment = <(2)>;
+ mediatek,mtd-eeprom = <&config 0xe05d>;
+ };
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
new file mode 100644
index 0000000..12173d1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
@@ -0,0 +1,6 @@
+#include "mt7620a_cameo_810.dtsi"
+
+/ {
+ compatible = "dlink,dir-810l", "ralink,mt7620a-soc";
+ model = "D-Link DIR-810L";
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
new file mode 100644
index 0000000..b86ab14
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
@@ -0,0 +1,190 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dwr-118-a1", "ralink,mt7620a-soc";
+ model = "D-Link DWR-118 A1";
+
+ aliases {
+ led-boot = &led_internet;
+ led-failsafe = &led_internet;
+ led-upgrade = &led_internet;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ led_internet: internet {
+ label = "green:internet";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <0>;
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0xfe0000>;
+ };
+
+ config: partition@ff0000 {
+ label = "config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&state_default {
+ default {
+ groups = "ephy", "uartf", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mtd-mac-address = <&config 0xe496>;
+ mtd-mac-address-increment = <(2)>;
+ mediatek,mtd-eeprom = <&config 0xe083>;
+
+ led {
+ led-sources = <0>;
+ led-active-low;
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ port@4 {
+ status = "okay";
+ phy-handle = <&phy4>;
+ phy-mode = "rgmii";
+ };
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii-rxid";
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii-rxid";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
new file mode 100644
index 0000000..b0dd31c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
@@ -0,0 +1,178 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dwr-118-a2", "ralink,mt7620a-soc";
+ model = "D-Link DWR-118 A2";
+
+ aliases {
+ led-boot = &led_internet;
+ led-failsafe = &led_internet;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ led_internet: internet {
+ label = "green:internet";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0xfe0000>;
+ };
+
+ config: partition@ff0000 {
+ label = "config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&state_default {
+ default {
+ groups = "ephy", "uartf", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&config 0xe4a8>;
+ mtd-mac-address-increment = <(2)>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ mediatek,portmap = "wllll";
+
+ port@4 {
+ status = "okay";
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii-rxid";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <2>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
new file mode 100644
index 0000000..4284c61
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
@@ -0,0 +1,188 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "dlink,dwr-960", "ralink,mt7620a-soc";
+ model = "D-Link DWR-960";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ sms {
+ label = "green:sms";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ signal_green {
+ label = "green:signal";
+ gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ signal_red {
+ label = "red:signal";
+ gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ 4g {
+ label = "green:4g";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii2_pins &mdio_pins>;
+
+ mediatek,portmap = "wllll";
+
+ port@5 {
+ status = "okay";
+ phy-mode = "rgmii-txid";
+ phy-handle = <&phy7>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy7: ethernet-phy@7 {
+ reg = <7>;
+ phy-mode = "rgmii-id";
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0xfe0000>;
+ };
+
+ config: partition@ff0000 {
+ label = "config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mediatek,mtd-eeprom = <&config 0xe08e>;
+ mtd-mac-address = <&config 0xe50e>;
+ mtd-mac-address-increment = <2>;
+ };
+};
+
+&state_default {
+ default {
+ groups = "i2c", "wled", "spi refclk", "uartf", "ephy";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts
new file mode 100644
index 0000000..ba1a2be
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts
@@ -0,0 +1,159 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dovado,tiny-ac", "ralink,mt7620a-soc";
+ model = "Dovado Tiny AC";
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wifi {
+ label = "orange:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usbpower {
+ gpio-export,name = "usbpower";
+ gpio-export,output = <1>;
+ gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mediatek,portmap = "llllw";
+
+ port@4 {
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&phy4>;
+ };
+
+ port@5 {
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&phy5>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "uartf", "nd_sd", "wled";
+ function = "gpio";
+ };
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
new file mode 100644
index 0000000..03a4c96
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
@@ -0,0 +1,206 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2016 Rohan Murch <rohan.murch@gmail.com>
+ * Copyright (C) 2016 Hans Ulli Kroll <ulli.kroll@googlemail.com>
+ * Copyright (C) 2017 James McKenzie <openwrt@madingley.org>
+ */
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
+
+/ {
+ compatible = "edimax,br-6478ac-v2", "ralink,mt7620a-soc";
+ model = "Edimax BR-6478AC v2";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "white:power";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+ usb-power {
+ gpio-export,name="usb-power";
+ gpio-export,output=<1>;
+ gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "cimage";
+ reg = <0x50000 0x20000>;
+ read-only;
+ };
+
+ partition@70000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,offset = <FW_EDIMAX_OFFSET>;
+ openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
+ label = "firmware";
+ reg = <0x00070000 0x00790000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "nd_sd";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ phy1: ethernet-phy@1 {
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ phy2: ethernet-phy@2 {
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ phy3: ethernet-phy@3 {
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy1f: ethernet-phy@1f {
+ reg = <0x1f>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <12>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ mediatek,2ghz = <0>;
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7476rpc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7476rpc.dts
new file mode 100644
index 0000000..ebab7e4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7476rpc.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_edimax_ew-747x.dtsi"
+
+/ {
+ compatible = "edimax,ew-7476rpc", "ralink,mt7620a-soc";
+ model = "Edimax EW-7476RPC";
+};
diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478ac.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478ac.dts
new file mode 100644
index 0000000..a0fa2e3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478ac.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_edimax_ew-747x.dtsi"
+
+/ {
+ compatible = "edimax,ew-7478ac", "ralink,mt7620a-soc";
+ model = "Edimax EW-7478AC";
+};
diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts
new file mode 100644
index 0000000..986b047
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts
@@ -0,0 +1,198 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
+
+/ {
+ compatible = "edimax,ew-7478apc", "ralink,mt7620a-soc";
+ model = "Edimax EW-7478APC";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "white:power";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+
+ enable_usb_power {
+ gpio-hog;
+ line-name = "enable USB power";
+ gpios = <5 GPIO_ACTIVE_HIGH>;
+ output-high;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "cimage";
+ reg = <0x50000 0x20000>;
+ read-only;
+ };
+
+ partition@70000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,offset = <FW_EDIMAX_OFFSET>;
+ openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
+ label = "firmware";
+ reg = <0x00070000 0x00790000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "nd_sd";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ phy1: ethernet-phy@1 {
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ phy2: ethernet-phy@2 {
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ phy3: ethernet-phy@3 {
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy1f: ethernet-phy@1f {
+ reg = <0x1f>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <12>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ mediatek,2ghz = <0>;
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi
new file mode 100644
index 0000000..6060fd9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi
@@ -0,0 +1,220 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
+
+/ {
+ compatible = "ralink,mt7620a-soc";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ switch_high {
+ label = "switch high";
+ gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ switch_off {
+ label = "switch off";
+ gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1radio";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio2 31 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0radio";
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
+ };
+
+ crossband {
+ label = "green:crossband";
+ gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "cimage";
+ reg = <0x50000 0x20000>;
+ read-only;
+ };
+
+ partition@70000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,offset = <FW_EDIMAX_OFFSET>;
+ openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
+ label = "firmware";
+ reg = <0x00070000 0x00790000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "nd_sd", "rgmii2";
+ function = "gpio";
+ };
+};
+
+&pinctrl {
+ phy_reset_pins: phy-reset {
+ gpio {
+ groups = "spi refclk";
+ function = "gpio";
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ phy-reset-duration = <30>;
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ status = "disabled";
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ phy1: ethernet-phy@1 {
+ status = "disabled";
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ phy2: ethernet-phy@2 {
+ status = "disabled";
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ phy3: ethernet-phy@3 {
+ status = "disabled";
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ phy4: ethernet-phy@4 {
+ status = "disabled";
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ mediatek,2ghz = <0>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts
new file mode 100644
index 0000000..ea895ac
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts
@@ -0,0 +1,195 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "engenius,esr600", "ralink,mt7620a-soc";
+ model = "EnGenius ESR600";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "amber:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps2g {
+ label = "amber:wps2g";
+ gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <60>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ iNIC_rf: partition@50000 {
+ label = "iNIC_rf";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "firmware";
+ reg = <0x60000 0xf40000>;
+ compatible = "denx,uimage";
+ };
+
+ partition@fa0000 {
+ label = "backup";
+ reg = <0xfa0000 0x10000>;
+ read-only;
+ };
+
+ partition@fb0000 {
+ label = "storage";
+ reg = <0xfb0000 0x50000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ mtd-mac-address = <&iNIC_rf 0x4>;
+
+ port@5 {
+ status = "okay";
+ phy-mode = "rgmii";
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ qca,ar8327-initvals = <
+ 0x10 0x40000000 /* POWER-ON STRAPPING */
+ 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
+ 0x7c 0x0000007e /* PORT0 STATUS */
+ 0x0c 0x05600000 /* PORT6 PAD MODE CTRL */
+ 0x94 0x0000007e /* PORT6 STATUS */
+ >;
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "nd_sd", "wled";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci1814,5592";
+ reg = <0x0 0 0 0 0>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&iNIC_rf 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts
new file mode 100644
index 0000000..373205e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts
@@ -0,0 +1,167 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "fon,fon2601", "ralink,mt7620a-soc";
+ model = "Fon FON2601";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power_r {
+ label = "red:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ internet_g {
+ label = "green:internet";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ net_g {
+ label = "green:net";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi_g {
+ label = "green:wifi";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,padding = <32>;
+ label = "firmware";
+ reg = <0x50000 0xf90000>;
+ };
+
+ partition@fe0000 {
+ label = "board_data";
+ reg = <0xfe0000 0x20000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+ nd_sd {
+ groups = "nd_sd";
+ function = "sd";
+ };
+ spi_cs {
+ groups = "spi refclk";
+ function = "spi refclk";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ port@4 {
+ status = "okay";
+ phy-handle = <&phy4>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>, <&wled_pins>;
+};
+
+&pcie {
+ status = "okay";
+};
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts
new file mode 100644
index 0000000..545e11a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts
@@ -0,0 +1,144 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
+ model = "GL-MT300A";
+
+ aliases {
+ label-mac-device = &wmac;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "gl-mt300a:wan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "gl-mt300a:lan";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "gl-mt300a:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "gl-mt300a:usb";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ BTN_0 {
+ label = "BTN_0";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ BTN_1 {
+ label = "BTN_1";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+
+ partition@ff0000 {
+ label = "art";
+ reg = <0xff0000 0x10000>;
+ };
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4000>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ gpio {
+ groups = "wled","ephy","uartf","i2c";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts
new file mode 100644
index 0000000..575566c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts
@@ -0,0 +1,135 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "glinet,gl-mt300n", "ralink,mt7620a-soc";
+ model = "GL-MT300N";
+
+ aliases {
+ label-mac-device = &wmac;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "gl-mt300n:wan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "gl-mt300n:lan";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "gl-mt300n:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ BTN_0 {
+ label = "BTN_0";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ BTN_1 {
+ label = "BTN_1";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+
+ partition@ff0000 {
+ label = "art";
+ reg = <0xff0000 0x10000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4000>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ gpio {
+ groups = "wled","ephy","i2c";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts
new file mode 100644
index 0000000..7582378
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts
@@ -0,0 +1,150 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "glinet,gl-mt750", "ralink,mt7620a-soc";
+ model = "GL-MT750";
+
+ aliases {
+ label-mac-device = &wmac;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "gl-mt750:wan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "gl-mt750:lan";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "gl-mt750:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ BTN_0 {
+ label = "BTN_0";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ BTN_1 {
+ label = "BTN_1";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+
+ partition@ff0000 {
+ label = "art";
+ reg = <0xff0000 0x10000>;
+ };
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4000>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wled","ephy","uartf";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
new file mode 100644
index 0000000..7d807bf
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
@@ -0,0 +1,184 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "head-weblink,hdrm200", "ralink,mt7620a-soc";
+ model = "Head Weblink HDRM200";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ chosen {
+ bootargs = "console=ttyS1,57600";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ rssi {
+ label = "red:rssi";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+
+ led_system: system {
+ label = "green:system";
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ air {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ port@4 {
+ status = "okay";
+ phy-handle = <&phy4>;
+ phy-mode = "rgmii";
+ };
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf", "pa", "spi refclk",
+ "wled";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&uart {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
new file mode 100644
index 0000000..90ce3c9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
@@ -0,0 +1,33 @@
+#include "mt7620a_hiwifi_hc5x61.dtsi"
+
+/ {
+ compatible = "hiwifi,hc5661", "hiwifi,hc5x61", "ralink,mt7620a-soc";
+ model = "HiWiFi HC5661";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
new file mode 100644
index 0000000..5b67779
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
@@ -0,0 +1,59 @@
+#include "mt7620a_hiwifi_hc5x61.dtsi"
+
+/ {
+ compatible = "hiwifi,hc5761", "hiwifi,hc5x61", "ralink,mt7620a-soc";
+ model = "HiWiFi HC5761";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
new file mode 100644
index 0000000..08163e5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
@@ -0,0 +1,106 @@
+#include "mt7620a_hiwifi_hc5x61.dtsi"
+
+/ {
+ compatible = "hiwifi,hc5861", "hiwifi,hc5x61", "ralink,mt7620a-soc";
+ model = "HiWiFi HC5861";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ turbo {
+ label = "blue:turbo";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usbpower {
+ gpio-export,name = "usbpower";
+ gpio-export,output = <0>;
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ sdpower {
+ gpio-export,name = "sdpower";
+ gpio-export,output = <0>;
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi
new file mode 100644
index 0000000..6349ec5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi
@@ -0,0 +1,127 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hiwifi,hc5x61", "ralink,mt7620a-soc";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usbpower {
+ gpio-export,name = "usbpower";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&sysc {
+ ralink,gpiomux = "i2c", "jtag";
+ ralink,uartmux = "gpio";
+ ralink,wdtmux = <1>;
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+
+ partition@fd0000 {
+ label = "hwf_config";
+ reg = <0xfd0000 0x10000>;
+ read-only;
+ };
+
+ bdinfo: partition@fe0000 {
+ label = "bdinfo";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+
+ partition@ff0000 {
+ label = "backup";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+};
+
+&state_default {
+ gpio {
+ groups = "uartf", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_hnet_c108.dts b/target/linux/ramips/dts/mt7620a_hnet_c108.dts
new file mode 100644
index 0000000..4035139
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_hnet_c108.dts
@@ -0,0 +1,155 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ * All rights reserved.
+ */
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hnet,c108", "ralink,mt7620a-soc";
+ model = "HNET C108";
+
+ aliases {
+ led-boot = &led_lan_green;
+ led-failsafe = &led_lan_green;
+ led-running = &led_lan_green;
+ led-upgrade = &led_lan_green;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ power_modem {
+ gpio-export,name = "power_modem";
+ gpio-export,output = <1>;
+ gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ sdcard {
+ label = "green:sdcard";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+
+ modem_green {
+ label = "green:modem";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ modem_red {
+ label = "red:modem";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ lan_red {
+ label = "red:lan";
+ gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_lan_green: lan_green {
+ label = "green:lan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf", "spi refclk", "ephy";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts
new file mode 100644
index 0000000..d59b481
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts
@@ -0,0 +1,212 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "iodata,wn-ac1167gr", "ralink,mt7620a-soc";
+ model = "I-O DATA WN-AC1167GR";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ notification {
+ label = "green:notification";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ auto {
+ label = "auto";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x8000>;
+ read-only;
+ };
+
+ iNIC_rf: partition@48000 {
+ label = "iNIC_rf";
+ reg = <0x48000 0x8000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "NoUsed";
+ reg = <0x50000 0x20000>;
+ read-only;
+ };
+
+ partition@70000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x70000 0x6b4000>;
+ };
+
+ partition@724000 {
+ label = "manufacture";
+ reg = <0x724000 0x8c000>;
+ read-only;
+ };
+
+ partition@7b0000 {
+ label = "backup";
+ reg = <0x7b0000 0x10000>;
+ read-only;
+ };
+
+ partition@7c0000 {
+ label = "storage";
+ reg = <0x7c0000 0x40000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@1 {
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@2 {
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@3 {
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@1f {
+ reg = <0x1f>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <12>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts
new file mode 100644
index 0000000..e29431d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts
@@ -0,0 +1,190 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "iodata,wn-ac733gr3", "ralink,mt7620a-soc";
+ model = "I-O DATA WN-AC733GR3";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ notification {
+ label = "green:notification";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ router {
+ label = "router";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ auto {
+ label = "auto";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
+ rtl8367rb {
+ compatible = "realtek,rtl8367b";
+ gpio-sda = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+ realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x8000>;
+ read-only;
+ };
+
+ iNIC_rf: partition@48000 {
+ label = "iNIC_rf";
+ reg = <0x48000 0x8000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x6d4000>;
+ };
+
+ partition@724000 {
+ label = "manufacture";
+ reg = <0x724000 0x8c000>;
+ read-only;
+ };
+
+ partition@7b0000 {
+ label = "backup";
+ reg = <0x7b0000 0x10000>;
+ read-only;
+ };
+
+ partition@7c0000 {
+ label = "storage";
+ reg = <0x7c0000 0x40000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+};
+
+&gpio0 {
+ rtl8367rb_reset {
+ gpio-hog;
+ gpios = <0 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "rtl8367rb-reset";
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "mdio";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_iptime.dtsi b/target/linux/ramips/dts/mt7620a_iptime.dtsi
new file mode 100644
index 0000000..5a6fdac
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_iptime.dtsi
@@ -0,0 +1,86 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = ðernet;
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot: partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "config";
+ reg = <0x20000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@30000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&uboot 0x1fc20>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&uboot 0x1f800>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <0>;
+ led-active-low;
+ };
+ };
+};
+
+&wmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&wled_pins>;
+
+ ralink,mtd-eeprom = <&uboot 0x1f400>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts b/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts
new file mode 100644
index 0000000..6270af3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts
@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_iptime.dtsi"
+
+/ {
+ compatible = "iptime,a1004ns", "ralink,mt7620a-soc";
+ model = "ipTIME A1004ns";
+
+ aliases {
+ led-boot = &led_cpu;
+ led-failsafe = &led_cpu;
+ led-running = &led_cpu;
+ led-upgrade = &led_cpu;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_cpu: cpu {
+ label = "blue:cpu";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&firmware {
+ reg = <0x30000 0xfd0000>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "spi refclk";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@1 {
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@2 {
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@3 {
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@1f {
+ reg = <0x1f>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <12>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts b/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts
new file mode 100644
index 0000000..c997d68
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_iptime.dtsi"
+
+/ {
+ compatible = "iptime,a104ns", "ralink,mt7620a-soc";
+ model = "ipTIME A104ns";
+
+ aliases {
+ led-boot = &led_cpu;
+ led-failsafe = &led_cpu;
+ led-running = &led_cpu;
+ led-upgrade = &led_cpu;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_cpu: cpu {
+ label = "blue:cpu";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&firmware {
+ reg = <0x30000 0x7d0000>;
+};
+
+&state_default {
+ gpio {
+ groups = "uartf", "spi refclk";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts
new file mode 100644
index 0000000..218dd7a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts
@@ -0,0 +1,111 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/{
+ compatible = "kimax,u25awf-h1","ralink,mt7620a-soc";
+ model = "Kimax U25AWF-H1";
+
+ aliases {
+ led-boot = &led_wifi;
+ led-failsafe = &led_wifi;
+ led-running = &led_wifi;
+ led-upgrade = &led_wifi;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wifi: wifi {
+ label = "red:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "uartf", "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
new file mode 100644
index 0000000..41d69d0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
@@ -0,0 +1,154 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "lava,lr-25g001", "ralink,mt7620a-soc";
+ model = "LAVA LR-25G001";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2g {
+ label = "green:wifi2g";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi5g {
+ label = "green:wifi5g";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usbpower {
+ gpio-export,name = "usbpower";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0xfe0000>;
+ };
+
+ config: partition@ff0000 {
+ label = "config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ port@5 {
+ status = "okay";
+ phy-mode = "rgmii";
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ qca,ar8327-initvals = <
+ 0x04 0x87300000 /* PORT0 PAD MODE CTRL */
+ 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
+ 0x7c 0x0000007e /* PORT0_STATUS */
+ 0x94 0x00000000 /* PORT6_STATUS */
+ >;
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76x0e@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mtd-mac-address = <&config 0xe07e>;
+ mtd-mac-address-increment = <(2)>;
+ mediatek,mtd-eeprom = <&config 0xe08a>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uartf", "i2c";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts
new file mode 100644
index 0000000..9e0b817
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts
@@ -0,0 +1,170 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "lb-link,bl-w1200", "ralink,mt7620a-soc";
+ model = "LB-Link BL-W1200";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uartf", "spi refclk";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "wllll";
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@1 {
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@2 {
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@3 {
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@1f {
+ reg = <0x1f>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <12>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts
new file mode 100644
index 0000000..2bea987
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts
@@ -0,0 +1,59 @@
+#include "mt7620a_lenovo_newifi-y1.dtsi"
+
+/ {
+ compatible = "lenovo,newifi-y1", "ralink,mt7620a-soc";
+ model = "Lenovo Y1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = ðernet;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan1 {
+ label = "blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2 {
+ label = "blue:wifi5g";
+ gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+};
diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi
new file mode 100644
index 0000000..c7b7ea7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi
@@ -0,0 +1,103 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "lenovo,newifi-y1", "ralink,mt7620a-soc";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+};
+
+&state_default {
+ gpio {
+ groups = "uartf", "wled", "nd_sd";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts
new file mode 100644
index 0000000..0544550
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts
@@ -0,0 +1,116 @@
+#include "mt7620a_lenovo_newifi-y1.dtsi"
+
+/ {
+ compatible = "lenovo,newifi-y1s", "lenovo,newifi-y1", "ralink,mt7620a-soc";
+ model = "Lenovo Y1S";
+
+ aliases {
+ led-boot = &led_power_blue;
+ led-failsafe = &led_power_blue;
+ led-running = &led_power_blue;
+ led-upgrade = &led_power_blue;
+ label-mac-device = ðernet;
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb0 {
+ gpio-export,name = "usb0";
+ gpio-export,output = <1>;
+ gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
+ };
+ usb1 {
+ gpio-export,name = "usb1";
+ gpio-export,output = <1>;
+ gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
+ };
+ usb2 {
+ gpio-export,name = "usb2";
+ gpio-export,output = <1>;
+ gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power1 {
+ label = "yellow:power";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_blue: power2 {
+ label = "blue:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan1 {
+ label = "yellow:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2 {
+ label = "blue:wifi";
+ gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
+ };
+
+ usb1 {
+ label = "yellow:usb";
+ gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
+ };
+
+ usb2 {
+ label = "blue:usb";
+ gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "wllll";
+
+ port@4 {
+ status = "okay";
+ phy-handle = <&phy4>;
+ phy-mode = "rgmii";
+ };
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts
new file mode 100644
index 0000000..c38ea80
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts
@@ -0,0 +1,153 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
+ */
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "linksys,e1700", "ralink,mt7620a-soc";
+ model = "Linksys E1700";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ phy1: ethernet-phy@1 {
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ phy2: ethernet-phy@2 {
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ phy3: ethernet-phy@3 {
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy1f: ethernet-phy@1f {
+ reg = <0x1f>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <12>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts
new file mode 100644
index 0000000..4307d51
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts
@@ -0,0 +1,97 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "microduino,microwrt", "ralink,mt7620a-soc";
+ model = "Microduino MicroWRT";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "u-boot-env";
+ reg = <0x20000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x40000 0xfc0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "wled", "i2c", "wdt", "uartf";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts b/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts
new file mode 100644
index 0000000..9ed0883
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts
@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2016 Joseph C. Lehner <joseph.c.lehner@gmail.com>
+ */
+
+#include "mt7620a_netgear_ex2700_wn3000rp-v3.dtsi"
+
+/ {
+ compatible = "netgear,ex2700", "ralink,mt7620a-soc";
+ model = "Netgear EX2700";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_green: power_g {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ power_r {
+ label = "red:power";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ device_g {
+ label = "green:device";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ device_r {
+ label = "red:device";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ router_g {
+ label = "green:router";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ router_r {
+ label = "red:router";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&partitions {
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x40000 0x3b0000>;
+ };
+
+ art: partition@3f0000 {
+ label = "art";
+ reg = <0x3f0000 0x10000>;
+ read-only;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex2700_wn3000rp-v3.dtsi b/target/linux/ramips/dts/mt7620a_netgear_ex2700_wn3000rp-v3.dtsi
new file mode 100644
index 0000000..e7b1f4b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_netgear_ex2700_wn3000rp-v3.dtsi
@@ -0,0 +1,58 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&art 0x0>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&art 0x1000>;
+ mtd-mac-address = <&art 0x6>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf", "spi refclk";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex3700.dts b/target/linux/ramips/dts/mt7620a_netgear_ex3700.dts
new file mode 100644
index 0000000..0ab84f7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_netgear_ex3700.dts
@@ -0,0 +1,8 @@
+/* This file is released into the public domain */
+
+#include "mt7620a_netgear_ex3x00_ex61xx.dtsi"
+
+/ {
+ compatible = "netgear,ex3700", "ralink,mt7620a-soc";
+ model = "Netgear EX3700/EX3800";
+};
diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi
new file mode 100644
index 0000000..11e8f7f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi
@@ -0,0 +1,152 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_power_amber;
+ led-failsafe = &led_power_amber;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_green: power_green {
+ label = "green:power";
+ gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_power_amber: power_amber {
+ label = "amber:power";
+ gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
+ };
+
+ router_green {
+ label = "green:router";
+ gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
+ };
+
+ router_red {
+ label = "red:router";
+ gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
+ };
+
+ device_green {
+ label = "green:device";
+ gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+ };
+
+ device_red {
+ label = "red:device";
+ gpios = <&gpio2 21 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x790000>;
+ };
+
+ partition@7e0000 {
+ label = "board_data";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ partition@7f0000 {
+ label = "nvram";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "rgmii2", "spi refclk";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex6120.dts b/target/linux/ramips/dts/mt7620a_netgear_ex6120.dts
new file mode 100644
index 0000000..2d37627
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_netgear_ex6120.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_netgear_ex3x00_ex61xx.dtsi"
+
+/ {
+ compatible = "netgear,ex6120", "ralink,mt7620a-soc";
+ model = "Netgear EX6120";
+};
diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex6130.dts b/target/linux/ramips/dts/mt7620a_netgear_ex6130.dts
new file mode 100644
index 0000000..0cb4dc6
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_netgear_ex6130.dts
@@ -0,0 +1,12 @@
+/* This file is released into the public domain */
+
+#include "mt7620a_netgear_ex3x00_ex61xx.dtsi"
+
+/ {
+ compatible = "netgear,ex6130", "ralink,mt7620a-soc";
+ model = "Netgear EX6130";
+
+ aliases {
+ label-mac-device = ðernet;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts
new file mode 100644
index 0000000..c9b1806
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts
@@ -0,0 +1,91 @@
+/* This file is released into the public domain */
+
+#include "mt7620a_netgear_ex2700_wn3000rp-v3.dtsi"
+
+/ {
+ compatible = "netgear,wn3000rp-v3", "ralink,mt7620a-soc";
+ model = "Netgear WN3000RP v3";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_green: power_g {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ power_r {
+ label = "red:power";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ client_g {
+ label = "green:client";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ client_r {
+ label = "red:client";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ router_g {
+ label = "green:router";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ router_r {
+ label = "red:router";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ l_arrow {
+ label = "blue:leftarrow";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ r_arrow {
+ label = "blue:rightarrow";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&partitions {
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x40000 0x7b0000>;
+ };
+
+ art: partition@7f0000 {
+ label = "art";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts
new file mode 100644
index 0000000..f839048
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts
@@ -0,0 +1,164 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "netis,wf2770", "ralink,mt7620a-soc";
+ model = "NETIS WF2770";
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+
+ led-toggle {
+ label = "led-toggle";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_LIGHTS_TOGGLE>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@1 {
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@2 {
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@3 {
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ ethernet-phy@1f {
+ reg = <0x1f>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <12>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts
new file mode 100644
index 0000000..7dabbed
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts
@@ -0,0 +1,120 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc";
+ model = "OY-0001";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: powerled {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wifiled {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ s1 {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts
new file mode 100644
index 0000000..e01c60a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts
@@ -0,0 +1,141 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "phicomm,k2g", "ralink,mt7620a-soc";
+ model = "Phicomm K2G";
+
+ aliases {
+ led-boot = &led_blue;
+ led-failsafe = &led_blue;
+ led-running = &led_blue;
+ led-upgrade = &led_blue;
+ serial0 = &uartlite;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_blue: blue {
+ label = "blue:status";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ yellow {
+ label = "yellow:status";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ red {
+ label = "red:status";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <24000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x30000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x30000 0x10000>;
+ label = "u-boot-env";
+ read-only;
+ };
+
+ factory: partition@40000 {
+ reg = <0x40000 0x10000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@50000 {
+ reg = <0x50000 0x50000>;
+ label = "permanent_config";
+ read-only;
+ };
+
+ partition@a0000 {
+ compatible = "denx,uimage";
+ reg = <0xa0000 0x760000>;
+ label = "firmware";
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts
new file mode 100644
index 0000000..ea87d64
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts
@@ -0,0 +1,120 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "phicomm,psg1208", "ralink,mt7620a-soc";
+ model = "Phicomm PSG1208";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wps: wps {
+ label = "white:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "white:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi
new file mode 100644
index 0000000..4163a9c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218.dtsi
@@ -0,0 +1,101 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "phicomm,psg1218", "ralink,mt7620a-soc";
+
+ aliases {
+ led-boot = &led_blue;
+ led-failsafe = &led_blue;
+ led-running = &led_blue;
+ led-upgrade = &led_blue;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_blue: blue {
+ label = "blue:status";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ yellow {
+ label = "yellow:status";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ red {
+ label = "red:status";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts
new file mode 100644
index 0000000..baa0d8b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts
@@ -0,0 +1,27 @@
+#include "mt7620a_phicomm_psg1218.dtsi"
+
+/ {
+ compatible = "phicomm,psg1218a", "phicomm,psg1218", "ralink,mt7620a-soc";
+ model = "Phicomm PSG1218 rev.A";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts
new file mode 100644
index 0000000..f7e70c9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts
@@ -0,0 +1,20 @@
+#include "mt7620a_phicomm_psg1218.dtsi"
+
+/ {
+ compatible = "phicomm,psg1218b", "phicomm,psg1218", "ralink,mt7620a-soc";
+ model = "Phicomm PSG1218 rev.B";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "pa";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts
new file mode 100644
index 0000000..3edc41a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts
@@ -0,0 +1,139 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "planex,cs-qr10", "ralink,mt7620a-soc";
+ model = "Planex CS-QR10";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "red:power";
+ gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ s1 {
+ label = "reset";
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ s2 {
+ label = "wps";
+ gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+&i2s {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcm_i2s_pins>;
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&pcm {
+ status = "okay";
+};
+
+&gdma {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "spi refclk", "rgmii1";
+ function = "gpio";
+ };
+ wdt {
+ groups = "wdt";
+ function = "wdt refclk";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts
new file mode 100644
index 0000000..8f8f173
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts
@@ -0,0 +1,99 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "planex,db-wrt01", "ralink,mt7620a-soc";
+ model = "Planex DB-WRT01";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "orange:power";
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ s1 {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi refclk", "rgmii1";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts
new file mode 100644
index 0000000..e1c5568
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts
@@ -0,0 +1,130 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "planex,mzk-750dhp", "ralink,mt7620a-soc";
+ model = "Planex MZK-750DHP";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ s1 {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ s2 {
+ label = "wps";
+ gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi refclk", "rgmii1", "nd_sd";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts
new file mode 100644
index 0000000..5459886
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts
@@ -0,0 +1,139 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "planex,mzk-ex300np", "ralink,mt7620a-soc";
+ model = "Planex MZK-EX300NP";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ };
+
+ rep {
+ label = "blue:rep";
+ gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi1 {
+ label = "blue:wifi1";
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2 {
+ label = "blue:wifi2";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi3 {
+ label = "blue:wifi3";
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x730000>;
+ };
+
+ partition@780000 {
+ label = "Udata";
+ reg = <0x780000 0x80000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi refclk", "rgmii1", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts
new file mode 100644
index 0000000..457d4fd
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts
@@ -0,0 +1,155 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "planex,mzk-ex750np", "ralink,mt7620a-soc";
+ model = "Planex MZK-EX750NP";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "red:power";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "red:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ rep {
+ label = "blue:rep";
+ gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi1 {
+ label = "blue:wifi1";
+ gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2 {
+ label = "blue:wifi2";
+ gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi3 {
+ label = "blue:wifi3";
+ gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x730000>;
+ };
+
+ partition@780000 {
+ label = "Udata";
+ reg = <0x780000 0x80000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uartf", "nd_sd", "rgmii2", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-evb.dts b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-evb.dts
new file mode 100644
index 0000000..ae35941
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-evb.dts
@@ -0,0 +1,126 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ralink,mt7620a-evb", "ralink,mt7620a-soc";
+ model = "Ralink MT7620a + MT7610e evaluation board";
+
+ keys {
+ compatible = "gpio-keys";
+
+ s2 {
+ label = "S2";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ s3 {
+ label = "S3";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mediatek,portmap = "llllw";
+
+ port@4 {
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&phy4>;
+ };
+
+ port@5 {
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&phy5>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7530-evb.dts b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7530-evb.dts
new file mode 100644
index 0000000..f7d8cae
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7530-evb.dts
@@ -0,0 +1,116 @@
+#include "mt7620a.dtsi"
+
+/ {
+ compatible = "ralink,mt7620a-mt7530-evb", "ralink,mt7620a-soc";
+ model = "Ralink MT7620a + MT7530 evaluation board";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mediatek,portmap = "llllw";
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+
+ phy1: ethernet-phy@1 {
+ reg = <1>;
+ phy-mode = "rgmii";
+ };
+
+ phy2: ethernet-phy@2 {
+ reg = <2>;
+ phy-mode = "rgmii";
+ };
+
+ phy3: ethernet-phy@3 {
+ reg = <3>;
+ phy-mode = "rgmii";
+ };
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy1f: ethernet-phy@1f {
+ reg = <0x1f>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <12>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts
new file mode 100644
index 0000000..b7a71c3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts
@@ -0,0 +1,88 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ralink,mt7620a-mt7610e-evb", "ralink,mt7620a-soc";
+ model = "Ralink MT7620A evaluation board";
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mediatek,portmap = "llllw";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-v22sg-evb.dts b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-v22sg-evb.dts
new file mode 100644
index 0000000..0e963e1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-v22sg-evb.dts
@@ -0,0 +1,116 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ralink,mt7620a-v22sg-evb", "ralink,mt7620a-soc";
+ model = "Ralink MT7620a V22SG High Power evaluation board";
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ nand {
+ compatible = "mtk,mt7620-nand";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x40000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "u-boot-env";
+ reg = <0x40000 0x20000>;
+ read-only;
+ };
+
+ factory: partition@60000 {
+ label = "factory";
+ reg = <0x60000 0x20000>;
+ read-only;
+ };
+
+ partition@80000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x80000 0x7f80000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "spi";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mediatek,portmap = "llllw";
+
+ port@4 {
+ status = "okay";
+ phy-handle = <&phy4>;
+ phy-mode = "rgmii";
+ };
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts
new file mode 100644
index 0000000..6cff557
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts
@@ -0,0 +1,175 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ * All rights reserved.
+ */
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "sanlinking,d240", "ralink,mt7620a-soc";
+ model = "Sanlinking Technologies D240";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ power_mpcie2 {
+ gpio-export,name = "power_mpcie2";
+ gpio-export,output = <1>;
+ gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_mpcie1 {
+ gpio-export,name = "power_mpcie1";
+ gpio-export,output = <1>;
+ gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ air {
+ label = "blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+ /* the pins function is already set during pinmux driver load */
+ /delete-property/ pinctrl-0;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf", "wled", "spi refclk", "pa";
+ function = "gpio";
+ };
+
+ /*
+ * The sd function of the nd_sd group configures two of the
+ * groups pins as gpios. The pins are used as PCIe reset/power.
+ * Due to the driver load order, the pins are configured way to
+ * late if triggered by the sd-card driver.
+ * To not introduce another kind of driver load order
+ * dependency and configure the pins as early as possible,
+ * means during pinmux driver load.
+ */
+ gpio_sd {
+ groups = "nd_sd";
+ function = "sd";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts
new file mode 100644
index 0000000..1ffc0a2
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts
@@ -0,0 +1,179 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "sercomm,na930", "ralink,mt7620a-soc";
+ model = "Sercomm NA930";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS1,57600";
+ };
+
+ nand {
+ compatible = "mtk,mt7620-nand";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@200000 {
+ label = "factory";
+ reg = <0x200000 0x40000>;
+ read-only;
+ };
+
+ partition@240000 {
+ label = "Config";
+ reg = <0x240000 0x400000>;
+ read-only;
+ };
+
+ partition@640000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x640000 0x1400000>;
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ zwave {
+ label = "zwave";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ zwave {
+ label = "blue:zwave";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ status {
+ label = "blue:status";
+ gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ service {
+ label = "blue:service";
+ gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ telit {
+ gpio-export,name = "telit";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "rgmii2", "spi", "ephy";
+ function = "gpio";
+ };
+
+ uartf_gpio {
+ groups = "uartf";
+ function = "gpio uartf";
+ };
+};
+
+&uart {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ mediatek,portmap = "llllw";
+
+ port@4 {
+ status = "okay";
+ phy-handle = <&phy4>;
+ phy-mode = "rgmii";
+ };
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts b/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts
new file mode 100644
index 0000000..3b260c5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts
@@ -0,0 +1,186 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "sitecom,wlr-4100-v1-002", "ralink,mt7620a-soc";
+ model = "Sitecom WLR-4100 v1 002";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "amber:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wifi {
+ label = "blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wps {
+ label = "white:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb-power {
+ gpio-export,name = "usb-power";
+ gpio-export,output = <1>;
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x790000>;
+ };
+
+ partition@7e0000 {
+ label = "backup";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ partition@7f0000 {
+ label = "storage";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ port@5 {
+ status = "okay";
+
+ phy-mode = "rgmii";
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+
+ qca,ar8327-initvals = <
+ 0x04 0x06200000 /* PORT0 PAD MODE CTRL */
+ 0x08 0x01000000 /* PORT5 PAD MODE CTRL RX delay EN all ports 0, 5, 6 */
+ 0x7c 0x0000007e /* PORT0_STATUS */
+ 0x94 0x00000000 /* PORT6_STATUS */
+ >;
+ };
+ };
+};
+
+&gsw {
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&wmac {
+ status = "okay";
+
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ gpio {
+ groups = "uartf", "i2c", "wled", "spi refclk";
+ function = "gpio";
+ };
+};
+
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
new file mode 100644
index 0000000..184af58
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
@@ -0,0 +1,189 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc";
+ model = "TP-Link Archer C2 v1";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ rtl8367rb {
+ compatible = "realtek,rtl8367b", "rtl8367b";
+ cpu_port = <6>;
+ realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
+ mii-bus = <&mdio0>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <30000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x7a0000>;
+ };
+
+ partition@7c0000 {
+ label = "config";
+ reg = <0x7c0000 0x10000>;
+ read-only;
+ };
+
+ rom: partition@7d0000 {
+ label = "rom";
+ reg = <0x7d0000 0x10000>;
+ read-only;
+ };
+
+ partition@7e0000 {
+ label = "romfile";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ radio: partition@7f0000 {
+ label = "radio";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&rom 0xf100>;
+
+ port@5 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+
+ mdio0: mdio-bus {
+ status = "okay";
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "wled", "ephy", "spi refclk";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&rom 0xf100>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ mtd-mac-address = <&rom 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
new file mode 100644
index 0000000..f7e7d50
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
@@ -0,0 +1,82 @@
+#include "mt7620a_tplink_archer.dtsi"
+
+/ {
+ compatible = "tplink,archer-c20-v1", "ralink,mt7620a-soc";
+ model = "TP-Link Archer C20 v1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wan {
+ label = "blue:wan";
+ gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "wled", "ephy", "spi refclk", "wdt";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+
+ mtd-mac-address = <&rom 0xf100>;
+ mtd-mac-address-increment = <(-2)>;
+};
+
+&wifi {
+ mtd-mac-address = <&rom 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
new file mode 100644
index 0000000..a6c3cea
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
@@ -0,0 +1,62 @@
+#include "mt7620a_tplink_archer.dtsi"
+
+/ {
+ compatible = "tplink,archer-c20i", "ralink,mt7620a-soc";
+ model = "TP-Link Archer C20i";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ label-mac-device = ðernet;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_wps: wps {
+ label = "blue:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "blue:wan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "ephy", "spi refclk";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ mtd-mac-address = <&rom 0xf100>;
+};
+
+&wifi {
+ mtd-mac-address = <&rom 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
new file mode 100644
index 0000000..d564552
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
@@ -0,0 +1,82 @@
+#include "mt7620a_tplink_archer.dtsi"
+
+/ {
+ compatible = "tplink,archer-c50-v1", "ralink,mt7620a-soc";
+ model = "TP-Link Archer C50 v1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "ephy", "spi refclk", "mdio", "wdt", "nd_sd";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+
+ mtd-mac-address = <&rom 0xf100>;
+ mtd-mac-address-increment = <(-2)>;
+};
+
+&wifi {
+ mtd-mac-address = <&rom 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
new file mode 100644
index 0000000..4212a70
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
@@ -0,0 +1,194 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tplink,archer-mr200", "ralink,mt7620a-soc";
+ model = "TP-Link Archer MR200";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "white:lan";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "white:wan";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "white:power";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ 4g {
+ label = "white:4g";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "white:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ signal1 {
+ label = "white:signal1";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ signal2 {
+ label = "white:signal2";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ signal3 {
+ label = "white:signal3";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ signal4 {
+ label = "white:signal4";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "white:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ power_usb {
+ gpio-export,name = "power_usb1";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <30000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x7b0000>;
+ };
+
+ rom: partition@7d0000 {
+ label = "rom";
+ reg = <0x7d0000 0x10000>;
+ read-only;
+ };
+
+ partition@7e0000 {
+ label = "romfile";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ radio: partition@7f0000 {
+ label = "radio";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "ephy", "spi refclk";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&rom 0xf100>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&radio 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
new file mode 100644
index 0000000..d2fb891
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
@@ -0,0 +1,122 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <30000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x7a0000>;
+ };
+
+ partition@7c0000 {
+ label = "config";
+ reg = <0x7c0000 0x10000>;
+ read-only;
+ };
+
+ rom: partition@7d0000 {
+ label = "rom";
+ reg = <0x7d0000 0x10000>;
+ read-only;
+ };
+
+ partition@7e0000 {
+ label = "romfile";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ radio: partition@7f0000 {
+ label = "radio";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+
+ mtd-mac-address = <&rom 0xf100>;
+
+ mediatek,portmap = "wllll";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&radio 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi: mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts
new file mode 100644
index 0000000..d2f5207
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts
@@ -0,0 +1,70 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_tplink_re2x0-v1.dtsi"
+
+/ {
+ compatible = "tplink,re200-v1", "ralink,mt7620a-soc";
+ model = "TP-Link RE200 v1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
+ };
+
+ qss {
+ label = "green:qss";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g_red {
+ label = "red:wlan2g";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g_green {
+ label = "green:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+};
+
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "ephy", "wled", "rgmii1", "spi refclk";
+ function = "gpio";
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts
new file mode 100644
index 0000000..57cd0ed
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_tplink_re2x0-v1.dtsi"
+
+/ {
+ compatible = "tplink,re210-v1", "ralink,mt7620a-soc";
+ model = "TP-Link RE210 v1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi_high {
+ label = "green:rssi-high";
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi_low {
+ label = "red:rssi-low";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&keys {
+ led_power {
+ label = "LED power";
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "wled", "rgmii1";
+ function = "gpio";
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii2_pins &mdio_pins>;
+
+ port@4 {
+ status = "okay";
+
+ phy-handle = <&phy4>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
new file mode 100644
index 0000000..80b47b7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = ðernet;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600n8";
+ };
+
+ keys: keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot: partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x7c0000>;
+ };
+
+ partition@7e0000 {
+ label = "config";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ radio: partition@7f0000 {
+ label = "radio";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&uboot 0x1fc00>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&uboot 0x1fc00>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ mtd-mac-address = <&uboot 0x1fc00>;
+ mtd-mac-address-increment = <2>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
new file mode 100644
index 0000000..6c6ea18
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_trendnet_tew-810dr.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_cameo_810.dtsi"
+
+/ {
+ compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
+ model = "TRENDnet TEW-810DR";
+};
diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
new file mode 100644
index 0000000..d8ce40c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
@@ -0,0 +1,138 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "wavlink,wl-wn530hg4", "ralink,mt7620a-soc";
+ model = "Wavlink WL-WN530HG4";
+
+ aliases {
+ led-boot = &led_status_blue;
+ led-failsafe = &led_status_blue;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_blue;
+ serial0 = &uartlite;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ status_yellow {
+ label = "yellow:status";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ status_red {
+ label = "red:status";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <24000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
new file mode 100644
index 0000000..bfec806
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
@@ -0,0 +1,211 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "wavlink,wl-wn579x3", "ralink,mt7620a-soc";
+ model = "Wavlink WL-WN579X3";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ switch_aps {
+ label = "mode_aps";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ linux,input-type = <EV_SW>;
+ };
+
+ switch_repeater {
+ label = "mode_repeater";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wps: wps {
+ label = "blue:wps";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "blue:wan";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ /* These three form the signal wifi strength segments */
+ wifi_high {
+ label = "blue:wifi_high";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi_medium {
+ label = "blue:wifi_medium";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi_low {
+ label = "blue:wifi_low";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x790000>;
+ };
+
+ partition@7e0000 {
+ label = "board_data";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ partition@7f0000 {
+ label = "nvram";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+
+ port@4 {
+ status = "okay";
+ phy-handle = <&phy4>;
+ phy-mode = "rgmii";
+ };
+
+ port@5 {
+ status = "okay";
+ phy-handle = <&phy5>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ gpio {
+ groups = "ephy", "i2c", "wled", "uartf";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
new file mode 100644
index 0000000..11b1aa3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
@@ -0,0 +1,152 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc";
+ model = "Xiaomi MiWiFi Mini";
+
+ aliases {
+ led-boot = &led_blue;
+ led-failsafe = &led_blue;
+ led-running = &led_blue;
+ led-upgrade = &led_blue;
+ label-mac-device = ðernet;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_blue: blue {
+ label = "blue:status";
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ yellow {
+ label = "yellow:status";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ };
+
+ red {
+ label = "red:status";
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+
+ partition@fd0000 {
+ label = "crash";
+ reg = <0xfd0000 0x10000>;
+ };
+
+ partition@fe0000 {
+ label = "reserved";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+
+ partition@ff0000 {
+ label = "Bdata";
+ reg = <0xff0000 0x10000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "rgmii1";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dts b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dts
new file mode 100644
index 0000000..5155318
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_youku_yk-l1.dtsi"
+
+/ {
+ compatible = "youku,yk-l1", "ralink,mt7620a-soc";
+ model = "Youku YK-L1";
+};
+
+&firmware {
+ reg = <0x50000 0x1fb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
new file mode 100644
index 0000000..61062a3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
@@ -0,0 +1,126 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = ðernet;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ /* reg property is set based on flash size in DTS files */
+ };
+ };
+ };
+};
+
+&state_default {
+ default {
+ groups = "i2c", "rgmii1", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+
+ mtd-mac-address = <&factory 0x28>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1c.dts b/target/linux/ramips/dts/mt7620a_youku_yk-l1c.dts
new file mode 100644
index 0000000..c59f010
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1c.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_youku_yk-l1.dtsi"
+
+/ {
+ compatible = "youku,yk-l1c", "ralink,mt7620a-soc";
+ model = "Youku YK-L1c";
+};
+
+&firmware {
+ reg = <0x50000 0xfb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts
new file mode 100644
index 0000000..347c246
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts
@@ -0,0 +1,146 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "yukai,bocco", "ralink,mt7620a-soc";
+ model = "YUKAI Engineering BOCCO";
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ s1 {
+ gpio-export,name = "rec";
+ gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
+ };
+ s2 {
+ gpio-export,name = "play";
+ gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "Audio-I2S";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&dailink0_master>;
+ simple-audio-card,frame-master = <&dailink0_master>;
+ simple-audio-card,widgets =
+ "Headphone", "Headphones";
+ simple-audio-card,routing =
+ "Headphones", "HP_L",
+ "Headphones", "HP_R";
+ simple-audio-card,mclk-fs = <256>;
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+
+ dailink0_master: simple-audio-card,codec {
+ sound-dai = <&codec>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+
+ codec: wm8960@1a {
+ #sound-dai-cells = <0>;
+ compatible = "wlf,wm8960";
+ reg = <0x1a>;
+
+ wlf,shared-lrclk;
+ };
+};
+
+&i2s {
+ #sound-dai-cells = <0>;
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcm_i2s_pins>;
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&pcm {
+ status = "okay";
+};
+
+&gdma {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "spi refclk", "rgmii1";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
new file mode 100644
index 0000000..28ae7c3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
@@ -0,0 +1,129 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-ape522ii", "ralink,mt7620a-soc";
+ model = "Zbtlink ZBT-APE522II";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ sys1 {
+ label = "green:sys1";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ sys2 {
+ label = "green:sys2";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ sys3 {
+ label = "green:sys3";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ sys4 {
+ label = "green:sys4";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g4 {
+ label = "green:wlan2g4";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pa_pins>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wled", "i2c", "uartf", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g-16m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g-16m.dts
new file mode 100644
index 0000000..bc2eec5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g-16m.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_zbtlink_zbt-we1026-5g.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we1026-5g-16m", "zbtlink,zbt-we1026-5g",
+ "zbtlink,zbt-we1026", "ralink,mt7620a-soc";
+ model = "Zbtlink ZBT-WE1026-5G (16M)";
+};
+
+&firmware {
+ reg = <0x50000 0xfb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
new file mode 100644
index 0000000..f86ac1a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_zbtlink_zbt-we1026.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we1026-5g", "zbtlink,zbt-we1026",
+ "ralink,mt7620a-soc";
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ watchdog {
+ compatible = "linux,wdt-gpio";
+ gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ hw_algo = "toggle";
+ hw_margin_ms = <20000>;
+ always-running;
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h-32m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h-32m.dts
new file mode 100644
index 0000000..577e7e0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h-32m.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_zbtlink_zbt-we1026-h.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we1026-h-32m", "zbtlink,zbt-we1026-h",
+ "zbtlink,zbt-we1026", "ralink,mt7620a-soc";
+ model = "Zbtlink ZBT-WE1026-H (32M)";
+};
+
+&flash0 {
+ broken-flash-reset;
+};
+
+&firmware {
+ reg = <0x50000 0x1fb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi
new file mode 100644
index 0000000..09f0ba7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_zbtlink_zbt-we1026.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we1026-h", "zbtlink,zbt-we1026",
+ "ralink,mt7620a-soc";
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi
new file mode 100644
index 0000000..3dae6d9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi
@@ -0,0 +1,102 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-we1026", "ralink,mt7620a-soc";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ aliases {
+ label-mac-device = &wmac;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ };
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf", "spi refclk", "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts
new file mode 100644
index 0000000..c3de533
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-16m.dts
@@ -0,0 +1,46 @@
+#include "mt7620a_zbtlink_zbt-we826.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we826-16m", "zbtlink,zbt-we826", "ralink,mt7620a-soc";
+ model = "Zbtlink ZBT-WE826 (16M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
new file mode 100644
index 0000000..ad07682
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
@@ -0,0 +1,47 @@
+#include "mt7620a_zbtlink_zbt-we826.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we826-32m", "zbtlink,zbt-we826", "ralink,mt7620a-soc";
+ model = "Zbtlink ZBT-WE826 (32M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
new file mode 100644
index 0000000..6950211
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620a_zbtlink_zbt-we826.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we826-e", "zbtlink,zbt-we826", "ralink,mt7620a-soc";
+ model = "Zbtlink ZBT-WE826-E";
+
+ /delete-node/ leds;
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: gsm {
+ label = "blue:gsm";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ signal {
+ label = "green:signal";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ sim {
+ label = "red:sim";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ air {
+ label = "red:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
new file mode 100644
index 0000000..cf2ca1c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi
@@ -0,0 +1,91 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ air {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf", "wled", "spi refclk", "pa";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_zte_q7.dts b/target/linux/ramips/dts/mt7620a_zte_q7.dts
new file mode 100644
index 0000000..550f750
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zte_q7.dts
@@ -0,0 +1,113 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zte,q7", "ralink,mt7620a-soc";
+ model = "ZTE Q7";
+
+ aliases {
+ led-boot = &led_status_blue;
+ led-failsafe = &led_status_blue;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_blue;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ statred {
+ label = "red:status";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_blue: statblue {
+ label = "blue:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts
new file mode 100644
index 0000000..1a5ff2d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts
@@ -0,0 +1,174 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,keenetic-viva", "ralink,mt7620a-soc";
+ model = "ZyXEL Keenetic Viva";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ power_alert {
+ label = "red:power";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_green: power {
+ label = "green:power";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ fn {
+ label = "fn";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb_power {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ rtl8367rb {
+ compatible = "realtek,rtl8367b";
+ cpu_port = <7>;
+ realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
+ mii-bus = <&mdio0>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii2_pins &mdio_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ port@4 {
+ status = "okay";
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ phy-handle = <&phy4>;
+ };
+
+ mdio0: mdio-bus {
+ status = "okay";
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&gsw {
+ mediatek,port4-gmac;
+ mediatek,ephy-base = /bits/ 8 <8>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620n.dtsi b/target/linux/ramips/dts/mt7620n.dtsi
new file mode 100644
index 0000000..d5d704b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n.dtsi
@@ -0,0 +1,387 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ralink,mt7620n-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "mips,mips24KEc";
+ reg = <0>;
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ aliases {
+ spi0 = &spi0;
+ spi1 = &spi1;
+ serial0 = &uartlite;
+ };
+
+ palmbus: palmbus@10000000 {
+ compatible = "palmbus";
+ reg = <0x10000000 0x200000>;
+ ranges = <0x0 0x10000000 0x1FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "ralink,mt7620a-sysc", "ralink,rt3050-sysc", "syscon";
+ reg = <0x0 0x100>;
+ };
+
+ timer: timer@100 {
+ compatible = "ralink,mt7620a-timer", "ralink,rt2880-timer";
+ reg = <0x100 0x20>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ watchdog: watchdog@120 {
+ compatible = "ralink,mt7620a-wdt", "ralink,rt2880-wdt";
+ reg = <0x120 0x10>;
+
+ resets = <&rstctrl 8>;
+ reset-names = "wdt";
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ intc: intc@200 {
+ compatible = "ralink,mt7620a-intc", "ralink,rt2880-intc";
+ reg = <0x200 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "intc";
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ };
+
+ memc: memc@300 {
+ compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc";
+ reg = <0x300 0x100>;
+
+ resets = <&rstctrl 20>;
+ reset-names = "mc";
+
+ interrupt-parent = <&intc>;
+ interrupts = <3>;
+ };
+
+ gpio0: gpio@600 {
+ compatible = "ralink,mt7620a-gpio", "ralink,rt2880-gpio";
+ reg = <0x600 0x34>;
+
+ resets = <&rstctrl 13>;
+ reset-names = "pio";
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <0>;
+ ralink,num-gpios = <24>;
+ ralink,register-map = [ 00 04 08 0c
+ 20 24 28 2c
+ 30 34 ];
+ };
+
+ gpio1: gpio@638 {
+ compatible = "ralink,mt7620a-gpio", "ralink,rt2880-gpio";
+ reg = <0x638 0x24>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <24>;
+ ralink,num-gpios = <16>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio2: gpio@660 {
+ compatible = "ralink,mt7620a-gpio", "ralink,rt2880-gpio";
+ reg = <0x660 0x24>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <40>;
+ ralink,num-gpios = <32>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio3: gpio@688 {
+ compatible = "ralink,mt7620a-gpio", "ralink,rt2880-gpio";
+ reg = <0x688 0x24>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <72>;
+ ralink,num-gpios = <1>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ i2c: i2c@900 {
+ compatible = "ralink,rt2880-i2c";
+ reg = <0x900 0x100>;
+
+ resets = <&rstctrl 16>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ };
+
+ spi0: spi@b00 {
+ compatible = "ralink,mt7620a-spi", "ralink,rt2880-spi";
+ reg = <0xb00 0x40>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>;
+ };
+
+ spi1: spi@b40 {
+ compatible = "ralink,rt2880-spi";
+ reg = <0xb40 0x60>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_cs1>;
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0xc00 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "uartl";
+
+ interrupt-parent = <&intc>;
+ interrupts = <12>;
+
+ reg-shift = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uartlite_pins>;
+ };
+
+ systick: systick@d00 {
+ compatible = "ralink,mt7620a-systick", "ralink,cevt-systick";
+ reg = <0xd00 0x10>;
+
+ resets = <&rstctrl 28>;
+ reset-names = "intc";
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <7>;
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ };
+
+ ephy_pins: ephy {
+ ephy {
+ groups = "ephy";
+ function = "ephy";
+ };
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ spi_cs1: spi1 {
+ spi1 {
+ groups = "spi refclk";
+ function = "spi refclk";
+ };
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ uartlite_pins: uartlite {
+ uart {
+ groups = "uartlite";
+ function = "uartlite";
+ };
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,mt7620a-reset", "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ usbphy: usbphy {
+ compatible = "mediatek,mt7620-usbphy";
+ #phy-cells = <0>;
+
+ ralink,sysctl = <&sysc>;
+ resets = <&rstctrl 22 &rstctrl 25>;
+ reset-names = "host", "device";
+
+ clocks = <&clkctrl 22 &clkctrl 25>;
+ clock-names = "host", "device";
+ };
+
+ ethernet: ethernet@10100000 {
+ compatible = "mediatek,mt7620-eth";
+ reg = <0x10100000 0x10000>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <5>;
+
+ resets = <&rstctrl 21 &rstctrl 23>;
+ reset-names = "fe", "esw";
+
+ mediatek,switch = <&gsw>;
+ };
+
+ gsw: gsw@10110000 {
+ compatible = "mediatek,mt7620-gsw";
+ reg = <0x10110000 0x8000>;
+
+ resets = <&rstctrl 23>;
+ reset-names = "esw";
+
+ interrupt-parent = <&intc>;
+ interrupts = <17>;
+ };
+
+ ehci: ehci@101c0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ehci";
+ reg = <0x101c0000 0x1000>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ status = "disabled";
+
+ ehci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ ohci: ohci@101c1000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ohci";
+ reg = <0x101c1000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ status = "disabled";
+
+ ohci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ wmac: wmac@10180000 {
+ compatible = "ralink,rt7620-wmac", "ralink,rt2880-wmac";
+ reg = <0x10180000 0x40000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <6>;
+
+ ralink,eeprom = "soc_wmac.eeprom";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts
new file mode 100644
index 0000000..24a8779
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts
@@ -0,0 +1,123 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rt-n12p", "ralink,mt7620n-soc";
+ model = "Asus RT-N12+";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ air {
+ label = "green:air";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "ephy", "wled", "i2c", "wdt", "pa", "spi refclk";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts
new file mode 100644
index 0000000..ce51ff8
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts
@@ -0,0 +1,136 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rt-n14u", "ralink,mt7620n-soc";
+ model = "Asus RT-N14U";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "blue:wan";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ air {
+ label = "blue:air";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "ephy", "wled", "i2c";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts
new file mode 100644
index 0000000..26803c0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts
@@ -0,0 +1,112 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "buffalo,wmr-300", "ralink,mt7620n-soc";
+ model = "Buffalo WMR-300";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ aoss1 {
+ label = "red:aoss";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ aoss2 {
+ label = "green:aoss";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "ephy";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts
new file mode 100644
index 0000000..c458f87
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts
@@ -0,0 +1,116 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "comfast,cf-wr800n", "ralink,mt7620n-soc";
+ model = "Comfast CF-WR800N";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ ethernet {
+ label = "white:ethernet";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "white:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "white:wps";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "ephy", "wled", "spi refclk", "i2c";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts
new file mode 100644
index 0000000..d659262
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts
@@ -0,0 +1,106 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dwr-116-a1", "ralink,mt7620n-soc";
+ model = "D-Link DWR-116 A1/A2";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0x7e0000>;
+ };
+
+ config: partition@7f0000 {
+ label = "config";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&state_default {
+ default {
+ groups = "i2c", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mediatek,portmap = "llllw";
+};
diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts
new file mode 100644
index 0000000..d37bdb4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts
@@ -0,0 +1,141 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dwr-921-c1", "ralink,mt7620n-soc";
+ model = "D-Link DWR-921 C1";
+
+ aliases {
+ led-boot = &led_sstrenghg;
+ led-failsafe = &led_sstrenghg;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ sms {
+ label = "green:sms";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_sstrenghg: sstrengthg {
+ label = "green:sigstrength";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ sstrengthr {
+ label = "red:sigstrength";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ 4g {
+ label = "green:4g";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ lte_modem_enable {
+ gpio-export,name = "lte_modem_enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0xfe0000>;
+ };
+
+ config: partition@ff0000 {
+ label = "config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&state_default {
+ default {
+ groups = "spi refclk", "i2c", "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts
new file mode 100644
index 0000000..d3ca0dd
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts
@@ -0,0 +1,144 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dwr-922-e2", "ralink,mt7620n-soc";
+ model = "D-Link DWR-922 E2";
+
+ aliases {
+ led-boot = &sstrengthg;
+ led-failsafe = &sstrengthg;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ led-boot = &sstrengthg;
+
+ sms {
+ label = "green:sms";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ sstrengthg: sstrengthg {
+ label = "green:sigstrength";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ sstrengthr {
+ label = "red:sigstrength";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ 4g {
+ label = "green:4g";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ lte_modem_enable {
+ gpio-export,name = "lte_modem_enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0xfe0000>;
+ };
+
+ config: partition@ff0000 {
+ label = "config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&state_default {
+ default {
+ groups = "spi refclk", "i2c", "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts
new file mode 100644
index 0000000..19d2f63
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts
@@ -0,0 +1,129 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
+ model = "ELECOM WRH-300CR";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+
+ ethernet {
+ label = "green:ethernet";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "recover";
+ reg = <0x50000 0x1c0000>;
+ read-only;
+ };
+
+ partition@210000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x210000 0xdf0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts b/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts
new file mode 100644
index 0000000..1c408bc
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620n_sunvalley_filehub.dtsi"
+
+/ {
+ compatible = "hootoo,ht-tm05", "ralink,mt7620n-soc";
+ model = "HooToo HT-TM05";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts b/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts
new file mode 100644
index 0000000..7d6d800
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts
@@ -0,0 +1,111 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "kimax,u35wf","ralink,mt7620n-soc";
+ model = "Kimax U35WF";
+
+ aliases {
+ led-boot = &led_wifi;
+ led-failsafe = &led_wifi;
+ led-running = &led_wifi;
+ led-upgrade = &led_wifi;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wifi: wifi {
+ label = "blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:eth";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts b/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts
new file mode 100644
index 0000000..1186b83
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts
@@ -0,0 +1,124 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "kingston,mlw221", "ralink,mt7620n-soc";
+ model = "Kingston MLW221";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ system {
+ label = "system";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf60000>;
+ };
+
+ partition@fb0000 {
+ label = "user-config";
+ reg = <0xfb0000 0x50000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts b/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts
new file mode 100644
index 0000000..eba7fab
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts
@@ -0,0 +1,124 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "kingston,mlwg2", "ralink,mt7620n-soc";
+ model = "Kingston MLWG2";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ system {
+ label = "system";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf60000>;
+ };
+
+ partition@fb0000 {
+ label = "user-config";
+ reg = <0xfb0000 0x50000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts b/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts
new file mode 100644
index 0000000..63cf38d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620n_netgear_n300.dtsi"
+
+/ {
+ compatible = "netgear,jwnr2010-v5", "ralink,mt7620n-soc";
+ model = "Netgear JWNR2010 v5";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = ðernet;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0radio";
+ };
+
+ lan1 {
+ label = "green:lan1";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ lan2 {
+ label = "green:lan2";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ lan3 {
+ label = "green:lan3";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ };
+
+ lan4 {
+ label = "green:lan4";
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi b/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi
new file mode 100644
index 0000000..6f5be57
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi
@@ -0,0 +1,83 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <30000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x20000 0x3c0000>;
+ };
+
+ partition@3e0000 {
+ label = "nvram";
+ reg = <0x3e0000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@3f0000 {
+ label = "factory";
+ reg = <0x3f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "pa", "ephy", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_nexx_wt3020-4m.dts b/target/linux/ramips/dts/mt7620n_nexx_wt3020-4m.dts
new file mode 100644
index 0000000..ed9170f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_nexx_wt3020-4m.dts
@@ -0,0 +1,46 @@
+#include "mt7620n_nexx_wt3020.dtsi"
+
+/ {
+ compatible = "nexx,wt3020-4m", "nexx,wt3020", "ralink,mt7620n-soc";
+ model = "Nexx WT3020 (4M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_nexx_wt3020-8m.dts b/target/linux/ramips/dts/mt7620n_nexx_wt3020-8m.dts
new file mode 100644
index 0000000..ac46ccb
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_nexx_wt3020-8m.dts
@@ -0,0 +1,54 @@
+#include "mt7620n_nexx_wt3020.dtsi"
+
+/ {
+ compatible = "nexx,wt3020-8m", "nexx,wt3020", "ralink,mt7620n-soc";
+ model = "Nexx WT3020 (8M)";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi b/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi
new file mode 100644
index 0000000..1597c08
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi
@@ -0,0 +1,56 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "nexx,wt3020", "ralink,mt7620n-soc";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = ðernet;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "ephy", "wled", "pa", "i2c", "wdt", "uartf";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts
new file mode 100644
index 0000000..320d61f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts
@@ -0,0 +1,27 @@
+#include "mt7620n_sunvalley_filehub.dtsi"
+
+/ {
+ compatible = "ravpower,rp-wd03", "ralink,mt7620n-soc";
+ model = "RAVPower RP-WD03";
+
+ aliases {
+ led-boot = &led_wifi_blue;
+ led-failsafe = &led_wifi_blue;
+ led-running = &led_wifi_blue;
+ led-upgrade = &led_wifi_blue;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi_green {
+ label = "green:wifi";
+ gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_wifi_blue: wifi_blue {
+ label = "blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi
new file mode 100644
index 0000000..20ff2db
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi
@@ -0,0 +1,138 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
+
+/ {
+ aliases {
+ label-mac-device = ðernet;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ virtual_flash {
+ compatible = "mtd-concat";
+
+ devices = <&fwconcat0 &fwconcat1 &fwconcat2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,ih-magic = <IH_MAGIC_OKLI>;
+ label = "firmware";
+ reg = <0x0 0x0>;
+ };
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "loader";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ fwconcat1: partition@60000 {
+ label = "fwconcat1";
+ reg = <0x60000 0x170000>;
+ };
+
+ partition@1d0000 {
+ label = "u-boot-env";
+ reg = <0x1d0000 0x10000>;
+ };
+
+ fwconcat2: partition@1e0000 {
+ label = "fwconcat2";
+ reg = <0x1e0000 0x20000>;
+ };
+
+ fwconcat0: partition@200000 {
+ label = "fwconcat0";
+ reg = <0x200000 0x600000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ gpio {
+ groups = "wled", "ephy";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts b/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts
new file mode 100644
index 0000000..97ed206
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts
@@ -0,0 +1,92 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "vonets,var11n-300", "ralink,mt7620n-soc";
+ model = "Vonets VAR11N-300";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts
new file mode 100644
index 0000000..144591d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts
@@ -0,0 +1,93 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "wrtnode,wrtnode", "ralink,mt7620n-soc";
+ model = "WRTNODE";
+
+ aliases {
+ led-boot = &led_indicator;
+ led-failsafe = &led_indicator;
+ led-running = &led_indicator;
+ led-upgrade = &led_indicator;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_indicator: indicator {
+ label = "blue:indicator";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "ephy", "wled", "pa", "i2c", "wdt", "uartf", "spi refclk";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts
new file mode 100644
index 0000000..6d018b9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts
@@ -0,0 +1,116 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-cpe102", "ralink,mt7620n-soc";
+ model = "Zbtlink ZBT-CPE102";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ led-boot = &led_4g_0;
+ led-failsafe = &led_4g_0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_4g_0: 4g-0 {
+ label = "green:4g-0";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ 4g-1 {
+ label = "green:4g-1";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ };
+
+ 4g-2 {
+ label = "green:4g-2";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x760000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts
new file mode 100644
index 0000000..b29c034
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts
@@ -0,0 +1,124 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-wa05", "ralink,mt7620n-soc";
+ model = "Zbtlink ZBT-WA05";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ air {
+ label = "blue:air";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x760000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts
new file mode 100644
index 0000000..fe17998
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts
@@ -0,0 +1,109 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-we2026", "ralink,mt7620n-soc";
+ model = "Zbtlink ZBT-WE2026";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "red:power";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x760000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts
new file mode 100644
index 0000000..af3ac4b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts
@@ -0,0 +1,123 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc";
+ model = "Zbtlink ZBT-WR8305RT";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_sys: sys {
+ label = "green:sys";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ default {
+ groups = "i2c", "uartf", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts
new file mode 100644
index 0000000..4e5c68e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts
@@ -0,0 +1,148 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,keenetic-omni-ii", "ralink,mt7620n-soc";
+ model = "ZyXEL Keenetic Omni II";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ fn {
+ label = "fn";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb_power {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "wdt", "pa", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts
new file mode 100644
index 0000000..e43f135
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts
@@ -0,0 +1,148 @@
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,keenetic-omni", "ralink,mt7620n-soc";
+ model = "ZyXEL Keenetic Omni";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ fn {
+ label = "fn";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb_power {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "wdt", "pa", "spi refclk", "wled";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ mediatek,portmap = "llllw";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi
new file mode 100644
index 0000000..7636f9d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -0,0 +1,628 @@
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/mips-gic.h>
+#include <dt-bindings/clock/mt7621-clk.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mediatek,mt7621-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ device_type = "cpu";
+ compatible = "mips,mips1004Kc";
+ reg = <0>;
+ };
+
+ cpu@1 {
+ device_type = "cpu";
+ compatible = "mips,mips1004Kc";
+ reg = <1>;
+ };
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ aliases {
+ serial0 = &uartlite;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ pll: pll {
+ compatible = "mediatek,mt7621-pll", "syscon";
+
+ #clock-cells = <1>;
+ clock-output-names = "cpu", "bus";
+ };
+
+ sysclock: sysclock {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+
+ /* FIXME: there should be way to detect this */
+ clock-frequency = <50000000>;
+ };
+
+ palmbus: palmbus@1E000000 {
+ compatible = "palmbus";
+ reg = <0x1E000000 0x100000>;
+ ranges = <0x0 0x1E000000 0x0FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "mtk,mt7621-sysc";
+ reg = <0x0 0x100>;
+ };
+
+ wdt: wdt@100 {
+ compatible = "mediatek,mt7621-wdt";
+ reg = <0x100 0x100>;
+ };
+
+ gpio: gpio@600 {
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ compatible = "mediatek,mt7621-gpio";
+ gpio-controller;
+ interrupt-controller;
+ reg = <0x600 0x100>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ i2c: i2c@900 {
+ compatible = "mediatek,mt7621-i2c";
+ reg = <0x900 0x100>;
+
+ clocks = <&sysclock>;
+
+ resets = <&rstctrl 16>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ };
+
+ i2s: i2s@a00 {
+ compatible = "mediatek,mt7621-i2s";
+ reg = <0xa00 0x100>;
+
+ clocks = <&sysclock>;
+
+ resets = <&rstctrl 17>;
+ reset-names = "i2s";
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 16 IRQ_TYPE_LEVEL_HIGH>;
+
+ txdma-req = <2>;
+ rxdma-req = <3>;
+
+ dmas = <&gdma 4>,
+ <&gdma 6>;
+ dma-names = "tx", "rx";
+
+ status = "disabled";
+ };
+
+ systick: systick@500 {
+ compatible = "ralink,mt7621-systick", "ralink,cevt-systick";
+ reg = <0x500 0x10>;
+
+ resets = <&rstctrl 28>;
+ reset-names = "intc";
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 5 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ memc: memc@5000 {
+ compatible = "mtk,mt7621-memc";
+ reg = <0x5000 0x1000>;
+ };
+
+ cpc: cpc@1fbf0000 {
+ compatible = "mtk,mt7621-cpc";
+ reg = <0x1fbf0000 0x8000>;
+ };
+
+ mc: mc@1fbf8000 {
+ compatible = "mtk,mt7621-mc";
+ reg = <0x1fbf8000 0x8000>;
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ns16550a";
+ reg = <0xc00 0x100>;
+
+ clock-frequency = <50000000>;
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>;
+
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ no-loopback-test;
+ };
+
+ uartlite2: uartlite2@d00 {
+ compatible = "ns16550a";
+ reg = <0xd00 0x100>;
+
+ clock-frequency = <50000000>;
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 27 IRQ_TYPE_LEVEL_HIGH>;
+
+ reg-shift = <2>;
+ reg-io-width = <4>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+
+ status = "disabled";
+ };
+
+ uartlite3: uartlite3@e00 {
+ compatible = "ns16550a";
+ reg = <0xe00 0x100>;
+
+ clock-frequency = <50000000>;
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 28 IRQ_TYPE_LEVEL_HIGH>;
+
+ reg-shift = <2>;
+ reg-io-width = <4>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3_pins>;
+
+ status = "disabled";
+ };
+
+ spi0: spi@b00 {
+ status = "disabled";
+
+ compatible = "ralink,mt7621-spi";
+ reg = <0xb00 0x100>;
+
+ clocks = <&pll MT7621_CLK_BUS>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>;
+ };
+
+ gdma: gdma@2800 {
+ compatible = "ralink,rt3883-gdma";
+ reg = <0x2800 0x800>;
+
+ resets = <&rstctrl 14>;
+ reset-names = "dma";
+
+ interrupt-parent = <&gic>;
+ interrupts = <0 13 4>;
+
+ #dma-cells = <1>;
+ #dma-channels = <16>;
+ #dma-requests = <16>;
+
+ status = "disabled";
+ };
+
+ hsdma: hsdma@7000 {
+ compatible = "mediatek,mt7621-hsdma";
+ reg = <0x7000 0x1000>;
+
+ resets = <&rstctrl 5>;
+ reset-names = "hsdma";
+
+ interrupt-parent = <&gic>;
+ interrupts = <0 11 4>;
+
+ #dma-cells = <1>;
+ #dma-channels = <1>;
+ #dma-requests = <1>;
+
+ status = "disabled";
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ uart1_pins: uart1 {
+ uart1 {
+ groups = "uart1";
+ function = "uart1";
+ };
+ };
+
+ uart2_pins: uart2 {
+ uart2 {
+ groups = "uart2";
+ function = "uart2";
+ };
+ };
+
+ uart3_pins: uart3 {
+ uart3 {
+ groups = "uart3";
+ function = "uart3";
+ };
+ };
+
+ rgmii1_pins: rgmii1 {
+ rgmii1 {
+ groups = "rgmii1";
+ function = "rgmii1";
+ };
+ };
+
+ rgmii2_pins: rgmii2 {
+ rgmii2 {
+ groups = "rgmii2";
+ function = "rgmii2";
+ };
+ };
+
+ mdio_pins: mdio {
+ mdio {
+ groups = "mdio";
+ function = "mdio";
+ };
+ };
+
+ pcie_pins: pcie {
+ pcie {
+ groups = "pcie";
+ function = "gpio";
+ };
+ };
+
+ nand_pins: nand {
+ spi-nand {
+ groups = "spi";
+ function = "nand1";
+ };
+
+ sdhci-nand {
+ groups = "sdhci";
+ function = "nand2";
+ };
+ };
+
+ sdhci_pins: sdhci {
+ sdhci {
+ groups = "sdhci";
+ function = "sdhci";
+ };
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ sdhci: sdhci@1E130000 {
+ status = "disabled";
+
+ compatible = "ralink,mt7620-sdhci";
+ reg = <0x1E130000 0x4000>;
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdhci_pins>;
+ };
+
+ xhci: xhci@1E1C0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compatible = "mediatek,mt8173-xhci";
+ reg = <0x1e1c0000 0x1000
+ 0x1e1d0700 0x0100>;
+ reg-names = "mac", "ippc";
+
+ clocks = <&sysclock>;
+ clock-names = "sys_ck";
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
+
+ /*
+ * Port 1 of both hubs is one usb slot and referenced here.
+ * The binding doesn't allow to address individual hubs.
+ * hub 1 - port 1 is ehci and ohci, hub 2 - port 1 is xhci.
+ */
+ xhci_ehci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+
+ /*
+ * Only the second usb hub has a second port. That port serves
+ * ehci and ohci.
+ */
+ ehci_port2: port@2 {
+ reg = <2>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ gic: interrupt-controller@1fbc0000 {
+ compatible = "mti,gic";
+ reg = <0x1fbc0000 0x2000>;
+
+ interrupt-controller;
+ #interrupt-cells = <3>;
+
+ mti,reserved-cpu-vectors = <7>;
+
+ timer {
+ compatible = "mti,gic-timer";
+ interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
+ clocks = <&pll MT7621_CLK_CPU>;
+ };
+ };
+
+ nficlock: nficlock {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+
+ clock-frequency = <125000000>;
+ };
+
+ nand: nand@1e003000 {
+ status = "disabled";
+
+ compatible = "mediatek,mt7621-nfc";
+ reg = <0x1e003000 0x800
+ 0x1e003800 0x800>;
+ reg-names = "nfi", "ecc";
+
+ clocks = <&nficlock>;
+ clock-names = "nfi_clk";
+ };
+
+ ethsys: syscon@1e000000 {
+ compatible = "mediatek,mt7621-ethsys",
+ "syscon";
+ reg = <0x1e000000 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ ethernet: ethernet@1e100000 {
+ compatible = "mediatek,mt7621-eth";
+ reg = <0x1e100000 0x10000>;
+
+ clocks = <&sysclock>;
+ clock-names = "ethif";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ resets = <&rstctrl 6 &rstctrl 23>;
+ reset-names = "fe", "eth";
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
+
+ mediatek,ethsys = <ðsys>;
+
+ gmac0: mac@0 {
+ compatible = "mediatek,eth-mac";
+ reg = <0>;
+ phy-mode = "rgmii";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ pause;
+ };
+ };
+
+ gmac1: mac@1 {
+ compatible = "mediatek,eth-mac";
+ reg = <1>;
+ status = "disabled";
+ phy-mode = "rgmii-rxid";
+ };
+
+ mdio: mdio-bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch0: switch@1f {
+ compatible = "mediatek,mt7621";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1f>;
+ mediatek,mcm;
+ resets = <&rstctrl 2>;
+ reset-names = "mcm";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+
+ port@0 {
+ status = "disabled";
+ reg = <0>;
+ label = "lan0";
+ };
+
+ port@1 {
+ status = "disabled";
+ reg = <1>;
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "disabled";
+ reg = <2>;
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "disabled";
+ reg = <3>;
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "disabled";
+ reg = <4>;
+ label = "lan4";
+ };
+
+ port@6 {
+ reg = <6>;
+ label = "cpu";
+ ethernet = <&gmac0>;
+ phy-mode = "rgmii";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
+ };
+
+ gsw: gsw@1e110000 {
+ compatible = "mediatek,mt7621-gsw";
+ reg = <0x1e110000 0x8000>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ pcie: pcie@1e140000 {
+ compatible = "mediatek,mt7621-pci";
+ reg = <0x1e140000 0x100 /* host-pci bridge registers */
+ 0x1e142000 0x100 /* pcie port 0 RC control registers */
+ 0x1e143000 0x100 /* pcie port 1 RC control registers */
+ 0x1e144000 0x100>; /* pcie port 2 RC control registers */
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_pins>;
+
+ device_type = "pci";
+
+ bus-range = <0 255>;
+ ranges = <
+ 0x02000000 0 0x00000000 0x60000000 0 0x10000000 /* pci memory */
+ 0x01000000 0 0x00000000 0x1e160000 0 0x00010000 /* io space */
+ >;
+
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH
+ GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH
+ GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
+
+ status = "disabled";
+
+ resets = <&rstctrl 24 &rstctrl 25 &rstctrl 26>;
+ reset-names = "pcie0", "pcie1", "pcie2";
+ clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>;
+ clock-names = "pcie0", "pcie1", "pcie2";
+ phys = <&pcie0_phy 1>, <&pcie2_phy 0>;
+ phy-names = "pcie-phy0", "pcie-phy2";
+
+ reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+
+ pcie0: pcie@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ bus-range = <0x00 0xff>;
+ };
+
+ pcie1: pcie@1,0 {
+ reg = <0x0800 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ bus-range = <0x00 0xff>;
+ };
+
+ pcie2: pcie@2,0 {
+ reg = <0x1000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ bus-range = <0x00 0xff>;
+ };
+ };
+
+ pcie0_phy: pcie-phy@1e149000 {
+ compatible = "mediatek,mt7621-pci-phy";
+ reg = <0x1e149000 0x0700>;
+ #phy-cells = <1>;
+ };
+
+ pcie2_phy: pcie-phy@1e14a000 {
+ compatible = "mediatek,mt7621-pci-phy";
+ reg = <0x1e14a000 0x0700>;
+ #phy-cells = <1>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts
new file mode 100644
index 0000000..3290a5e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts
@@ -0,0 +1,143 @@
+// 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>
+
+/ {
+ compatible = "adslr,g7", "mediatek,mt7621-soc";
+ model = "ADSLR G7";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_sys: sys {
+ label = "blue:sys";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe00c>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe00c>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
new file mode 100644
index 0000000..ed9e985
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
@@ -0,0 +1,148 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "afoundry,ew1200", "mediatek,mt7621-soc";
+ model = "EW1200";
+
+ aliases {
+ led-boot = &led_run;
+ led-failsafe = &led_run;
+ led-running = &led_run;
+ led-upgrade = &led_run;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_run: run {
+ label = "green:run";
+ gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts
new file mode 100644
index 0000000..e457dfc
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts
@@ -0,0 +1,259 @@
+// 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>
+
+/ {
+ compatible = "alfa-network,quad-e4g", "mediatek,mt7621-soc";
+ model = "ALFA Network Quad-E4G";
+
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ m2-enable {
+ gpio-export,name = "m2-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio 32 GPIO_ACTIVE_HIGH>;
+ };
+
+ minipcie0-enable {
+ gpio-export,name = "minipcie0-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
+ };
+
+ minipcie0-reset {
+ gpio-export,name = "minipcie0-reset";
+ gpio-export,output = <0>;
+ gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+ };
+
+ minipcie1-enable {
+ gpio-export,name = "minipcie1-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio 30 GPIO_ACTIVE_HIGH>;
+ };
+
+ minipcie1-reset {
+ gpio-export,name = "minipcie1-reset";
+ gpio-export,output = <0>;
+ gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
+ };
+
+ minipcie2-enable {
+ gpio-export,name = "minipcie2-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
+ };
+
+ minipcie2-reset {
+ gpio-export,name = "minipcie2-reset";
+ gpio-export,output = <0>;
+ gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ };
+
+ pcie-perst-disable {
+ gpio-export,name = "pcie-perst-enable";
+ gpio-export,output = <0>;
+ gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+ };
+
+ sim-select {
+ gpio-export,name = "sim-select";
+ gpio-export,output = <1>;
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ watchdog-enable {
+ gpio-export,name = "watchdog-enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ user1 {
+ label = "user1";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ user2 {
+ label = "user2";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "red:system";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ m2 {
+ label = "orange:m2";
+ gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
+ };
+
+ minipcie0 {
+ label = "orange:minipcie0";
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+
+ minipcie1 {
+ label = "orange:minipcie1";
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ };
+
+ minipcie2 {
+ label = "orange:minipcie2";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ watchdog {
+ compatible = "linux,wdt-gpio";
+ gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+ hw_algo = "toggle";
+ hw_margin_ms = <25000>;
+ always-running;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+
+ rtc@68 {
+ compatible = "ti,bq32000";
+ reg = <0x68>;
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "rgmii2", "wdt";
+ function = "gpio";
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x1000>;
+ };
+
+ partition@31000 {
+ label = "config";
+ reg = <0x31000 0xf000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&uartlite2 {
+ status = "okay";
+};
+
+&uartlite3 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally-00x19k.dts b/target/linux/ramips/dts/mt7621_ampedwireless_ally-00x19k.dts
new file mode 100644
index 0000000..51d41c7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally-00x19k.dts
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_ampedwireless_ally.dtsi"
+
+/ {
+ compatible = "ampedwireless,ally-00x19k", "mediatek,mt7621-soc";
+ model = "Amped Wireless ALLY-00X19K";
+};
+
+&switch0 {
+ ports {
+ port@2 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts b/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts
new file mode 100644
index 0000000..cd2536e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_ampedwireless_ally.dtsi"
+
+/ {
+ compatible = "ampedwireless,ally-r1900k", "mediatek,mt7621-soc";
+ model = "Amped Wireless ALLY-R1900K";
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan3";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi b/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi
new file mode 100644
index 0000000..7736b06
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi
@@ -0,0 +1,179 @@
+// 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>
+
+/ {
+ aliases {
+ led-boot = &led_status_amber;
+ led-failsafe = &led_status_amber;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_red;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ led_switch {
+ label = "led_switch";
+ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_LIGHTS_TOGGLE>;
+ linux,input-type = <EV_SW>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_green: status_green {
+ label = "green:status";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_status_amber: status_amber {
+ label = "amber:status";
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7615";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7615";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "u-boot-env";
+ reg = <0x80000 0x80000>;
+ };
+
+ factory: partition@100000 {
+ label = "factory";
+ reg = <0x100000 0x40000>;
+ read-only;
+ };
+
+ /*
+ * uboot expects to find kernels at 0x140000 & 0x2140000,
+ * referred to as Uimage & Uimage1 in factory FW, respectively.
+ * U-boot variable 'bootImage' controls which is booted;
+ * 0 for the first, 1 for the 2nd.
+ * There's a 3rd partition, Uimage2 (0x4140000), which
+ * I expected to be a recovery image, but is actually blank.
+ *
+ * A kernel is considered suitable for handing control over
+ * if its linux magic number exists & uImage CRC are correct.
+ * If either of those conditions fail, 'bootImage' value
+ * is toggled in uboot env & a restart performed in the hope that the
+ * alternate kernel is okay.
+ *
+ * Note uboot's tftp flash install writes the transferred
+ * image to the active kernel partition.
+ */
+
+ partition@140000 {
+ label = "kernel";
+ reg = <0x140000 0x400000>;
+ };
+
+ partition@540000 {
+ label = "ubi";
+ reg = <0x540000 0x1c00000>;
+ };
+
+ partition@2140000 {
+ label = "oem";
+ reg = <0x2140000 0x2000000>;
+ };
+
+ partition@4140000 {
+ label = "backup";
+ reg = <0x4140000 0x2000000>;
+ };
+
+ partition@6140000 {
+ label = "chime";
+ reg = <0x6140000 0xa00000>;
+ };
+
+ partition@6b40000 {
+ label = "data";
+ reg = <0x6b40000 0xa00000>;
+ };
+
+ partition@7540000 {
+ label = "reserved";
+ reg = <0x7540000 0x840000>;
+ read-only;
+ };
+
+ partition@7d80000 {
+ label = "nvram";
+ reg = <0x7d80000 0x100000>;
+ read-only;
+ };
+
+ partition@7e80000 {
+ label = "hwconfig";
+ reg = <0x7e80000 0x100000>;
+ read-only;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
new file mode 100644
index 0000000..cf91dc0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_asiarf_ap7621.dtsi"
+
+/ {
+ compatible = "asiarf,ap7621-001", "mediatek,mt7621-soc";
+ model = "AsiaRF AP7621-001";
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
new file mode 100644
index 0000000..5a4c03f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_asiarf_ap7621.dtsi"
+
+/ {
+ compatible = "asiarf,ap7621-nv1", "mediatek,mt7621-soc";
+ model = "AsiaRF AP7621-NV1";
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
new file mode 100644
index 0000000..b011c7a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
@@ -0,0 +1,111 @@
+// 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>
+
+/ {
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan1 {
+ label = "orange:wlan1";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan0 {
+ label = "orange:wlan0";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x2000>;
+ };
+
+ partition@32000 {
+ label = "2860";
+ reg = <0x32000 0x4000>;
+ };
+
+ partition@36000 {
+ label = "rtdev";
+ reg = <0x36000 0x2000>;
+ };
+
+ partition@38000 {
+ label = "Reserve";
+ reg = <0x38000 0x8000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xfa0000>;
+ compatible = "denx,uimage";
+ };
+
+ partition@ff0000 {
+ label = "nvram";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts
new file mode 100644
index 0000000..dcf5cea
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts
@@ -0,0 +1,171 @@
+// 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>
+
+/ {
+ compatible = "asus,rt-ac57u", "mediatek,mt7621-soc";
+ model = "ASUS RT-AC57U";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ debounce-interval = <60>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <60>;
+ };
+ };
+
+ led-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "LED-Power";
+ gpio = <&gpio 46 GPIO_ACTIVE_LOW>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "sdhci";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac65p.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac65p.dts
new file mode 100644
index 0000000..9be178e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asus_rt-ac65p.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_asus_rt-acx5p.dtsi"
+
+/ {
+ compatible = "asus,rt-ac65p", "mediatek,mt7621-soc";
+ model = "ASUS RT-AC65P";
+};
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac85p.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac85p.dts
new file mode 100644
index 0000000..cc8e0c2
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asus_rt-ac85p.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_asus_rt-acx5p.dtsi"
+
+/ {
+ compatible = "asus,rt-ac85p", "mediatek,mt7621-soc";
+ model = "ASUS RT-AC85P";
+};
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
new file mode 100644
index 0000000..b5e8655
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
@@ -0,0 +1,171 @@
+// 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>
+
+/ {
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1radio";
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0radio";
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0xe0000>;
+ read-only;
+ };
+
+ partition@e0000 {
+ label = "u-boot-env";
+ reg = <0xe0000 0x100000>;
+ read-only;
+ };
+
+ factory: partition@1e0000 {
+ label = "factory";
+ reg = <0x1e0000 0x100000>;
+ read-only;
+ };
+
+ factory2: partition@2e0000 {
+ label = "factory2";
+ reg = <0x2e0000 0x100000>;
+ read-only;
+ };
+
+ partition@3e0000 {
+ label = "kernel";
+ reg = <0x3e0000 0x400000>;
+ };
+
+ partition@7e0000 {
+ label = "ubi";
+ reg = <0x7e0000 0x2e00000>;
+ };
+
+ partition@35e0000 {
+ label = "firmware2";
+ reg = <0x35e0000 0x3200000>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi0: wifi@0,0 {
+ compatible = "pci14c3,7615";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi1: wifi@0,0 {
+ compatible = "pci14c3,7615";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "i2c";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
new file mode 100644
index 0000000..b78e594
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
@@ -0,0 +1,181 @@
+// 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>
+
+/ {
+ compatible = "asus,rt-n56u-b1", "mediatek,mt7621-soc";
+ model = "ASUS RT-N56U B1";
+
+ aliases {
+ label-mac-device = &wan;
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wan {
+ label = "blue:wan";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ debounce-interval = <60>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x8004>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "uart2", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
new file mode 100644
index 0000000..f921146
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
@@ -0,0 +1,212 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "buffalo,wsr-1166dhp", "mediatek,mt7621-soc";
+ model = "Buffalo WSR-1166DHP";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ internet_g {
+ label = "green:internet";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ router_g {
+ label = "green:router";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ router_o {
+ label = "orange:router";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ internet_o {
+ label = "orange:internet";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi_o {
+ label = "orange:wifi";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ };
+
+ diag {
+ label = "orange:diag";
+ gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi_g {
+ label = "green:wifi";
+ gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ power {
+ label = "power";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_POWER>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ auto {
+ label = "mode";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ router {
+ label = "router";
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
+ gpio_poweroff {
+ compatible = "gpio-poweroff";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "openwrt,trx";
+ label = "firmware";
+ reg = <0x50000 0xf90000>;
+ };
+
+ partition@fe0000 {
+ label = "board_data";
+ reg = <0xfe0000 0x20000>;
+ };
+ };
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
new file mode 100644
index 0000000..048eac5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
@@ -0,0 +1,231 @@
+// 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>
+
+/ {
+ compatible = "buffalo,wsr-2533dhpl", "mediatek,mt7621-soc";
+ model = "Buffalo WSR-2533DHPL";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_diag;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ internet_green {
+ label = "green:internet";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ router_green {
+ label = "green:router";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ router_amber {
+ label = "amber:router";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ internet_amber {
+ label = "amber:internet";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless_amber {
+ label = "amber:wireless";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ };
+
+ led_diag: diag {
+ label = "amber:diag";
+ gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless_green {
+ label = "green:wireless";
+ gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ auto {
+ label = "auto";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ bridge {
+ label = "wb";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ linux,input-type = <EV_SW>;
+ };
+
+ router {
+ label = "router";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ linux,input-type = <EV_SW>;
+ };
+
+ power {
+ label = "power";
+ gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_POWER>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "openwrt,trx";
+ label = "firmware";
+ reg = <0x50000 0x7c0000>;
+ };
+
+ partition@810000 {
+ label = "Kernel2";
+ reg = <0x810000 0x7c0000>;
+ read-only;
+ };
+
+ partition@fd0000 {
+ label = "glbcfg";
+ reg = <0xfd0000 0x010000>;
+ read-only;
+ };
+
+ partition@fe0000 {
+ label = "board_data";
+ reg = <0xfe0000 0x20000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <(-1)>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "wdt", "sdhci";
+ function = "gpio";
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
new file mode 100644
index 0000000..7392b1d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
@@ -0,0 +1,210 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "buffalo,wsr-600dhp", "mediatek,mt7621-soc";
+ model = "Buffalo WSR-600DHP";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi_o {
+ label = "orange:wifi";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ diag {
+ label = "orange:diag";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi_g {
+ label = "green:wifi";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ router_o {
+ label = "orange:router";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ };
+
+ router_g {
+ label = "green:router";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ };
+
+ internet_o {
+ label = "orange:internet";
+ gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
+ };
+
+ internet_g {
+ label = "green:internet";
+ gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ power {
+ label = "power";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_POWER>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ auto {
+ label = "mode";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ router {
+ label = "router";
+ gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
+ gpio_poweroff {
+ compatible = "gpio-poweroff";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ rt5592@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts
new file mode 100644
index 0000000..a66ce94
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts
@@ -0,0 +1,195 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "cudy,wr1300", "mediatek,mt7621-soc";
+ model = "Cudy WR1300";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_sys: sys {
+ label = "green:sys";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+
+ partition@fd0000 {
+ label = "debug";
+ reg = <0xfd0000 0x10000>;
+ read-only;
+ };
+
+ partition@fe0000 {
+ label = "backup";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+
+ bdinfo: partition@ff0000 {
+ label = "bdinfo";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ mtd-mac-address = <&bdinfo 0xde00>;
+ ieee80211-freq-limit = <2400000 2500000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ mtd-mac-address = <&bdinfo 0xde00>;
+ mtd-mac-address-increment = <2>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&bdinfo 0xde00>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&bdinfo 0xde00>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "i2c", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts
new file mode 100644
index 0000000..692c94d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts
@@ -0,0 +1,201 @@
+// 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>
+
+/ {
+ compatible = "cudy,wr2100", "mediatek,mt7621-soc";
+ model = "Cudy WR2100";
+
+ aliases {
+ led-boot = &led_internet_blue;
+ led-failsafe = &led_internet_blue;
+ led-running = &led_internet_blue;
+ led-upgrade = &led_internet_blue;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_internet_blue: internet_blue {
+ label = "blue:internet";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ internet_red {
+ label = "red:internet";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ lan1 {
+ label = "green:lan1";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ lan2 {
+ label = "green:lan2";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+
+ lan3 {
+ label = "green:lan3";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ lan4 {
+ label = "green:lan4";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&bdinfo 0xde00>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@1,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+
+ partition@fd0000 {
+ label = "debug";
+ reg = <0xfd0000 0x10000>;
+ read-only;
+ };
+
+ partition@fe0000 {
+ label = "backup";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+
+ bdinfo: partition@ff0000 {
+ label = "bdinfo";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+
+ mtd-mac-address = <&bdinfo 0xde00>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
new file mode 100644
index 0000000..5622855
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
@@ -0,0 +1,190 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "d-team,newifi-d2", "mediatek,mt7621-soc";
+ model = "Newifi-D2";
+
+ aliases {
+ led-boot = &led_power_blue;
+ led-failsafe = &led_power_blue;
+ led-running = &led_power_blue;
+ led-upgrade = &led_power_blue;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power-amber {
+ label = "amber:power";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_blue: power-blue {
+ label = "blue:power";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ internet-amber {
+ label = "amber:internet";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ internet-blue {
+ label = "blue:internet";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ power_usb3 {
+ gpio-export,name = "power_usb3";
+ gpio-export,output = <1>;
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <45000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uart2", "uart3";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts
new file mode 100644
index 0000000..2fcdce5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts
@@ -0,0 +1,216 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "d-team,pbr-m1", "mediatek,mt7621-soc";
+ model = "PBR-M1";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "blue:power";
+ gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_sys: sys {
+ label = "blue:sys";
+ gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ power_usb2 {
+ gpio-export,name = "power_usb2";
+ gpio-export,output = <1>;
+ gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_usb3 {
+ gpio-export,name = "power_usb3";
+ gpio-export,output = <1>;
+ gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_sata {
+ gpio-export,name = "power_sata";
+ gpio-export,output = <1>;
+ gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ beeper: beeper {
+ compatible = "gpio-beeper";
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&i2c {
+ status = "okay";
+
+ rtc@51 {
+ status = "okay";
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&pinctrl {
+ uart3_gpio: uart3-gpio {
+ uart3 {
+ groups = "uart3";
+ function = "gpio";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+ pinctrl-0 = <&pcie_pins>, <&uart3_gpio>;
+ reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
+ <&gpio 7 GPIO_ACTIVE_LOW>;
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "rgmii2", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
new file mode 100644
index 0000000..0f4fbc1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-xx60-a1.dtsi"
+
+/ {
+ compatible = "dlink,dir-1960-a1", "mediatek,mt7621-soc";
+ model = "D-Link DIR-1960 A1";
+};
+
+&leds {
+ usb_white {
+ label = "white:usb";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+};
+
+&wifi0 {
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+};
+
+&wifi1 {
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <2>;
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
new file mode 100644
index 0000000..323a790
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-xx60-a1.dtsi"
+
+/ {
+ compatible = "dlink,dir-2640-a1", "mediatek,mt7621-soc";
+ model = "D-Link DIR-2640 A1";
+};
+
+&leds {
+ usb2_white {
+ label = "white:usb2";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ usb3_white {
+ label = "white:usb3";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+};
+
+&wifi0 {
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+};
+
+&wifi1 {
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <2>;
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
new file mode 100644
index 0000000..fbf233d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-xx60-a1.dtsi"
+
+/ {
+ compatible = "dlink,dir-2660-a1", "mediatek,mt7621-soc";
+ model = "D-Link DIR-2660 A1";
+};
+
+&leds {
+ usb2_white {
+ label = "white:usb2";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ usb3_white {
+ label = "white:usb3";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+};
+
+&wifi0 {
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+};
+
+&wifi1 {
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <2>;
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
new file mode 100644
index 0000000..f843f62
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
@@ -0,0 +1,172 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-860l-b1", "mediatek,mt7621-soc";
+ model = "D-Link DIR-860L B1";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "orange:power";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_green: power2 {
+ label = "green:power";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ net {
+ label = "orange:net";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ net2 {
+ label = "green:net";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x4000>;
+ read-only;
+ };
+
+ radio: partition@34000 {
+ label = "radio";
+ reg = <0x34000 0x4000>;
+ read-only;
+ };
+
+ factory: partition@38000 {
+ label = "factory";
+ reg = <0x38000 0x8000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "defaults";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "seama";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&radio 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+
+ reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
+ <&gpio 8 GPIO_ACTIVE_LOW>;
+};
+
+&pcie0 {
+ wifi0: mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x2000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi1: mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts
new file mode 100644
index 0000000..b2ba5ec
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-8xx-a1.dtsi"
+
+/ {
+ compatible = "dlink,dir-867-a1", "mediatek,mt7621-soc";
+ model = "D-Link DIR-867 A1";
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts
new file mode 100644
index 0000000..4bfe5ca
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-8xx-a1.dtsi"
+
+/ {
+ compatible = "dlink,dir-878-a1", "mediatek,mt7621-soc";
+ model = "D-Link DIR-878 A1";
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts
new file mode 100644
index 0000000..cef0705
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-8xx-a1.dtsi"
+#include "mt7621_dlink_dir-882-x1.dtsi"
+
+/ {
+ compatible = "dlink,dir-882-a1", "mediatek,mt7621-soc";
+ model = "D-Link DIR-882 A1";
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts
new file mode 100644
index 0000000..26b6f34
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-8xx-r1.dtsi"
+#include "mt7621_dlink_dir-882-x1.dtsi"
+
+/ {
+ compatible = "dlink,dir-882-r1", "mediatek,mt7621-soc";
+ model = "D-Link DIR-882 R1";
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-882-x1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-882-x1.dtsi
new file mode 100644
index 0000000..cafb1df
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-882-x1.dtsi
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+&leds {
+ usb2 {
+ label = "green:usb2";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ usb3 {
+ label = "green:usb3";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-8xx-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx-a1.dtsi
new file mode 100644
index 0000000..95ef0af
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx-a1.dtsi
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-8xx-x1.dtsi"
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x20000>;
+ read-only;
+ };
+
+ partition@60000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,padding = <96>;
+ label = "firmware";
+ reg = <0x60000 0xfa0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-8xx-r1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx-r1.dtsi
new file mode 100644
index 0000000..e93a06d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx-r1.dtsi
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-8xx-x1.dtsi"
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-8xx-x1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx-x1.dtsi
new file mode 100644
index 0000000..7ab0e8b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx-x1.dtsi
@@ -0,0 +1,133 @@
+// 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>
+
+/ {
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_power_orange;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_net_orange;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ wifi {
+ label = "wifi";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+
+ led_power_orange: power_orange {
+ label = "orange:power";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_green: power_green {
+ label = "green:power";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ led_net_orange: net_orange {
+ label = "orange:net";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ net_green {
+ label = "green:net";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
new file mode 100644
index 0000000..a54b2be
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
@@ -0,0 +1,193 @@
+// 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>
+
+/ {
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_power_orange;
+ led-failsafe = &led_power_white;
+ led-running = &led_power_white;
+ led-upgrade = &led_net_orange;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+
+ led_power_orange: power_orange {
+ label = "orange:power";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_white: power_white {
+ label = "white:power";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ led_net_orange: net_orange {
+ label = "orange:net";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ net_white {
+ label = "white:net";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "config";
+ reg = <0x80000 0x80000>;
+ read-only;
+ };
+
+ factory: partition@100000 {
+ label = "factory";
+ reg = <0x100000 0x40000>;
+ read-only;
+ };
+
+ partition@140000 {
+ label = "config2";
+ reg = <0x140000 0x40000>;
+ read-only;
+ };
+
+ partition@180000 {
+ label = "firmware";
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,padding = <96>;
+ reg = <0x180000 0x2800000>;
+ };
+
+ partition@2980000 {
+ label = "private";
+ reg = <0x2980000 0x2000000>;
+ read-only;
+ };
+
+ partition@4980000 {
+ label = "firmware2";
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,padding = <96>;
+ reg = <0x4980000 0x2800000>;
+ };
+
+ partition@7180000 {
+ label = "mydlink";
+ reg = <0x7180000 0x600000>;
+ read-only;
+ };
+
+ partition@7780000 {
+ label = "reserved";
+ reg = <0x7780000 0x880000>;
+ read-only;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi0: wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi1: wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_edimax_ra21s.dts b/target/linux/ramips/dts/mt7621_edimax_ra21s.dts
new file mode 100644
index 0000000..1aea949
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_edimax_ra21s.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_edimax_rx21s.dtsi"
+
+/ {
+ compatible = "edimax,ra21s", "mediatek,mt7621-soc";
+ model = "Edimax RA21S";
+};
diff --git a/target/linux/ramips/dts/mt7621_edimax_re23s.dts b/target/linux/ramips/dts/mt7621_edimax_re23s.dts
new file mode 100644
index 0000000..9b96573
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_edimax_re23s.dts
@@ -0,0 +1,161 @@
+// 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/mtd/partitions/uimage.h>
+
+/ {
+ compatible = "edimax,re23s", "mediatek,mt7621-soc";
+ model = "Edimax RE23S";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_wifi_red;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+ };
+
+ wifi_green {
+ label = "green:wifi";
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ wifi_amber {
+ label = "amber:wifi";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_wifi_red: wifi_red {
+ label = "red:wifi";
+ gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "cimage";
+ reg = <0x50000 0x20000>;
+ read-only;
+ };
+
+ partition@70000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,offset = <FW_EDIMAX_OFFSET>;
+ openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
+ label = "firmware";
+ reg = <0x70000 0xf50000>;
+ };
+
+ partition@fc0000 {
+ label = "freespace";
+ reg = <0xfc0000 0x40000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x8004>;
+};
+
+&switch0 {
+ ports {
+ port@4 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "uart2", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_edimax_rg21s.dts b/target/linux/ramips/dts/mt7621_edimax_rg21s.dts
new file mode 100644
index 0000000..6ac01dd
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_edimax_rg21s.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_edimax_rx21s.dtsi"
+
+/ {
+ compatible = "edimax,rg21s", "mediatek,mt7621-soc";
+ model = "Edimax RG21S";
+};
diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
new file mode 100644
index 0000000..3f3bae4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
@@ -0,0 +1,162 @@
+// 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>
+
+/ {
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: led_1 {
+ label = "red:led1";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_2 {
+ label = "red:led2";
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_3 {
+ label = "red:led3";
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_4 {
+ label = "red:led4";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi0: wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi1: wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "uart2", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
new file mode 100644
index 0000000..b6a7383
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
@@ -0,0 +1,178 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "elecom,wrc-1167ghbk2-s", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-1167GHBK2-S";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan2g {
+ label = "white:wlan2g";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0radio";
+ };
+
+ wlan5g {
+ label = "white:wlan5g";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_green: power_green {
+ label = "green:power";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_blue {
+ label = "blue:power";
+ gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ wps {
+ label = "red:wps";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_red {
+ label = "red:power";
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf20000>;
+ };
+
+ partition@f70000 {
+ label = "user_data";
+ reg = <0xf70000 0x80000>;
+ read-only;
+ };
+
+ partition@ff0000 {
+ label = "NVRAM";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
new file mode 100644
index 0000000..6349fd4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_elecom_wrc-gs-1pci.dtsi"
+
+/ {
+ compatible = "elecom,wrc-1167gs2-b", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-1167GS2-B";
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xfff4>;
+};
+
+&wan {
+ mtd-mac-address = <&factory 0xfffa>;
+};
+
+&partitions {
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xb00000>;
+ };
+
+ partition@b50000 {
+ label = "tm_pattern";
+ reg = <0xb50000 0x380000>;
+ read-only;
+ };
+
+ partition@ed0000 {
+ label = "tm_key";
+ reg = <0xed0000 0x80000>;
+ read-only;
+ };
+
+ partition@f50000 {
+ label = "nvram";
+ reg = <0xf50000 0x30000>;
+ read-only;
+ };
+
+ partition@f80000 {
+ label = "user_data";
+ reg = <0xf80000 0x80000>;
+ read-only;
+ };
+};
+
+&wifi {
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <(-1)>;
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
new file mode 100644
index 0000000..11b7824
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_elecom_wrc-gs-1pci.dtsi"
+
+/ {
+ compatible = "elecom,wrc-1167gst2", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-1167GST2";
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&wan {
+ mtd-mac-address = <&factory 0xe006>;
+};
+
+&partitions {
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1800000>;
+ };
+
+ partition@1850000 {
+ label = "tm_pattern";
+ reg = <0x1850000 0x400000>;
+ read-only;
+ };
+
+ partition@1c50000 {
+ label = "tm_key";
+ reg = <0x1c50000 0x100000>;
+ read-only;
+ };
+
+ partition@1d50000 {
+ label = "nvram";
+ reg = <0x1d50000 0xb0000>;
+ read-only;
+ };
+
+ partition@1e00000 {
+ label = "user_data";
+ reg = <0x1e00000 0x200000>;
+ read-only;
+ };
+};
+
+&wifi {
+ mtd-mac-address = <&factory 0xe006>;
+ mtd-mac-address-increment = <1>;
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts
new file mode 100644
index 0000000..71e4c16
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_elecom_wrc-gs-2pci.dtsi"
+
+/ {
+ compatible = "elecom,wrc-1750gs", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-1750GS";
+};
+
+&partitions {
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xb00000>;
+ };
+
+ partition@b50000 {
+ label = "tm_pattern";
+ reg = <0xb50000 0x380000>;
+ read-only;
+ };
+
+ partition@ed0000 {
+ label = "tm_key";
+ reg = <0xed0000 0x80000>;
+ read-only;
+ };
+
+ partition@f50000 {
+ label = "art_block";
+ reg = <0xf50000 0x30000>;
+ read-only;
+ };
+
+ partition@f80000 {
+ label = "user_data";
+ reg = <0xf80000 0x80000>;
+ read-only;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts
new file mode 100644
index 0000000..4b8888c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_elecom_wrc-gs-2pci.dtsi"
+
+/ {
+ compatible = "elecom,wrc-1750gst2", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-1750GST2";
+};
+
+&partitions {
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1800000>;
+ };
+
+ partition@1850000 {
+ label = "tm_pattern";
+ reg = <0x1850000 0x400000>;
+ read-only;
+ };
+
+ partition@1c50000 {
+ label = "tm_key";
+ reg = <0x1c50000 0x100000>;
+ read-only;
+ };
+
+ partition@1d50000 {
+ label = "nvram";
+ reg = <0x1d50000 0xb0000>;
+ read-only;
+ };
+
+ partition@1e00000 {
+ label = "user_data";
+ reg = <0x1e00000 0x200000>;
+ read-only;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts
new file mode 100644
index 0000000..6719c34
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_elecom_wrc-gs-2pci.dtsi"
+
+/ {
+ compatible = "elecom,wrc-1750gsv", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-1750GSV";
+};
+
+&partitions {
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xb00000>;
+ };
+
+ partition@b50000 {
+ label = "tm_pattern";
+ reg = <0xb50000 0x380000>;
+ read-only;
+ };
+
+ partition@ed0000 {
+ label = "tm_key";
+ reg = <0xed0000 0x80000>;
+ read-only;
+ };
+
+ partition@f50000 {
+ label = "nvram";
+ reg = <0xf50000 0x30000>;
+ read-only;
+ };
+
+ partition@f80000 {
+ label = "user_data";
+ reg = <0xf80000 0x80000>;
+ read-only;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
new file mode 100644
index 0000000..675e086
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_elecom_wrc-gs-2pci.dtsi"
+
+/ {
+ compatible = "elecom,wrc-1900gst", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-1900GST";
+};
+
+&partitions {
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xb00000>;
+ };
+
+ partition@b50000 {
+ label = "tm_pattern";
+ reg = <0xb50000 0x380000>;
+ read-only;
+ };
+
+ partition@ed0000 {
+ label = "tm_key";
+ reg = <0xed0000 0x80000>;
+ read-only;
+ };
+
+ partition@f50000 {
+ label = "art_block";
+ reg = <0xf50000 0x30000>;
+ read-only;
+ };
+
+ partition@f80000 {
+ label = "user_data";
+ reg = <0xf80000 0x80000>;
+ read-only;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts
new file mode 100644
index 0000000..a5436d5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts
@@ -0,0 +1,199 @@
+// 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>
+
+/ {
+ compatible = "elecom,wrc-2533ghbk-i", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-2533GHBK-I";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "red:wps";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_power: power {
+ label = "white:power";
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan2g {
+ label = "white:wlan2g";
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0radio";
+ };
+
+ wlan5g {
+ label = "white:wlan5g";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy1radio";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ auto {
+ label = "auto";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x9a0000>;
+ };
+
+ partition@9f0000 {
+ label = "TM_1";
+ reg = <0x9f0000 0x200000>;
+ read-only;
+ };
+
+ partition@bf0000 {
+ label = "TM_2";
+ reg = <0xbf0000 0x200000>;
+ read-only;
+ };
+
+ partition@df0000 {
+ label = "manufacture";
+ reg = <0xdf0000 0x180000>;
+ read-only;
+ };
+
+ partition@f70000 {
+ label = "backup";
+ reg = <0xf70000 0x10000>;
+ read-only;
+ };
+
+ partition@f80000 {
+ label = "storage";
+ reg = <0xf80000 0x80000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
new file mode 100644
index 0000000..dacd540
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
@@ -0,0 +1,38 @@
+#include "mt7621_elecom_wrc-gs-2pci.dtsi"
+
+/ {
+ compatible = "elecom,wrc-2533gst", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-2533GST";
+};
+
+&partitions {
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xb00000>;
+ };
+
+ partition@b50000 {
+ label = "tm_pattern";
+ reg = <0xb50000 0x380000>;
+ read-only;
+ };
+
+ partition@ed0000 {
+ label = "tm_key";
+ reg = <0xed0000 0x80000>;
+ read-only;
+ };
+
+ partition@f50000 {
+ label = "art_block";
+ reg = <0xf50000 0x30000>;
+ read-only;
+ };
+
+ partition@f80000 {
+ label = "user_data";
+ reg = <0xf80000 0x80000>;
+ read-only;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts
new file mode 100644
index 0000000..a998b61
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_elecom_wrc-gs-2pci.dtsi"
+
+/ {
+ compatible = "elecom,wrc-2533gst2", "mediatek,mt7621-soc";
+ model = "ELECOM WRC-2533GST2";
+};
+
+&partitions {
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1800000>;
+ };
+
+ partition@1850000 {
+ label = "tm_pattern";
+ reg = <0x1850000 0x400000>;
+ read-only;
+ };
+
+ partition@1c50000 {
+ label = "tm_key";
+ reg = <0x1c50000 0x100000>;
+ read-only;
+ };
+
+ partition@1d50000 {
+ label = "nvram";
+ reg = <0x1d50000 0xb0000>;
+ read-only;
+ };
+
+ partition@1e00000 {
+ label = "user_data";
+ reg = <0x1e00000 0x200000>;
+ read-only;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi
new file mode 100644
index 0000000..7495453
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_elecom_wrc-gs.dtsi"
+
+&leds {
+ wlan2g {
+ label = "white:wlan2g";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "white:wlan5g";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "jtag", "wdt", "sdhci";
+ function = "gpio";
+ };
+};
+
+&pcie0 {
+ wifi: wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
new file mode 100644
index 0000000..642724d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_elecom_wrc-gs.dtsi"
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&wan {
+ mtd-mac-address = <&factory 0xe006>;
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "jtag", "wdt", "sdhci";
+ function = "gpio";
+ };
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+
+ led {
+ led-sources = <0>;
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <0>;
+ led-active-low;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi
new file mode 100644
index 0000000..9cf2b66
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi
@@ -0,0 +1,155 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ label-mac-device = &wan;
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+
+ led_power_green: power_green {
+ label = "green:power";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_blue {
+ label = "blue:power";
+ gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ wps {
+ label = "red:wps";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_red {
+ label = "red:power";
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ client {
+ label = "client";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ extender {
+ label = "extender";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ router {
+ label = "router";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&switch0 {
+ ports {
+ wan: port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts
new file mode 100644
index 0000000..62423f0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts
@@ -0,0 +1,147 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "firefly,firewrt", "mediatek,mt7621-soc";
+ model = "Firefly FireWRT";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ power {
+ label = "power";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_POWER>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
new file mode 100644
index 0000000..e7b19fa
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
@@ -0,0 +1,144 @@
+// 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>
+
+/ {
+ compatible = "gehua,ghl-r-001", "mediatek,mt7621-soc";
+ model = "GeHua GHL-R-001";
+
+ leds {
+ compatible = "gpio-leds";
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&uartlite3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+ broken-flash-reset;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
new file mode 100644
index 0000000..e805454
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
@@ -0,0 +1,152 @@
+// 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>
+
+/ {
+ compatible = "glinet,gl-mt1300", "mediatek,mt7621-soc";
+ model = "GL.iNet GL-MT1300";
+
+ aliases {
+ led-boot = &led_run;
+ led-failsafe = &led_run;
+ led-running = &led_run;
+ led-upgrade = &led_run;
+ label-mac-device = &wan;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ switch {
+ label = "switch";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_run: run {
+ label = "blue:run";
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ system {
+ label = "white:system";
+ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4000>;
+ mtd-mac-address-increment = <1>;
+};
+
+&switch0 {
+ ports {
+ port@2 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4000>;
+ };
+ };
+};
+
+&uartlite3 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ group = "wdt", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
new file mode 100644
index 0000000..5910f11
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
@@ -0,0 +1,116 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc";
+ model = "GB-PC1";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "green:power";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ };
+
+ led_system: system {
+ label = "green:system";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "disk-activity";
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "ethblack";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "ethblue";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts
new file mode 100644
index 0000000..e27c4e4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts
@@ -0,0 +1,151 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
+ model = "GB-PC2";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ ethblack-green {
+ label = "green:ethblack";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+
+ ethblue-green {
+ label = "green:ethblue";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ ethyellow-green {
+ label = "green:ethyellow";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ ethyellow-orange {
+ label = "orange:ethyellow";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ power {
+ label = "green:power";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ };
+
+ led_system: system {
+ label = "green:system";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "disk-activity";
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&gmac1 {
+ status = "okay";
+ label = "ethyellow";
+ phy-handle = <ðphy5>;
+
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&mdio {
+ ethphy5: ethernet-phy@5 {
+ reg = <5>;
+ phy-mode = "rgmii-rxid";
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "ethblack";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "ethblue";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
new file mode 100644
index 0000000..774fb93
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
@@ -0,0 +1,161 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hiwifi,hc5962", "mediatek,mt7621-soc";
+ model = "HiWiFi HC5962";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "white:status";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ led_system: system {
+ label = "red:system";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ panic-indicator;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ ubi-concat {
+ compatible = "mtd-concat";
+ devices = <&ubiconcat0 &ubiconcat1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "ubi";
+ reg = <0x0 0x79c0000>;
+ };
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "debug";
+ reg = <0x80000 0x80000>;
+ read-only;
+ };
+
+ factory: partition@100000 {
+ label = "factory";
+ reg = <0x100000 0x40000>;
+ read-only;
+ };
+
+ partition@140000 {
+ label = "kernel";
+ reg = <0x140000 0x400000>;
+ };
+
+ ubiconcat0: partition@540000 {
+ label = "ubiconcat0";
+ reg = <0x540000 0x1c80000>;
+ };
+
+ partition@21c0000 {
+ label = "bdinfo";
+ reg = <0x21c0000 0x80000>;
+ read-only;
+ };
+
+ ubiconcat1: partition@2240000 {
+ label = "ubiconcat1";
+ reg = <0x2240000 0x5d40000>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
new file mode 100644
index 0000000..879fb68
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
@@ -0,0 +1,193 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "iodata,wn-ax1167gr", "mediatek,mt7621-soc";
+ model = "I-O DATA WN-AX1167GR";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ auto {
+ label = "auto";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ custom {
+ label = "custom";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "Config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ iNIC_rf: partition@50000 {
+ label = "iNIC_rf";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ partition@60000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x60000 0xf30000>;
+ };
+
+ partition@f90000 {
+ label = "Key";
+ reg = <0xf90000 0x10000>;
+ read-only;
+ };
+
+ partition@fa0000 {
+ label = "backup";
+ reg = <0xfa0000 0x10000>;
+ read-only;
+ };
+
+ partition@fb0000 {
+ label = "storage";
+ reg = <0xfb0000 0x50000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&iNIC_rf 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "jtag";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr2.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr2.dts
new file mode 100644
index 0000000..8e778ce
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr2.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_iodata_wn-xx-xr.dtsi"
+
+/ {
+ compatible = "iodata,wn-ax1167gr2", "mediatek,mt7621-soc";
+ model = "I-O DATA WN-AX1167GR2";
+};
+
+&partitions {
+ partition@6b00000 {
+ label = "Backup";
+ reg = <0x6b00000 0x1480000>;
+ read-only;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax2033gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax2033gr.dts
new file mode 100644
index 0000000..eb69086
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax2033gr.dts
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_iodata_wn-xx-xr.dtsi"
+
+/ {
+ compatible = "iodata,wn-ax2033gr", "mediatek,mt7621-soc";
+ model = "I-O DATA WN-AX2033GR";
+};
+
+&partitions {
+ partition@6b00000 {
+ label = "Backup";
+ reg = <0x6b00000 0x1480000>;
+ read-only;
+ };
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2483000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 5710000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1167r.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1167r.dts
new file mode 100644
index 0000000..4492f43
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1167r.dts
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_iodata_wn-xx-xr.dtsi"
+
+/ {
+ compatible = "iodata,wn-dx1167r", "mediatek,mt7621-soc";
+ model = "I-O DATA WN-DX1167R";
+};
+
+&partitions {
+ partition@6b00000 {
+ label = "idmkey";
+ reg = <0x6b00000 0x0100000>;
+ read-only;
+ };
+
+ partition@6c00000 {
+ label = "Backup";
+ reg = <0x6c00000 0x1380000>;
+ read-only;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
new file mode 100644
index 0000000..055c1ab
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
@@ -0,0 +1,196 @@
+// 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>
+
+/ {
+ compatible = "iodata,wn-dx1200gr", "mediatek,mt7621-soc";
+ model = "I-O DATA WN-DX1200GR";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &wan;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ repeater {
+ label = "repeater";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "u-boot-env";
+ reg = <0x100000 0x100000>;
+ read-only;
+ };
+
+ factory: partition@200000 {
+ label = "factory";
+ reg = <0x200000 0x200000>;
+ };
+
+ partition@400000 {
+ label = "kernel";
+ reg = <0x400000 0x400000>;
+ };
+
+ partition@800000 {
+ label = "ubi";
+ reg = <0x800000 0x2e00000>;
+ };
+
+ partition@3600000 {
+ label = "Config";
+ reg = <0x3600000 0x100000>;
+ read-only;
+ };
+
+ partition@3700000 {
+ label = "firmware_2";
+ reg = <0x3700000 0x3200000>;
+ };
+
+ partition@6900000 {
+ label = "Config_2";
+ reg = <0x6900000 0x100000>;
+ read-only;
+ };
+
+ partition@6a00000 {
+ label = "persist";
+ reg = <0x6a00000 0x100000>;
+ };
+
+ partition@6b00000 {
+ label = "idmkey";
+ reg = <0x6b00000 0x100000>;
+ read-only;
+ };
+
+ partition@6c00000 {
+ label = "Backup";
+ reg = <0x6c00000 0x1380000>;
+ read-only;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x1e000>;
+};
+
+&switch0 {
+ ports {
+ wan: port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x1e006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
new file mode 100644
index 0000000..06d024e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
@@ -0,0 +1,185 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "iodata,wn-gx300gr", "mediatek,mt7621-soc";
+ model = "I-O DATA WN-GX300GR";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ auto {
+ label = "auto";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ custom {
+ label = "custom";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "Config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "iNIC_rf";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ partition@60000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x60000 0x770000>;
+ };
+
+ partition@7d0000 {
+ label = "Key";
+ reg = <0x7d0000 0x10000>;
+ read-only;
+ };
+
+ partition@7e0000 {
+ label = "backup";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ partition@7f0000 {
+ label = "storage";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "jtag";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
new file mode 100644
index 0000000..ff9e525
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
@@ -0,0 +1,167 @@
+// 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>
+
+/ {
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &wan;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ repeater {
+ label = "repeater";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x0100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "u-boot-env";
+ reg = <0x0100000 0x0100000>;
+ read-only;
+ };
+
+ factory: partition@200000 {
+ label = "factory";
+ reg = <0x0200000 0x0100000>;
+ };
+
+ partition@300000 {
+ label = "SecondBoot";
+ reg = <0x0300000 0x0100000>;
+ read-only;
+ };
+
+ partition@400000 {
+ label = "kernel";
+ reg = <0x0400000 0x0400000>;
+ };
+
+ partition@800000 {
+ label = "ubi";
+ reg = <0x0800000 0x2e00000>;
+ };
+
+ partition@3600000 {
+ label = "Config";
+ reg = <0x3600000 0x0100000>;
+ read-only;
+ };
+
+ partition@3700000 {
+ label = "firmware_2";
+ reg = <0x3700000 0x3200000>;
+ };
+
+ partition@6900000 {
+ label = "Config_2";
+ reg = <0x6900000 0x0100000>;
+ read-only;
+ };
+
+ partition@6a00000 {
+ label = "persist";
+ reg = <0x6a00000 0x0100000>;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ wan: port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
new file mode 100644
index 0000000..0e808f6
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
@@ -0,0 +1,186 @@
+// 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>
+
+/ {
+ compatible = "iodata,wnpr2600g", "mediatek,mt7621-soc";
+ model = "I-O DATA WNPR2600G";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ notification {
+ label = "green:notification";
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0radio";
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy1radio";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ auto {
+ label = "auto";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x000000 0x030000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x030000 0x010000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x040000 0x010000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x050000 0xda0000>;
+ };
+
+ partition@df0000 {
+ label = "manufacture";
+ reg = <0xdf0000 0x190000>;
+ read-only;
+ };
+
+ partition@f80000 {
+ label = "storage";
+ reg = <0xf80000 0x080000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts
new file mode 100644
index 0000000..4ebd980
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts
@@ -0,0 +1,167 @@
+// 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>
+
+/ {
+ compatible = "iptime,a6ns-m", "mediatek,mt7621-soc";
+ model = "ipTIME A6ns-M";
+
+ aliases {
+ led-boot = &led_cpu;
+ led-failsafe = &led_cpu;
+ led-running = &led_cpu;
+ led-upgrade = &led_cpu;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0radio";
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1radio";
+ };
+
+ led_cpu: cpu {
+ label = "blue:cpu";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot: partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "config";
+ reg = <0x20000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x40000 0xfc0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&uboot 0x1fc20>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&uboot 0x1fc40>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts
new file mode 100644
index 0000000..df6aed6
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts
@@ -0,0 +1,158 @@
+// 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>
+
+/ {
+ compatible = "iptime,a8004t", "mediatek,mt7621-soc";
+ model = "ipTIME A8004T";
+
+ aliases {
+ led-boot = &led_cpu;
+ led-failsafe = &led_cpu;
+ led-running = &led_cpu;
+ led-upgrade = &led_cpu;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_cpu: cpu {
+ label = "orange:cpu";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "orange:wlan2g";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0radio";
+ };
+
+ wlan5g {
+ label = "orange:wlan5g";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1radio";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot: partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "config";
+ reg = <0x20000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x40000 0xfc0000>;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&uboot 0x1fc20>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&uboot 0x1fc40>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "jtag", "i2c";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
new file mode 100644
index 0000000..ae312fc
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
@@ -0,0 +1,169 @@
+// 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>
+
+/ {
+ compatible = "jcg,jhr-ac876m", "mediatek,mt7621-soc";
+ model = "JCG JHR-AC876M";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ label-mac-device = &wan;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb3 {
+ label = "blue:usb3";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ usb2 {
+ label = "blue:usb2";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_wps: wps {
+ label = "blue:wps";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts
new file mode 100644
index 0000000..f0e8293
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts
@@ -0,0 +1,175 @@
+// 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>
+
+/ {
+ compatible = "jcg,q20", "mediatek,mt7621-soc";
+ model = "JCG Q20";
+
+ aliases {
+ led-boot = &led_status_red;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_blue;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ ubi-concat {
+ compatible = "mtd-concat";
+ devices = <&ubiconcat0 &ubiconcat1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "ubi";
+ reg = <0x0 0x5900000>;
+ };
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "Config";
+ reg = <0x80000 0x80000>;
+ };
+
+ factory: partition@100000 {
+ label = "Factory";
+ reg = <0x100000 0x80000>;
+ read-only;
+ };
+
+ partition@180000 {
+ label = "kernel";
+ reg = <0x180000 0x400000>;
+ };
+
+ ubiconcat0: partition@580000 {
+ label = "ubiconcat0";
+ reg = <0x580000 0x1c00000>;
+ };
+
+ partition@2180000 {
+ label = "firmware_backup";
+ reg = <0x2180000 0x2000000>;
+ };
+
+ partition@4180000 {
+ label = "rootfs_data_back";
+ reg = <0x4180000 0x80000>;
+ read-only;
+ };
+
+ partition@4200000 {
+ label = "nvram_config";
+ reg = <0x4200000 0x80000>;
+ read-only;
+ };
+
+ ubiconcat1: partition@4280000 {
+ label = "ubiconcat1";
+ reg = <0x4280000 0x3d00000>;
+ };
+
+ /*
+ * last 512 KiB are for the bad block table
+ */
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x3fff4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x3fffa>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan2";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts
new file mode 100644
index 0000000..06d6579
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts
@@ -0,0 +1,130 @@
+// 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>
+
+/ {
+ compatible = "jcg,y2", "mediatek,mt7621-soc";
+ model = "JCG Y2";
+
+ aliases {
+ led-boot = &led_internet;
+ led-failsafe = &led_internet;
+ led-upgrade = &led_internet;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_internet: internet {
+ label = "blue:internet";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
new file mode 100644
index 0000000..fa26900
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
@@ -0,0 +1,163 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "lenovo,newifi-d1", "mediatek,mt7621-soc";
+ model = "Newifi-D1";
+
+ aliases {
+ led-boot = &led_blue;
+ led-failsafe = &led_blue;
+ led-running = &led_blue;
+ led-upgrade = &led_blue;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ status-red {
+ label = "red:status";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ status-green {
+ label = "green:status";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ led_blue: status-blue {
+ label = "blue:status";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb2power {
+ gpio-export,name = "usb2power";
+ gpio-export,output = <1>;
+ gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb3power {
+ gpio-export,name = "usb3power";
+ gpio-export,output = <1>;
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <45000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts
new file mode 100644
index 0000000..91db315
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts
@@ -0,0 +1,182 @@
+// 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>
+
+/ {
+ compatible = "linksys,e5600", "mediatek,mt7621-soc";
+ model = "Linksys E5600";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "amber:wps";
+ gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ wan_amber {
+ label = "amber:wan";
+ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+ };
+
+ wan_blue {
+ label = "blue:wan";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "u_env";
+ reg = <0x80000 0x40000>;
+ read-only;
+ };
+
+ factory: partition@c0000 {
+ label = "factory";
+ reg = <0xc0000 0x40000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "s_env";
+ reg = <0x100000 0x40000>;
+ };
+
+ partition@140000 {
+ label = "devinfo";
+ reg = <0x140000 0x40000>;
+ read-only;
+ };
+
+ partition@180000 {
+ label = "kernel";
+ reg = <0x180000 0x400000>;
+ };
+
+ partition@580000 {
+ label = "ubi";
+ reg = <0x580000 0x1a00000>;
+ };
+
+ partition@1f80000 {
+ label = "alt_firmware";
+ reg = <0x1f80000 0x1e00000>;
+ };
+
+ partition@3d80000 {
+ label = "gdata";
+ reg = <0x3d80000 0x4200000>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "jtag";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7300-v1.dts b/target/linux/ramips/dts/mt7621_linksys_ea7300-v1.dts
new file mode 100644
index 0000000..3e50d85
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea7300-v1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+ compatible = "linksys,ea7300-v1", "mediatek,mt7621-soc";
+ model = "Linksys EA7300 v1";
+};
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts b/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts
new file mode 100644
index 0000000..4ee1488
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea7300-v2.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+ compatible = "linksys,ea7300-v2", "mediatek,mt7621-soc";
+ model = "Linksys EA7300 v2";
+};
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7500-v2.dts b/target/linux/ramips/dts/mt7621_linksys_ea7500-v2.dts
new file mode 100644
index 0000000..8e13cc2
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea7500-v2.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+ compatible = "linksys,ea7500-v2", "mediatek,mt7621-soc";
+ model = "Linksys EA7500 v2";
+};
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi
new file mode 100644
index 0000000..ecff640
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi
@@ -0,0 +1,203 @@
+// 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>
+
+/ {
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+
+ lan1_green {
+ label = "green:lan1";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+
+ lan2_green {
+ label = "green:lan2";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+
+ lan3_green {
+ label = "green:lan3";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ lan4_green {
+ label = "green:lan4";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "white:power";
+ gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "u_env";
+ reg = <0x80000 0x40000>;
+ read-only;
+ };
+
+ factory: partition@c0000 {
+ label = "factory";
+ reg = <0xc0000 0x40000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "s_env";
+ reg = <0x100000 0x40000>;
+ };
+
+ partition@140000 {
+ label = "devinfo";
+ reg = <0x140000 0x40000>;
+ read-only;
+ };
+
+ partition@180000 {
+ label = "kernel";
+ reg = <0x180000 0x400000>;
+ };
+
+ partition@580000 {
+ label = "ubi";
+ reg = <0x580000 0x2400000>;
+ };
+
+ partition@2980000 {
+ label = "alt_kernel";
+ reg = <0x2980000 0x400000>;
+ read-only;
+ };
+
+ partition@2d80000 {
+ label = "alt_rootfs";
+ reg = <0x2d80000 0x2400000>;
+ read-only;
+ };
+
+ partition@5180000 {
+ label = "sysdiag";
+ reg = <0x5180000 0x100000>;
+ read-only;
+ };
+
+ partition@5280000 {
+ label = "syscfg";
+ reg = <0x5280000 0x2d00000>;
+ read-only;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea8100-v1.dts b/target/linux/ramips/dts/mt7621_linksys_ea8100-v1.dts
new file mode 100644
index 0000000..6cc2219
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea8100-v1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+ compatible = "linksys,ea8100-v1", "mediatek,mt7621-soc";
+ model = "Linksys EA8100";
+};
diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts
new file mode 100644
index 0000000..319d0d7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts
@@ -0,0 +1,145 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "linksys,re6500", "mediatek,mt7621-soc";
+ model = "Linksys RE6500";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi {
+ label = "orange:wifi";
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_power: power {
+ label = "white:power";
+ gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
new file mode 100644
index 0000000..0499655
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
@@ -0,0 +1,152 @@
+#include "mt7621.dtsi"
+
+/ {
+ compatible = "mediatek,ap-mt7621a-v60", "mediatek,mt7621-soc";
+ model = "Mediatek AP-MT7621A-V60 EVB";
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "Audio-I2S";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&dailink0_master>;
+ simple-audio-card,frame-master = <&dailink0_master>;
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "LINPUT1", "Microphone Jack",
+ "RINPUT1", "Microphone Jack",
+ "Headphone Jack", "HP_L",
+ "Headphone Jack", "HP_R";
+ simple-audio-card,mclk-fs = <256>;
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+
+ dailink0_master: simple-audio-card,codec {
+ sound-dai = <&codec>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "rgmii2";
+ function = "gpio";
+ };
+};
+
+&pinctrl {
+ i2s_pins: i2s {
+ i2s {
+ groups = "uart3";
+ function = "i2s";
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+
+ codec: wm8960@1a {
+ #sound-dai-cells = <0>;
+ compatible = "wlf,wm8960";
+ reg = <0x1a>;
+ wlf,shared-lrclk;
+ };
+};
+
+&gdma {
+ status = "okay";
+};
+
+&i2s {
+ #sound-dai-cells = <0>;
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s_pins>;
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "mx25l6405d","jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x5>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x5>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts
new file mode 100644
index 0000000..c86eea0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts
@@ -0,0 +1,76 @@
+#include "mt7621.dtsi"
+
+/ {
+ compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+ model = "Mediatek MT7621 evaluation board";
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x00000 0x80000>; /* 64 KB */
+ };
+
+ partition@80000 {
+ label = "uboot_env";
+ reg = <0x80000 0x80000>; /* 64 KB */
+ };
+
+ partition@100000 {
+ label = "factory";
+ reg = <0x100000 0x40000>;
+ };
+
+ partition@140000 {
+ label = "rootfs";
+ reg = <0x140000 0xec0000>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_mikrotik.dtsi b/target/linux/ramips/dts/mt7621_mikrotik.dtsi
new file mode 100644
index 0000000..1fc523e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mikrotik.dtsi
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys: keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <33000000>;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "RouterBoot";
+ reg = <0x0 0x40000>;
+ read-only;
+ compatible = "mikrotik,routerboot-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader1";
+ reg = <0x0 0x0>;
+ read-only;
+ };
+
+ hard_config {
+ read-only;
+ };
+
+ partition@10000 {
+ label = "bootloader2";
+ reg = <0x10000 0xf000>;
+ read-only;
+ };
+
+ soft_config {
+ };
+
+ partition@30000 {
+ label = "bios";
+ reg = <0x30000 0x1000>;
+ read-only;
+ };
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
new file mode 100644
index 0000000..7f329b2
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_mikrotik_routerboard-7xx.dtsi"
+
+/ {
+ compatible = "mikrotik,routerboard-750gr3", "mediatek,mt7621-soc";
+ model = "MikroTik RouterBOARD 750Gr3";
+
+ aliases {
+ led-boot = &led_usr;
+ led-failsafe = &led_usr;
+ led-running = &led_usr;
+ led-upgrade = &led_usr;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ pwr {
+ label = "blue:pwr";
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ led_usr: usr {
+ label = "green:usr";
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-760igs.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-760igs.dts
new file mode 100644
index 0000000..ed0b4e5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-760igs.dts
@@ -0,0 +1,68 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_mikrotik_routerboard-7xx.dtsi"
+
+/ {
+ compatible = "mikrotik,routerboard-760igs", "mediatek,mt7621-soc";
+ model = "MikroTik RouterBOARD 760iGS";
+
+ aliases {
+ led-boot = &led_pwr;
+ led-failsafe = &led_pwr;
+ led-running = &led_pwr;
+ led-upgrade = &led_pwr;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_pwr: pwr {
+ label = "blue:pwr";
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ sfp {
+ label = "blue:sfp";
+ gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ sfp1: sfp1 {
+ compatible = "sff,sfp";
+ i2c-bus = <&i2c>;
+ los-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+ mod-def0-gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ tx-disable-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ maximum-power-milliwatt = <1000>;
+ };
+};
+
+&mdio {
+ ephy7: ethernet-phy@7 {
+ reg = <7>;
+ sfp = <&sfp1>;
+ };
+};
+
+&gmac1 {
+ status = "okay";
+
+ label = "sfp";
+ phy-handle = <&ephy7>;
+};
+
+&i2c {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ /* gpio7 (uart3 group) goes high when
+ * port5 (PoE out) is cabled to a
+ * Mikrotik PoE-in capable port,
+ * such as port1 on another rb760iGS */
+ groups = "uart2", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-7xx.dtsi b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-7xx.dtsi
new file mode 100644
index 0000000..b8fae51
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-7xx.dtsi
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_mikrotik.dtsi"
+
+/ {
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ buzzer {
+ /* Beeper requires PWM for frequency selection */
+ gpio-export,name = "buzzer";
+ gpio-export,output = <0>;
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb_power {
+ gpio-export,name = "usb_power";
+ gpio-export,output = <1>;
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&keys {
+ mode {
+ label = "mode";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+};
+
+&partitions {
+ partition@40000 {
+ compatible = "mikrotik,minor";
+ label = "firmware";
+ reg = <0x040000 0xfc0000>;
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan5";
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts
new file mode 100644
index 0000000..20a834a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts
@@ -0,0 +1,91 @@
+#include "mt7621_mikrotik.dtsi"
+
+/ {
+ compatible = "mikrotik,routerboard-m11g", "mediatek,mt7621-soc";
+ model = "MikroTik RouterBOARD M11G";
+
+ aliases {
+ led-boot = &led_usr;
+ led-failsafe = &led_usr;
+ led-running = &led_usr;
+ led-upgrade = &led_usr;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_usr: usr {
+ label = "green:usr";
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ rssi0 {
+ label = "green:rssi0";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi1 {
+ label = "green:rssi1";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi2 {
+ label = "green:rssi2";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi3 {
+ label = "green:rssi3";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi4 {
+ label = "green:rssi4";
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ pcie0_vcc_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie0_vcc";
+
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio 9 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+};
+
+&partitions {
+ partition@40000 {
+ compatible = "mikrotik,minor";
+ label = "firmware";
+ reg = <0x040000 0xfc0000>;
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts
new file mode 100644
index 0000000..affbaf3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts
@@ -0,0 +1,129 @@
+#include "mt7621_mikrotik.dtsi"
+
+/ {
+ compatible = "mikrotik,routerboard-m33g", "mediatek,mt7621-soc";
+ model = "MikroTik RouterBOARD M33G";
+
+ aliases {
+ led-boot = &led_usr;
+ led-failsafe = &led_usr;
+ led-running = &led_usr;
+ led-upgrade = &led_usr;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_usr: usr {
+ label = "green:usr";
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ pcie0_vcc_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie0_vcc";
+
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio 9 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ pcie1_vcc_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie1_vcc";
+
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ pcie2_vcc_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie2_vcc";
+
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ usb_vcc_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_vcc";
+
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+};
+
+&spi0 {
+ flash@1 {
+ compatible = "jedec,spi-nor";
+ reg = <1>;
+ spi-max-frequency = <33000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ // Region <0x0 0x40000> seems reserved by OEM
+
+ partition@40000 {
+ compatible = "mikrotik,minor";
+ label = "firmware";
+ reg = <0x040000 0xfc0000>;
+ };
+ };
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "wdt";
+ function = "gpio";
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts
new file mode 100644
index 0000000..4590147
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts
@@ -0,0 +1,136 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mqmaker,witi", "mediatek,mt7621-soc";
+ model = "MQmaker WiTi";
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+
+ rtc@51 {
+ status = "okay";
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&factory 0xe000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ mtd-mac-address = <&factory 0xe000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
new file mode 100644
index 0000000..8a79d9c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
@@ -0,0 +1,175 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mtc,wr1201", "mediatek,mt7621-soc";
+ model = "MTC Wireless Router WR1201";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ eth_link {
+ label = "green:eth_link";
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "Config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfa0000>;
+ };
+
+ partition@ff0000 {
+ label = "Second_Config";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "rgmii2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts
new file mode 100644
index 0000000..0da8f6b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts
@@ -0,0 +1,248 @@
+// 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>
+
+/ {
+ compatible = "netgear,ex6150", "mediatek,mt7621-soc";
+ model = "Netgear EX6150";
+
+ aliases {
+ led-boot = &power_green;
+ led-failsafe = &power_amber;
+ led-running = &power_green;
+ led-upgrade = &power_amber;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power_amber: power_amber {
+ label = "amber:power";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ power_green: power_green {
+ label = "green:power";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ rightarrow {
+ label = "blue:rightarrow";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ };
+
+ leftarrow {
+ label = "blue:leftarrow";
+ gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+ };
+
+ router_green {
+ label = "green:router";
+ gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ router_red {
+ label = "red:router";
+ gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
+ };
+
+ client_green {
+ label = "green:client";
+ gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ client_red {
+ label = "red:client";
+ gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ toggle {
+ label = "AP/Extender toggle";
+ gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ /* Active when switch is set to "Access Point" */
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xe80000>;
+ };
+
+ partition@ed0000 {
+ label = "ML1";
+ reg = <0xed0000 0x10000>;
+ read-only;
+ };
+
+ partition@ef0000 {
+ label = "ML2";
+ reg = <0xef0000 0x20000>;
+ read-only;
+ };
+
+ partition@f10000 {
+ label = "ML3";
+ reg = <0xf10000 0x20000>;
+ read-only;
+ };
+
+ partition@f30000 {
+ label = "ML4";
+ reg = <0xf30000 0x20000>;
+ read-only;
+ };
+
+ partition@f50000 {
+ label = "ML5";
+ reg = <0xf50000 0x20000>;
+ read-only;
+ };
+
+ partition@f70000 {
+ label = "ML6";
+ reg = <0xf70000 0x20000>;
+ read-only;
+ };
+
+ partition@f90000 {
+ label = "ML7";
+ reg = <0xf90000 0x20000>;
+ read-only;
+ };
+
+ partition@fb0000 {
+ label = "T_Meter1";
+ reg = <0xfb0000 0x10000>;
+ read-only;
+ };
+
+ partition@fc0000 {
+ label = "T_Meter2";
+ reg = <0xfc0000 0x10000>;
+ read-only;
+ };
+
+ partition@fd0000 {
+ label = "POT";
+ reg = <0xfd0000 0x10000>;
+ read-only;
+ };
+
+ partition@fe0000 {
+ label = "board_data";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+
+ partition@ff0000 {
+ label = "nvram";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+
+ reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
+ <&gpio 8 GPIO_ACTIVE_LOW>;
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "sdhci", "rgmii2", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_r6220.dts b/target/linux/ramips/dts/mt7621_netgear_r6220.dts
new file mode 100644
index 0000000..cc29d4e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_r6220.dts
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_netgear_sercomm_ayx.dtsi"
+
+/ {
+ compatible = "netgear,r6220", "mediatek,mt7621-soc";
+ model = "Netgear R6220";
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "SC PID";
+ reg = <0x100000 0x100000>;
+ read-only;
+ };
+
+ partition@200000 {
+ label = "kernel";
+ reg = <0x200000 0x400000>;
+ };
+
+ partition@600000 {
+ label = "ubi";
+ reg = <0x600000 0x1c00000>;
+ };
+
+ factory: partition@2e00000 {
+ label = "factory";
+ reg = <0x2e00000 0x100000>;
+ read-only;
+ };
+
+ partition@4200000 {
+ label = "reserved";
+ reg = <0x4200000 0x3c00000>;
+ read-only;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_r6260.dts b/target/linux/ramips/dts/mt7621_netgear_r6260.dts
new file mode 100644
index 0000000..b32f26d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_r6260.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_netgear_sercomm_chj.dtsi"
+
+/ {
+ compatible = "netgear,r6260", "mediatek,mt7621-soc";
+ model = "Netgear R6260";
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_r6350.dts b/target/linux/ramips/dts/mt7621_netgear_r6350.dts
new file mode 100644
index 0000000..22535c9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_r6350.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_netgear_sercomm_chj.dtsi"
+
+/ {
+ compatible = "netgear,r6350", "mediatek,mt7621-soc";
+ model = "Netgear R6350";
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_r6700-v2.dts b/target/linux/ramips/dts/mt7621_netgear_r6700-v2.dts
new file mode 100644
index 0000000..b93d6aa
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_r6700-v2.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_netgear_sercomm_bzv.dtsi"
+
+/ {
+ compatible = "netgear,r6700-v2", "mediatek,mt7621-soc";
+ model = "Netgear R6700 v2";
+};
+
+&leds {
+ guest_wifi {
+ gpios = <&gpio_expander 6 GPIO_ACTIVE_LOW>;
+ label = "white:guest_wifi";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_r6800.dts b/target/linux/ramips/dts/mt7621_netgear_r6800.dts
new file mode 100644
index 0000000..c7afc53
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_r6800.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_netgear_sercomm_bzv.dtsi"
+
+/ {
+ compatible = "netgear,r6800", "mediatek,mt7621-soc";
+ model = "Netgear R6800";
+};
+
+&leds {
+ usb2 {
+ gpios = <&gpio_expander 6 GPIO_ACTIVE_LOW>;
+ label = "white:usb2";
+ linux,default-trigger = "usbport";
+ trigger-sources = <&ehci_port2>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_r6850.dts b/target/linux/ramips/dts/mt7621_netgear_r6850.dts
new file mode 100644
index 0000000..78e9093
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_r6850.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_netgear_sercomm_chj.dtsi"
+
+/ {
+ compatible = "netgear,r6850", "mediatek,mt7621-soc";
+ model = "Netgear R6850";
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
new file mode 100644
index 0000000..1a19cd0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
@@ -0,0 +1,149 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mediatek,mt7621-soc";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &gmac0;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ wifi {
+ label = "wifi";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ internet {
+ label = "green:wan";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ reg_usb_vbus: regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&xhci {
+ vbus-supply = <®_usb_vbus>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "uart2", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
new file mode 100644
index 0000000..71c95e7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
@@ -0,0 +1,260 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mediatek,mt7621-soc";
+
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_power_white;
+ led-failsafe = &led_power_orange;
+ led-running = &led_power_white;
+ led-upgrade = &led_power_orange;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+
+ led_power_orange: power_orange {
+ gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>;
+ label = "orange:power";
+ };
+
+ led_power_white: power_white {
+ gpios = <&gpio_expander 1 GPIO_ACTIVE_LOW>;
+ label = "white:power";
+ };
+
+ wan_orange {
+ gpios = <&gpio_expander 2 GPIO_ACTIVE_LOW>;
+ label = "orange:wan";
+ };
+
+ wan_white {
+ gpios = <&gpio_expander 3 GPIO_ACTIVE_LOW>;
+ label = "white:wan";
+ };
+
+ wlan2g {
+ gpios = <&gpio_expander 4 GPIO_ACTIVE_LOW>;
+ label = "white:wlan2g";
+ linux,default-trigger = "phy0radio";
+ };
+
+ wlan5g {
+ gpios = <&gpio_expander 5 GPIO_ACTIVE_LOW>;
+ label = "white:wlan5g";
+ linux,default-trigger = "phy1radio";
+ };
+
+ usb3 {
+ gpios = <&gpio_expander 7 GPIO_ACTIVE_LOW>;
+ label = "white:usb3";
+ linux,default-trigger = "usbport";
+ trigger-sources = <&xhci_ehci_port1>;
+ };
+
+ lan1_orange {
+ gpios = <&gpio_expander 8 GPIO_ACTIVE_LOW>;
+ label = "orange:lan1";
+ };
+
+ lan1_white {
+ gpios = <&gpio_expander 9 GPIO_ACTIVE_LOW>;
+ label = "white:lan1";
+ };
+
+ lan2_orange {
+ gpios = <&gpio_expander 10 GPIO_ACTIVE_LOW>;
+ label = "orange:lan2";
+ };
+
+ lan2_white {
+ gpios = <&gpio_expander 11 GPIO_ACTIVE_LOW>;
+ label = "white:lan2";
+ };
+
+ lan3_orange {
+ gpios = <&gpio_expander 12 GPIO_ACTIVE_LOW>;
+ label = "orange:lan3";
+ };
+
+ lan3_white {
+ gpios = <&gpio_expander 13 GPIO_ACTIVE_LOW>;
+ label = "white:lan3";
+ };
+
+ lan4_orange {
+ gpios = <&gpio_expander 14 GPIO_ACTIVE_LOW>;
+ label = "orange:lan4";
+ };
+
+ lan4_white {
+ gpios = <&gpio_expander 15 GPIO_ACTIVE_LOW>;
+ label = "white:lan4";
+ };
+
+ wps {
+ gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ label = "white:wps";
+ };
+
+ wlan {
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ label = "white:wlan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "uart2", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <2>;
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+
+ gpio_expander: i2c0gpio-expander@20{
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ compatible = "semtech,sx1503q";
+ reg = <0x20>;
+
+ gpio-controller;
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "SC PART_MAP";
+ reg = <0x100000 0x100000>;
+ read-only;
+ };
+
+ partition@200000 {
+ label = "kernel";
+ reg = <0x200000 0x400000>;
+ };
+
+ partition@600000 {
+ label = "ubi";
+ reg = <0x600000 0x2800000>;
+ };
+
+ partition@2e00000 {
+ label = "reserved0";
+ reg = <0x2e00000 0x1800000>;
+ read-only;
+ };
+
+ factory: partition@4600000 {
+ label = "factory";
+ reg = <0x4600000 0x200000>;
+ read-only;
+ };
+
+ partition@4800000 {
+ label = "reserved1";
+ reg = <0x4800000 0x3800000>;
+ read-only;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
new file mode 100644
index 0000000..7a15cd1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
@@ -0,0 +1,188 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mediatek,mt7621-soc";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ internet {
+ label = "green:wan";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ reg_usb_vbus: regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&xhci {
+ vbus-supply = <®_usb_vbus>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <2>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "uart2", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "SC PART_MAP";
+ reg = <0x100000 0x100000>;
+ read-only;
+ };
+
+ partition@200000 {
+ label = "kernel";
+ reg = <0x200000 0x400000>;
+ };
+
+ partition@600000 {
+ label = "ubi";
+ reg = <0x600000 0x2800000>;
+ };
+
+ partition@2e00000 {
+ label = "reserved0";
+ reg = <0x2e00000 0x1800000>;
+ read-only;
+ };
+
+ factory: partition@4600000 {
+ label = "factory";
+ reg = <0x4600000 0x200000>;
+ read-only;
+ };
+
+ partition@4800000 {
+ label = "reserved1";
+ reg = <0x4800000 0x3800000>;
+ read-only;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts
new file mode 100644
index 0000000..fbedeb2
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts
@@ -0,0 +1,166 @@
+// SPDX-License-Identifier: GPL-2.0-only or MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "netgear,wac104", "mediatek,mt7621-soc";
+ model = "Netgear WAC104";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &gmac0;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ wifi {
+ label = "wifi";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "SC PID";
+ reg = <0x100000 0x100000>;
+ read-only;
+ };
+
+ partition@200000 {
+ label = "kernel";
+ reg = <0x200000 0x400000>;
+ };
+
+ partition@600000 {
+ label = "ubi";
+ reg = <0x600000 0x1c00000>;
+ };
+
+ factory: partition@2e00000 {
+ label = "factory";
+ reg = <0x2e00000 0x100000>;
+ read-only;
+ };
+
+ partition@4200000 {
+ label = "reserved";
+ reg = <0x4200000 0x3c00000>;
+ read-only;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_wac124.dts b/target/linux/ramips/dts/mt7621_netgear_wac124.dts
new file mode 100644
index 0000000..92860c0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_wac124.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_netgear_sercomm_chj.dtsi"
+
+/ {
+ compatible = "netgear,wac124", "mediatek,mt7621-soc";
+ model = "Netgear WAC124";
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts b/target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts
new file mode 100644
index 0000000..90c0ca1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "mt7621_netgear_sercomm_ayx.dtsi"
+
+/ {
+ compatible = "netgear,wndr3700-v5", "mediatek,mt7621-soc";
+ model = "Netgear WNDR3700 v5";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@f30000 {
+ label = "factory";
+ reg = <0xf30000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xee0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts
new file mode 100644
index 0000000..7dfd133
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts
@@ -0,0 +1,163 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "netis,wf2881", "mediatek,mt7621-soc";
+ model = "NETIS WF2881";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "config";
+ reg = <0x80000 0x80000>;
+ read-only;
+ };
+
+ factory: partition@100000 {
+ label = "factory";
+ reg = <0x100000 0x40000>;
+ read-only;
+ };
+
+ partition@140000 {
+ label = "firmware";
+ reg = <0x140000 0x7e40000>;
+
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "kernel";
+ reg = <0x0 0x400000>;
+ };
+
+ partition@400000 {
+ label = "ubi";
+ reg = <0x400000 0x7a40000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "uart2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
new file mode 100644
index 0000000..83169cd
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
@@ -0,0 +1,143 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "phicomm,k2p", "mediatek,mt7621-soc";
+ model = "Phicomm K2P";
+
+ aliases {
+ led-boot = &led_blue;
+ led-failsafe = &led_blue;
+ led-running = &led_blue;
+ led-upgrade = &led_blue;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ stat_r {
+ label = "red:status";
+ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+ };
+
+ stat_y {
+ label = "yellow:status";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ led_blue: stat_b {
+ label = "blue:status";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "permanent_config";
+ reg = <0x50000 0x50000>;
+ read-only;
+ };
+
+ partition@a0000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0xa0000 0xf60000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts
new file mode 100644
index 0000000..5f8f190
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts
@@ -0,0 +1,116 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "planex,vr500", "mediatek,mt7621-soc";
+ model = "Planex VR500";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3fb0000>;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "sdhci";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
new file mode 100644
index 0000000..9561c97
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
@@ -0,0 +1,147 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "samknows,whitebox-v8", "mediatek,mt7621-soc";
+ model = "SamKnows Whitebox 8";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "sdhci";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts
new file mode 100644
index 0000000..af55d10
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts
@@ -0,0 +1,212 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "sercomm,na502", "mediatek,mt7621-soc";
+ model = "SERCOMM NA502";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "green:internet";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ zwave {
+ label = "green:zwave";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+
+ service {
+ label = "green:service";
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+
+ zigbee {
+ label = "green:zigbee";
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ };
+
+ bluetooth {
+ label = "green:bluetooth";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ select {
+ label = "select";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ sync {
+ label = "sync";
+ gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+
+ zwave_reset {
+ gpio-export,name = "zwave_reset";
+ gpio-export,output = <1>;
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ zigbee_reset {
+ gpio-export,name = "zigbee_reset";
+ gpio-export,output = <1>;
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "config";
+ reg = <0x80000 0x80000>;
+ read-only;
+ };
+
+ factory: partition@100000 {
+ label = "factory";
+ reg = <0x100000 0x40000>;
+ };
+
+ partition@140000 {
+ label = "kernel1";
+ reg = <0x140000 0x1400000>;
+ };
+
+ partition@1540000 {
+ label = "kernel";
+ reg = <0x1540000 0x400000>;
+ };
+
+ partition@1940000 {
+ label = "ubi";
+ reg = <0x1940000 0x1000000>;
+ };
+
+ partition@2940000 {
+ label = "user_storage";
+ reg = <0x2940000 0x100000>;
+ };
+
+ partition@2a40000 {
+ label = "data";
+ reg = <0x2a40000 0x1000000>;
+ };
+
+ partition@3a40000 {
+ label = "storage";
+ reg = <0x3a40000 0x3200000>;
+ };
+
+ partition@6c40000 {
+ label = "backup";
+ reg = <0x6c40000 0x1340000>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <2>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "rgmii2";
+ function = "gpio";
+ };
+};
+
+&switch0 {
+ ports {
+ port@4 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&uartlite2 {
+ status = "okay";
+};
+
+&uartlite3 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
new file mode 100644
index 0000000..d44960a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
@@ -0,0 +1,144 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "storylink,sap-g3200u3", "mediatek,mt7621-soc";
+ model = "STORYLiNK SAP-G3200U3";
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x1000>;
+ read-only;
+ };
+
+ partition@31000 {
+ label = "config";
+ reg = <0x31000 0xf000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe006>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
new file mode 100644
index 0000000..f597d0f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
@@ -0,0 +1,188 @@
+// 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>
+
+/ {
+ compatible = "telco-electronics,x1", "mediatek,mt7621-soc";
+ model = "Telco Electronics X1";
+
+ aliases {
+ led-boot = &system_led;
+ led-failsafe = &system_led;
+ led-running = &system_led;
+ led-upgrade = &system_led;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ system_led: system {
+ label = "green:system";
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+
+ modem_offline {
+ label = "red:modem-offline";
+ gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+ };
+
+ modem_4g {
+ label = "blue:modem-4g";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+
+ modem_3g {
+ label = "green:modem-3g";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ };
+
+ modem_rssi_lowest {
+ label = "green:modem-rssi-lowest";
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ };
+
+ modem_rssi_low {
+ label = "green:modem-rssi-low";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ };
+
+ modem_rssi_medium {
+ label = "green:modem-rssi-medium";
+ gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+ };
+
+ modem_rssi_high {
+ label = "green:modem-rssi-high";
+ gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
+ };
+
+ modem_rssi_highest {
+ label = "green:modem-rssi-highest";
+ gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <14000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe006>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+
+ pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+ };
+
+ pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ led {
+ led-sources = <2>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts
new file mode 100644
index 0000000..fe11f4f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts
@@ -0,0 +1,114 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "thunder,timecloud", "mediatek,mt7621-soc";
+ model = "Thunder Timecloud";
+
+ aliases {
+ led-boot = &led_statuso;
+ led-failsafe = &led_statuso;
+ led-running = &led_statuso;
+ led-upgrade = &led_statuso;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ statw {
+ label = "white:status";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_statuso: stato {
+ label = "orange:status";
+ gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ BTN_0 {
+ label = "BTN_0";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@4 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "jtag";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
new file mode 100644
index 0000000..d0e38f1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
@@ -0,0 +1,142 @@
+// 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>
+
+/ {
+ compatible = "totolink,a7000r", "mediatek,mt7621-soc";
+ model = "TOTOLINK A7000R";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_sys: sys {
+ label = "blue:sys";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts
new file mode 100644
index 0000000..b05d839
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts
@@ -0,0 +1,139 @@
+// 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>
+
+/ {
+ compatible = "totolink,x5000r", "mediatek,mt7621-soc";
+ model = "TOTOLINK X5000R";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ label-mac-device = &gmac0;
+ serial0 = &uartlite;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_sys: sys {
+ label = "blue:sys";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-a6-v3.dts b/target/linux/ramips/dts/mt7621_tplink_archer-a6-v3.dts
new file mode 100644
index 0000000..46cb365
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tplink_archer-a6-v3.dts
@@ -0,0 +1,188 @@
+// 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>
+
+/ {
+ compatible = "tplink,archer-a6-v3", "mediatek,mt7621-soc";
+ model = "TP-Link Archer A6 v3";
+
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi5g {
+ label = "green:wifi5g";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wifi2g {
+ label = "green:wifi2g";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x40000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "firmware";
+ compatible = "denx,uimage";
+ reg = <0x40000 0xf60000>;
+ };
+
+ config: partition@fa0000 {
+ label = "config";
+ reg = <0xfa0000 0x50000>;
+ read-only;
+ };
+
+ radio: partition@ff0000 {
+ label = "radio";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&config 0x8>;
+ mtd-mac-address-increment = <1>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ mtd-mac-address = <&config 0x8>;
+ mtd-mac-address-increment = <2>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&config 0x8>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
new file mode 100644
index 0000000..7d38b7b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
@@ -0,0 +1,213 @@
+// 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>
+
+/ {
+ compatible = "tplink,archer-c6u-v1", "mediatek,mt7621-soc";
+ model = "TP-Link Archer C6U v1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ wan-orange {
+ label = "orange:wan";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi5g {
+ label = "green:wifi5g";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wifi2g {
+ label = "green:wifi2g";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wan-green {
+ label = "green:wan";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ reg_usb_vbus: regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x000000 0x040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x040000 0xf60000>;
+ };
+
+ config: partition@fa0000 {
+ label = "config";
+ reg = <0xfa0000 0x010000>;
+ read-only;
+ };
+
+ partition@fb0000 {
+ label = "tplink";
+ reg = <0xfb0000 0x040000>;
+ read-only;
+ };
+
+ radio: partition@ff0000 {
+ label = "radio";
+ reg = <0xff0000 0x010000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&config 0x8>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ mtd-mac-address = <&config 0x8>;
+ mtd-mac-address-increment = <(-1)>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+};
+
+&gmac0 {
+ mtd-mac-address = <&config 0x8>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&config 0x8>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "jtag", "wdt", "sdhci";
+ function = "gpio";
+ };
+};
+
+&xhci {
+ vbus-supply = <®_usb_vbus>;
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
new file mode 100644
index 0000000..17308eb
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
@@ -0,0 +1,180 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ compatible = "tplink,eap235-wall-v1", "mediatek,mt7621-soc";
+ model = "TP-Link EAP235-Wall v1";
+
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "white:status";
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ led {
+ label = "led";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_LIGHTS_TOGGLE>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+
+ poe_passthrough {
+ gpio-export,name = "poe-passthrough";
+ gpio-export,output = <0>;
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x00000 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "partition-table";
+ reg = <0x80000 0x10000>;
+ read-only;
+ };
+
+ info: partition@90000 {
+ label = "product-info";
+ reg = <0x90000 0x10000>;
+ read-only;
+ };
+
+ partition@a0000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x0a0000 0xd20000>;
+ };
+
+ partition@dc0000 {
+ label = "user-config";
+ reg = <0xdc0000 0x030000>;
+ read-only;
+ };
+
+ /* 0xdf0000 - 0xf30000 unused */
+
+ partition@f30000 {
+ label = "mutil-log";
+ reg = <0xf30000 0x080000>;
+ read-only;
+ };
+
+ partition@fb0000 {
+ label = "oops";
+ reg = <0xfb0000 0x040000>;
+ read-only;
+ };
+
+ radio: partition@ff0000 {
+ label = "radio";
+ reg = <0xff0000 0x010000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&info 0x8>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&info 0x8>;
+ mtd-mac-address-increment = <1>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&info 0x8>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan0";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
new file mode 100644
index 0000000..9f29ecd
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
@@ -0,0 +1,166 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tplink,re350-v1", "mediatek,mt7621-soc";
+ model = "TP-LINK RE350 v1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2g {
+ label = "blue:wifi2G";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi5g {
+ label = "blue:wifi5G";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+
+ wps_r {
+ label = "red:wps";
+ gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ };
+
+ wps_b {
+ label = "blue:wps";
+ gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
+ };
+
+ eth {
+ label = "green:eth_act";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ };
+
+ eth2 {
+ label = "green:eth_link";
+ gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ led {
+ label = "led";
+ gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ power {
+ label = "power";
+ gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_POWER>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x5e0000>;
+ };
+
+ config: partition@600000 {
+ label = "config";
+ reg = <0x600000 0x50000>;
+ read-only;
+ };
+
+ radio: partition@7f0000 {
+ label = "radio";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&config 0x10008>;
+ mtd-mac-address-increment = <1>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&config 0x10008>;
+ mtd-mac-address-increment = <2>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&config 0x10008>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "rgmii2", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_re500-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re500-v1.dts
new file mode 100644
index 0000000..f199423
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tplink_re500-v1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_tplink_rexx0-v1.dtsi"
+
+/ {
+ compatible = "tplink,re500-v1", "mediatek,mt7621-soc";
+ model = "TP-Link RE500 v1";
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_re650-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re650-v1.dts
new file mode 100644
index 0000000..dcc5a3b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tplink_re650-v1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_tplink_rexx0-v1.dtsi"
+
+/ {
+ compatible = "tplink,re650-v1", "mediatek,mt7621-soc";
+ model = "TP-Link RE650 v1";
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
new file mode 100644
index 0000000..45a9830
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
@@ -0,0 +1,179 @@
+// 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>
+
+/ {
+ aliases {
+ label-mac-device = &gmac0;
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ power {
+ label = "power";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_POWER>;
+ };
+
+ led {
+ label = "led";
+ gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_LIGHTS_TOGGLE>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2g {
+ label = "blue:wifi2g";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wifi5g {
+ label = "blue:wifi5g";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wps_red {
+ label = "red:wps";
+ gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
+ };
+
+ wps_blue {
+ label = "blue:wps";
+ gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
+ };
+
+ eth_act {
+ label = "green:eth_act";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ };
+
+ eth_link {
+ label = "green:eth_link";
+ gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0xde0000>;
+ };
+
+ config: partition@e00000 {
+ label = "config";
+ reg = <0xe00000 0x50000>;
+ read-only;
+ };
+
+ /* range 0xe50000 to 0xff0000 is empty in vendor
+ * firmware, so we do not use it either
+ */
+
+ radio: partition@ff0000 {
+ label = "radio";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "rgmii2", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&config 0x10008>;
+ mtd-mac-address-increment = <1>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ mtd-mac-address = <&config 0x10008>;
+ mtd-mac-address-increment = <2>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&config 0x10008>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
new file mode 100644
index 0000000..9f92178
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
@@ -0,0 +1,73 @@
+#include "mt7621_ubnt_edgerouter-x.dtsi"
+
+/ {
+ model = "Ubiquiti EdgeRouter X SFP";
+ compatible = "ubnt,edgerouter-x-sfp", "mediatek,mt7621-soc";
+
+ sfp_eth5: sfp_eth5 {
+ compatible = "sff,sfp";
+ i2c-bus = <&i2c>;
+ mod-def0-gpio = <&expander0 5 GPIO_ACTIVE_LOW>;
+ maximum-power-milliwatt = <1000>;
+ };
+};
+
+&i2c {
+ status = "okay";
+
+ /*
+ * PCA9655 GPIO expander
+ * 0-POE power port eth0
+ * 1-POE power port eth1
+ * 2-POE power port eth2
+ * 3-POE power port eth3
+ * 4-POE power port eth4
+ * 5-SFP_MOD_DEF0#
+ * 6-
+ * 7-
+ * 8-Pull up to VCC
+ * 9-Pull down to GND
+ * 10-Pull down to GND
+ * 11-Pull down to GND
+ * 12-Pull down to GND
+ * 13-Pull down to GND
+ * 14-Pull down to GND
+ * 15-Pull down to GND
+ */
+ expander0: pca9555@25 {
+ compatible = "nxp,pca9555";
+ interrupt-parent = <&gpio>;
+ interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ reg = <0x25>;
+ };
+};
+
+&gpio {
+ sfp_i2c_clk_gate {
+ gpio-hog;
+ gpios = <7 GPIO_ACTIVE_LOW>;
+ output-high;
+ };
+};
+
+&mdio {
+ ephy7: ethernet-phy@7 {
+ reg = <7>;
+ sfp = <&sfp_eth5>;
+ };
+};
+
+&switch0 {
+ ports {
+ port@5 {
+ reg = <5>;
+ label = "eth5";
+ phy-handle = <&ephy7>;
+ phy-mode = "rgmii-rxid";
+ mtd-mac-address = <&factory 0x22>;
+ mtd-mac-address-increment = <5>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts
new file mode 100644
index 0000000..bca7c61
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts
@@ -0,0 +1,6 @@
+#include "mt7621_ubnt_edgerouter-x.dtsi"
+
+/ {
+ model = "Ubiquiti EdgeRouter X";
+ compatible = "ubnt,edgerouter-x", "mediatek,mt7621-soc";
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
new file mode 100644
index 0000000..04eb49b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
@@ -0,0 +1,143 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = &gmac0;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x22>;
+ label = "dsa";
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "eth0";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "eth1";
+ mtd-mac-address = <&factory 0x22>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@2 {
+ status = "okay";
+ label = "eth2";
+ mtd-mac-address = <&factory 0x22>;
+ mtd-mac-address-increment = <2>;
+ };
+
+ port@3 {
+ status = "okay";
+ label = "eth3";
+ mtd-mac-address = <&factory 0x22>;
+ mtd-mac-address-increment = <3>;
+ };
+
+ port@4 {
+ status = "okay";
+ label = "eth4";
+ mtd-mac-address = <&factory 0x22>;
+ mtd-mac-address-increment = <4>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "u-boot-env";
+ reg = <0x80000 0x60000>;
+ read-only;
+ };
+
+ factory: partition@e0000 {
+ label = "factory";
+ reg = <0xe0000 0x60000>;
+ };
+
+ partition@140000 {
+ label = "kernel1";
+ reg = <0x140000 0x300000>;
+ };
+
+ partition@440000 {
+ label = "kernel2";
+ reg = <0x440000 0x300000>;
+ };
+
+ partition@740000 {
+ label = "ubi";
+ reg = <0x740000 0xf7c0000>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "pcie", "rgmii2", "jtag";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ /*
+ * This board has 2Mb spi flash soldered in and visible
+ * from manufacturer's firmware.
+ * But this SoC shares spi and nand pins,
+ * and current driver doesn't handle this sharing well
+ */
+ status = "disabled";
+
+ flash@1 {
+ compatible = "jedec,spi-nor";
+ reg = <1>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "spi";
+ reg = <0x0 0x200000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
new file mode 100644
index 0000000..d374fd3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_ubnt_unifi.dtsi"
+
+/ {
+ compatible = "ubnt,unifi-6-lite", "mediatek,mt7621-soc";
+ model = "Ubiquiti UniFi 6 Lite";
+
+ chosen {
+ bootargs-override = "console=ttyS0,115200";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x60000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "u-boot-env";
+ reg = <0x60000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@70000 {
+ label = "factory";
+ reg = <0x70000 0x40000>;
+ read-only;
+ };
+
+ eeprom: partition@b0000 {
+ label = "eeprom";
+ reg = <0xb0000 0x10000>;
+ read-only;
+ };
+
+ partition@c0000 {
+ label = "bs";
+ reg = <0xc0000 0x10000>;
+ };
+
+ partition@d0000 {
+ label = "cfg";
+ reg = <0xd0000 0x100000>;
+ read-only;
+ };
+
+ partition@1d0000 {
+ compatible = "denx,fit";
+ label = "firmware";
+ reg = <0x1d0000 0xf10000>;
+ };
+
+ partition@10e0000 {
+ label = "kernel1";
+ reg = <0x10e0000 0xf10000>;
+ };
+ };
+ };
+};
+
+&wlan_2g {
+ mtd-mac-address = <&eeprom 0x0>;
+};
+
+&wlan_5g {
+ mediatek,mtd-eeprom = <&factory 0x20000>;
+ mtd-mac-address = <&eeprom 0x6>;
+ ieee80211-freq-limit = <5000000 6000000>;
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts
new file mode 100644
index 0000000..7a36ecf
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts
@@ -0,0 +1,75 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_ubnt_unifi.dtsi"
+
+/ {
+ compatible = "ubnt,unifi-nanohd", "mediatek,mt7621-soc";
+ model = "Ubiquiti UniFi nanoHD";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x60000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "u-boot-env";
+ reg = <0x60000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@70000 {
+ label = "factory";
+ reg = <0x70000 0x10000>;
+ read-only;
+ };
+
+ eeprom: partition@80000 {
+ label = "eeprom";
+ reg = <0x80000 0x10000>;
+ read-only;
+ };
+
+ partition@90000 {
+ label = "bs";
+ reg = <0x90000 0x10000>;
+ };
+
+ partition@a0000 {
+ label = "cfg";
+ reg = <0xa0000 0x100000>;
+ read-only;
+ };
+
+ partition@1a0000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x1a0000 0xf30000>;
+ };
+
+ partition@10d0000 {
+ label = "kernel1";
+ reg = <0x10d0000 0xf30000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&wlan_5g {
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi.dtsi b/target/linux/ramips/dts/mt7621_ubnt_unifi.dtsi
new file mode 100644
index 0000000..e0625ba
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_ubnt_unifi.dtsi
@@ -0,0 +1,81 @@
+// 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>
+
+/ {
+ aliases {
+ led-boot = &led_white;
+ led-failsafe = &led_white;
+ led-running = &led_blue;
+ led-upgrade = &led_blue;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_blue: dome_blue {
+ label = "blue:dome";
+ gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_white: dome_white {
+ label = "white:dome";
+ gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wlan_2g: wifi@0,0 {
+ reg = <0x0 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&pcie1 {
+ wlan_5g: wifi@0,0 {
+ reg = <0x0 0 0 0 0>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&eeprom 0x0>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
new file mode 100644
index 0000000..d063f08
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_unielec_u7621-01.dtsi"
+
+/ {
+ compatible = "unielec,u7621-01-16m", "unielec,u7621-01", "mediatek,mt7621-soc";
+ model = "UniElec U7621-01 (16M flash)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <14000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
new file mode 100644
index 0000000..336f68e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
@@ -0,0 +1,115 @@
+// 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>
+
+/ {
+ compatible = "unielec,u7621-01", "mediatek,mt7621-soc";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ modem_reset {
+ gpio-export,name = "modem_reset";
+ gpio-export,output = <1>;
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart2", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts
new file mode 100644
index 0000000..e9789cf
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
+ * All rights reserved.
+ */
+
+#include "mt7621_unielec_u7621-06.dtsi"
+
+/ {
+ compatible = "unielec,u7621-06-16m", "unielec,u7621-06", "mediatek,mt7621-soc";
+ model = "UniElec U7621-06 (16M flash)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <14000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts
new file mode 100644
index 0000000..74e4d66
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
+ * Copyright(c) 2018 Nishant Sharma <codemarauder@gmail.com>.
+ * All rights reserved.
+ */
+
+#include "mt7621_unielec_u7621-06.dtsi"
+
+/ {
+ compatible = "unielec,u7621-06-64m", "unielec,u7621-06", "mediatek,mt7621-soc";
+ model = "UniElec U7621-06 (64M flash)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3fb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
new file mode 100644
index 0000000..3b149df
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
@@ -0,0 +1,116 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
+ * All rights reserved.
+ */
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "unielec,u7621-06", "mediatek,mt7621-soc";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ modem_reset {
+ gpio-export,name = "modem_reset";
+ gpio-export,output = <1>;
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ };
+
+ led4 {
+ label = "green:led4";
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ led5 {
+ label = "green:led5";
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart2", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts
new file mode 100644
index 0000000..04f656d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts
@@ -0,0 +1,183 @@
+// 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>
+
+/ {
+ compatible = "wavlink,wl-wn531a6", "mediatek,mt7621-soc";
+ model = "Wavlink WL-WN531A6";
+
+ aliases {
+ led-boot = &led_status_red;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_red;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "Reset Button";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ touch { /* RH6015C touch sensor -> GPIO 14 */
+ label = "Touch Button";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ turbo {
+ label = "Turbo Button";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+
+ wps {
+ label = "WPS Button";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_blue: status_blue {
+ label = "blue:power";
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_status_red: status_red {
+ label = "red:power";
+ gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ };
+
+ wifi2g {
+ label = "blue:wifi2g";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xeb0000>;
+ };
+
+ partition@f00000 {
+ label = "vendor";
+ reg = <0xf00000 0x100000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "rgmii2", "jtag", "wdt";
+ function = "gpio";
+ };
+};
+
+&uartlite2 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621_wevo_11acnas.dts b/target/linux/ramips/dts/mt7621_wevo_11acnas.dts
new file mode 100644
index 0000000..60d3185
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_wevo_11acnas.dts
@@ -0,0 +1,17 @@
+#include "mt7621_wevo_w2914ns-v2.dtsi"
+
+/ {
+ compatible = "wevo,11acnas", "mediatek,mt7621-soc";
+ model = "WeVO 11AC NAS Router";
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dts b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dts
new file mode 100644
index 0000000..bd44983
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dts
@@ -0,0 +1,17 @@
+#include "mt7621_wevo_w2914ns-v2.dtsi"
+
+/ {
+ compatible = "wevo,w2914ns-v2", "mediatek,mt7621-soc";
+ model = "WeVO W2914NS v2";
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi
new file mode 100644
index 0000000..ffa86a4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi
@@ -0,0 +1,138 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = &wan;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+
+ led {
+ led-sources = <0>;
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x2e>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts
new file mode 100644
index 0000000..803bf5c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts
@@ -0,0 +1,149 @@
+// 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>
+
+/ {
+ compatible = "winstars,ws-wn583a6", "mediatek,mt7621-soc";
+ model = "Winstars WS-WN583A6";
+
+ aliases {
+ led-boot = &led_status_red;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_red;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ night_light_white {
+ label = "white:night_light";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+
+ status_amber {
+ label = "amber:status";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <104000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
new file mode 100644
index 0000000..e8f3a50
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
@@ -0,0 +1,212 @@
+// 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>
+
+/ {
+ compatible = "xiaomi,mi-router-3-pro", "mediatek,mt7621-soc";
+ model = "Xiaomi Mi Router 3 Pro";
+
+ aliases {
+ led-boot = &led_status_yellow;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_yellow;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_yellow: status_yellow {
+ label = "yellow:status";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_amber {
+ label = "amber:wan";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:04:1Gbps";
+ };
+
+ lan3_amber {
+ label = "amber:lan3";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:03:1Gbps";
+ };
+
+ lan2_amber {
+ label = "amber:lan2";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:02:1Gbps";
+ };
+
+ lan1_amber {
+ label = "amber:lan1";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:01:1Gbps";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ reg_usb_vbus: regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&xhci {
+ vbus-supply = <®_usb_vbus>;
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x40000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "Config";
+ reg = <0x40000 0x40000>;
+ };
+
+ partition@80000 {
+ label = "Bdata";
+ reg = <0x80000 0x40000>;
+ read-only;
+ };
+
+ factory: partition@c0000 {
+ label = "factory";
+ reg = <0x0c0000 0x40000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "crash";
+ reg = <0x100000 0x40000>;
+ };
+
+ partition@140000 {
+ label = "crash_syslog";
+ reg = <0x140000 0x80000>;
+ };
+
+ partition@1c0000 {
+ label = "reserved0";
+ reg = <0x1c0000 0x40000>;
+ read-only;
+ };
+
+ /* We keep stock xiaomi firmware (kernel0) here */
+ partition@200000 {
+ label = "kernel_stock";
+ reg = <0x200000 0x400000>;
+ };
+
+ partition@600000 {
+ label = "kernel";
+ reg = <0x600000 0x400000>;
+ };
+
+ partition@a00000 {
+ label = "ubi";
+ reg = <0xa00000 0xf580000>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe006>;
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g-v2.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g-v2.dts
new file mode 100644
index 0000000..fe03ff1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g-v2.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_xiaomi_mi-router-4a-3g-v2.dtsi"
+
+/ {
+ compatible = "xiaomi,mi-router-3g-v2", "mediatek,mt7621-soc";
+ model = "Xiaomi Mi Router 3G v2";
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts
new file mode 100644
index 0000000..40ea662
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts
@@ -0,0 +1,117 @@
+#include "mt7621_xiaomi_nand_128m.dtsi"
+
+/ {
+ compatible = "xiaomi,mi-router-3g", "mediatek,mt7621-soc";
+ model = "Xiaomi Mi Router 3G";
+
+ aliases {
+ led-boot = &led_status_yellow;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_yellow;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_yellow: status_yellow {
+ label = "yellow:status";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_amber {
+ label = "amber:wan";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:01:1Gbps";
+ };
+
+ lan1_amber {
+ label = "amber:lan1";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:03:1Gbps";
+ };
+
+ lan2_amber {
+ label = "amber:lan2";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "dsa-0.0:02:1Gbps";
+ };
+ };
+
+ reg_usb_vbus: regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&xhci {
+ vbus-supply = <®_usb_vbus>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe006>;
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
new file mode 100644
index 0000000..18cbe0c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_xiaomi_nand_128m.dtsi"
+
+/ {
+ compatible = "xiaomi,mi-router-4", "mediatek,mt7621-soc";
+ model = "Xiaomi Mi Router 4";
+
+ aliases {
+ led-boot = &led_status_yellow;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_yellow;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_yellow: status_yellow {
+ label = "yellow:status";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&keys {
+ minet {
+ label = "minet";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
new file mode 100644
index 0000000..cc5abf0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
@@ -0,0 +1,162 @@
+// 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>
+
+/ {
+ aliases {
+ led-boot = &led_status_yellow;
+ led-failsafe = &led_status_yellow;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_yellow;
+ label-mac-device = &wan;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_yellow: status_yellow {
+ label = "yellow:status";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "Bdata";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@50000 {
+ label = "factory";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "crash";
+ reg = <0x60000 0x10000>;
+ read-only;
+ };
+
+ partition@70000 {
+ label = "cfg_bak";
+ reg = <0x70000 0x10000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "overlay";
+ reg = <0x80000 0x100000>;
+ read-only;
+ };
+
+ firmware: partition@180000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x180000 0xe80000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ wan: port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit.dts
new file mode 100644
index 0000000..4387d3b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_xiaomi_mi-router-4a-3g-v2.dtsi"
+
+/ {
+ compatible = "xiaomi,mi-router-4a-gigabit", "mediatek,mt7621-soc";
+ model = "Xiaomi Mi Router 4A Gigabit Edition";
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts
new file mode 100644
index 0000000..6cca16a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_xiaomi_router-ac2100.dtsi"
+
+/ {
+ compatible = "xiaomi,mi-router-ac2100", "mediatek,mt7621-soc";
+ model = "Xiaomi Mi Router AC2100";
+
+ aliases {
+ led-boot = &led_status_yellow;
+ led-failsafe = &led_status_yellow;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_blue;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan_yellow {
+ label = "yellow:wan";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_blue {
+ label = "blue:wan";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_yellow: status_yellow {
+ label = "yellow:status";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_nand_128m.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_nand_128m.dtsi
new file mode 100644
index 0000000..12e6bcc
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_nand_128m.dtsi
@@ -0,0 +1,109 @@
+// 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>
+
+/ {
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ keys: keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "Config";
+ reg = <0x80000 0x40000>;
+ };
+
+ partition@c0000 {
+ label = "Bdata";
+ reg = <0xc0000 0x40000>;
+ read-only;
+ };
+
+ factory: partition@100000 {
+ label = "factory";
+ reg = <0x100000 0x40000>;
+ read-only;
+ };
+
+ partition@140000 {
+ label = "crash";
+ reg = <0x140000 0x40000>;
+ };
+
+ partition@180000 {
+ label = "crash_syslog";
+ reg = <0x180000 0x40000>;
+ };
+
+ partition@1c0000 {
+ label = "reserved0";
+ reg = <0x1c0000 0x40000>;
+ read-only;
+ };
+
+ /* uboot expects to find kernels at 0x200000 & 0x600000
+ * referred to as system 1 & system 2 respectively.
+ * a kernel is considered suitable for handing control over
+ * if its linux magic number exists & uImage CRC are correct.
+ * If either of those conditions fail, a matching sys'n'_fail flag
+ * is set in uboot env & a restart performed in the hope that the
+ * alternate kernel is okay.
+ * if neither kernel checksums ok and both are marked failed, system 2
+ * is booted anyway.
+ *
+ * Note uboot's tftp flash install writes the transferred
+ * image to both kernel partitions.
+ */
+
+ /* We keep stock xiaomi firmware (kernel0) here */
+ partition@200000 {
+ label = "kernel_stock";
+ reg = <0x200000 0x400000>;
+ };
+
+ partition@600000 {
+ label = "kernel";
+ reg = <0x600000 0x400000>;
+ };
+
+ /* ubi partition is the result of squashing
+ * next consecutive stock partitions:
+ * - rootfs0 (rootfs partition for stock kernel0),
+ * - rootfs1 (rootfs partition for stock failsafe kernel1),
+ * - overlay (used as ubi overlay in stock fw)
+ * resulting 117,5MiB space for packages.
+ */
+
+ partition@a00000 {
+ label = "ubi";
+ reg = <0xa00000 0x7580000>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts b/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts
new file mode 100644
index 0000000..4299de3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_xiaomi_router-ac2100.dtsi"
+
+/ {
+ compatible = "xiaomi,redmi-router-ac2100", "mediatek,mt7621-soc";
+ model = "Xiaomi Redmi Router AC2100";
+
+ aliases {
+ led-boot = &led_status_amber;
+ led-failsafe = &led_status_amber;
+ led-running = &led_status_white;
+ led-upgrade = &led_status_white;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_amber: status_amber {
+ label = "amber:status";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_white: status_white {
+ label = "white:status";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_amber {
+ label = "amber:wan";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_white {
+ label = "white:wan";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
new file mode 100644
index 0000000..7e6b3af
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_xiaomi_nand_128m.dtsi"
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan3";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
new file mode 100644
index 0000000..a87bcd0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
@@ -0,0 +1,128 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "xiaoyu,xy-c5", "mediatek,mt7621-soc";
+ model = "XiaoYu XY-C5";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ work {
+ label = "green:work";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_sys: sys {
+ label = "green:sys";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
new file mode 100644
index 0000000..182b6db
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
@@ -0,0 +1,195 @@
+// 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>
+
+/ {
+ compatible = "xzwifi,creativebox-v1", "mediatek,mt7621-soc";
+ model = "CreativeBox v1";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "blue:power";
+ gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_sys: sys {
+ label = "blue:sys";
+ gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ power_usb2 {
+ gpio-export,name = "power_usb2";
+ gpio-export,output = <1>;
+ gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_usb3 {
+ gpio-export,name = "power_usb3";
+ gpio-export,output = <1>;
+ gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ };
+
+ power_sata {
+ gpio-export,name = "power_sata";
+ gpio-export,output = <1>;
+ gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci1400,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
new file mode 100644
index 0000000..a77d13c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
@@ -0,0 +1,166 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "youhua,wr1200js", "mediatek,mt7621-soc";
+ model = "YouHua WR1200JS";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "blue:wps";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ wifi {
+ label = "wifi";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan4";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts
new file mode 100644
index 0000000..6271888
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts
@@ -0,0 +1,174 @@
+// 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>
+
+/ {
+ compatible = "youku,yk-l2", "mediatek,mt7621-soc";
+ model = "Youku YK-L2";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_wps;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_wps: wps {
+ label = "blue:wps";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ led {
+ led-active-low;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
new file mode 100644
index 0000000..9775ec3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
@@ -0,0 +1,133 @@
+// 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>
+
+/ {
+ compatible = "yuncore,ax820", "mediatek,mt7621-soc";
+ model = "YunCore AX820";
+
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_green;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_green;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_green: status_green {
+ label = "green:status";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ watchdog {
+ compatible = "linux,wdt-gpio";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ hw_algo = "toggle";
+ hw_margin_ms = <200>;
+ always-running;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "Config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ /* range 0x40000 to 0x50000 is empty in vendor
+ * firmware, so we do not use it either
+ */
+
+ factory: partition@50000 {
+ label = "Factory";
+ reg = <0x50000 0x40000>;
+ read-only;
+ };
+
+ partition@90000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x90000 0xf70000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
new file mode 100644
index 0000000..cd71166
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
@@ -0,0 +1,132 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-we1326", "mediatek,mt7621-soc";
+ model = "Zbtlink ZBT-WE1326";
+
+ aliases {
+ label-mac-device = &wifi1;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi0: mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ wifi1: mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
new file mode 100644
index 0000000..10e08cd
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
@@ -0,0 +1,137 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-we3526", "mediatek,mt7621-soc";
+ model = "Zbtlink ZBT-WE3526";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ };
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe006>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
new file mode 100644
index 0000000..06c4f1d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
@@ -0,0 +1,152 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-wg2626", "mediatek,mt7621-soc";
+ model = "Zbtlink ZBT-WG2626";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+
+ reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
+ <&gpio 8 GPIO_ACTIVE_LOW>;
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526-16m.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526-16m.dts
new file mode 100644
index 0000000..4094ef1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526-16m.dts
@@ -0,0 +1,10 @@
+#include "mt7621_zbtlink_zbt-wg3526.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-wg3526-16m", "zbtlink,zbt-wg3526", "mediatek,mt7621-soc";
+ model = "Zbtlink ZBT-WG3526 (16M)";
+};
+
+&firmware {
+ reg = <0x50000 0xfb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526-32m.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526-32m.dts
new file mode 100644
index 0000000..66a7622
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526-32m.dts
@@ -0,0 +1,14 @@
+#include "mt7621_zbtlink_zbt-wg3526.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-wg3526-32m", "zbtlink,zbt-wg3526", "mediatek,mt7621-soc";
+ model = "Zbtlink ZBT-WG3526 (32M)";
+};
+
+&flash0 {
+ broken-flash-reset;
+};
+
+&firmware {
+ reg = <0x50000 0x1fb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
new file mode 100644
index 0000000..1e44945
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
@@ -0,0 +1,153 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zbtlink,zbt-wg3526", "mediatek,mt7621-soc";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ label-mac-device = &wifi0;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ };
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi0: wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
+
+&pcie1 {
+ wifi1: wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ };
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "rgmii2";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_zio_freezio.dts b/target/linux/ramips/dts/mt7621_zio_freezio.dts
new file mode 100644
index 0000000..be7e5dc
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zio_freezio.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_wevo_w2914ns-v2.dtsi"
+
+/ {
+ compatible = "zio,freezio", "mediatek,mt7621-soc";
+ model = "ZIO FREEZIO";
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&xhci_ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts
new file mode 100644
index 0000000..f6a4228
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts
@@ -0,0 +1,164 @@
+// 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>
+
+/ {
+ compatible = "zyxel,nr7101", "mediatek,mt7621-soc";
+ model = "ZyXEL NR7101";
+
+ aliases {
+ led-boot = &power;
+ led-failsafe = &power;
+ led-running = &power;
+ led-upgrade = &power;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led@13 {
+ label = "yellow:system";
+ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+ };
+
+ power: led@14 {
+ label = "green:system";
+ gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ led@15 {
+ label = "red:system";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wlan";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WLAN>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio {
+ lte_pwrkey {
+ gpio-hog;
+ gpios = <4 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "lte-pwrkey";
+ };
+
+ lte_power {
+ gpio-hog;
+ gpios = <18 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "lte-power";
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "Config";
+ reg = <0x80000 0x80000>;
+ };
+
+ factory: partition@100000 {
+ label = "Factory";
+ reg = <0x100000 0x40000>;
+ read-only;
+ };
+
+ partition@140000 {
+ label = "Kernel";
+ reg = <0x140000 0x1ec0000>;
+ };
+
+ partition@540000 {
+ label = "ubi";
+ reg = <0x540000 0x1ac0000>;
+ };
+
+ partition@2140000 {
+ label = "Kernel2";
+ reg = <0x2140000 0x1ec0000>;
+ };
+
+ partition@4000000 {
+ label = "wwan";
+ reg = <0x4000000 0x100000>;
+ };
+
+ partition@4100000 {
+ label = "data";
+ reg = <0x4100000 0x1000000>;
+ };
+
+ partition@5100000 {
+ label = "rom-d";
+ reg = <0x5100000 0x100000>;
+ read-only;
+ };
+
+ partition@5200000 {
+ label = "reserve";
+ reg = <0x5200000 0x80000>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+ ports {
+ port@2 {
+ status = "okay";
+ label = "lan";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "rgmii2", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts
new file mode 100644
index 0000000..0596dc7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts
@@ -0,0 +1,173 @@
+// 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>
+
+/ {
+ compatible = "zyxel,wap6805", "mediatek,mt7621-soc";
+ model = "ZyXEL WAP6805";
+
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_green;
+ label-mac-device = &gmac0;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ status_blink {
+ label = "blink:status";
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_status_green: status_green {
+ label = "green:status";
+ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x100000>;
+ read-only;
+ };
+
+ partition@100000 {
+ label = "MRD";
+ reg = <0x100000 0x100000>;
+ read-only;
+ };
+
+ factory: partition@200000 {
+ label = "Factory";
+ reg = <0x200000 0x100000>;
+ read-only;
+ };
+
+ partition@300000 {
+ label = "Config";
+ reg = <0x300000 0x100000>;
+ };
+
+ partition@400000 {
+ label = "Kernel";
+ reg = <0x400000 0x2000000>;
+ };
+
+ partition@800000 {
+ label = "ubi";
+ reg = <0x800000 0x1c00000>;
+ };
+
+ partition@2400000 {
+ label = "Kernel2";
+ reg = <0x2400000 0x2000000>;
+ };
+
+ partition@4400000 {
+ label = "Private";
+ reg = <0x4400000 0x100000>;
+ };
+
+ partition@4500000 {
+ label = "Log";
+ reg = <0x4500000 0x1000000>;
+ };
+
+ partition@5500000 {
+ label = "App";
+ reg = <0x5500000 0x2b00000>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ };
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0xe000>;
+};
+
+&gmac1 {
+ status = "okay";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan4";
+ };
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+ port@3 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart3", "jtag", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi
new file mode 100644
index 0000000..aa46de7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an.dtsi
@@ -0,0 +1,498 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mediatek,mt7628an-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "mips,mips24KEc";
+ reg = <0>;
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ aliases {
+ serial0 = &uartlite;
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ palmbus: palmbus@10000000 {
+ compatible = "palmbus";
+ reg = <0x10000000 0x200000>;
+ ranges = <0x0 0x10000000 0x1FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "ralink,mt7620a-sysc", "syscon";
+ reg = <0x0 0x100>;
+ };
+
+ watchdog: watchdog@100 {
+ compatible = "ralink,mt7628an-wdt", "mediatek,mt7621-wdt";
+ reg = <0x100 0x30>;
+
+ resets = <&rstctrl 8>;
+ reset-names = "wdt";
+
+ interrupt-parent = <&intc>;
+ interrupts = <24>;
+ };
+
+ intc: intc@200 {
+ compatible = "ralink,mt7628an-intc", "ralink,rt2880-intc";
+ reg = <0x200 0x100>;
+
+ resets = <&rstctrl 9>;
+ reset-names = "intc";
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+
+ ralink,intc-registers = <0x9c 0xa0
+ 0x6c 0xa4
+ 0x80 0x78>;
+ };
+
+ memc: memc@300 {
+ compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc";
+ reg = <0x300 0x100>;
+
+ resets = <&rstctrl 20>;
+ reset-names = "mc";
+
+ interrupt-parent = <&intc>;
+ interrupts = <3>;
+ };
+
+ gpio: gpio@600 {
+ compatible = "mediatek,mt7621-gpio";
+ reg = <0x600 0x100>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ #interrupt-cells = <2>;
+ interrupt-controller;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ i2c: i2c@900 {
+ compatible = "mediatek,mt7621-i2c";
+ reg = <0x900 0x100>;
+
+ resets = <&rstctrl 16>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ };
+
+ i2s: i2s@a00 {
+ compatible = "mediatek,mt7628-i2s";
+ reg = <0xa00 0x100>;
+
+ resets = <&rstctrl 17>;
+ reset-names = "i2s";
+
+ interrupt-parent = <&intc>;
+ interrupts = <10>;
+
+ txdma-req = <2>;
+ rxdma-req = <3>;
+
+ dmas = <&gdma 4>,
+ <&gdma 6>;
+ dma-names = "tx", "rx";
+
+ status = "disabled";
+ };
+
+ spi0: spi@b00 {
+ compatible = "ralink,mt7621-spi";
+ reg = <0xb00 0x100>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>;
+
+ status = "disabled";
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ns16550a";
+ reg = <0xc00 0x100>;
+
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ no-loopback-test;
+
+ clock-frequency = <40000000>;
+
+ resets = <&rstctrl 12>;
+ reset-names = "uartl";
+
+ interrupt-parent = <&intc>;
+ interrupts = <20>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+ };
+
+ uart1: uart1@d00 {
+ compatible = "ns16550a";
+ reg = <0xd00 0x100>;
+
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ no-loopback-test;
+
+ clock-frequency = <40000000>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "uart1";
+
+ interrupt-parent = <&intc>;
+ interrupts = <21>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>;
+
+ status = "disabled";
+ };
+
+ uart2: uart2@e00 {
+ compatible = "ns16550a";
+ reg = <0xe00 0x100>;
+
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ no-loopback-test;
+
+ clock-frequency = <40000000>;
+
+ resets = <&rstctrl 20>;
+ reset-names = "uart2";
+
+ interrupt-parent = <&intc>;
+ interrupts = <22>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+
+ status = "disabled";
+ };
+
+ pwm: pwm@5000 {
+ compatible = "mediatek,mt7628-pwm";
+ reg = <0x5000 0x1000>;
+ #pwm-cells = <2>;
+
+ resets = <&rstctrl 31>;
+ reset-names = "pwm";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm0_pins>, <&pwm1_pins>;
+
+ status = "disabled";
+ };
+
+ pcm: pcm@2000 {
+ compatible = "ralink,mt7620a-pcm";
+ reg = <0x2000 0x800>;
+
+ resets = <&rstctrl 11>;
+ reset-names = "pcm";
+
+ interrupt-parent = <&intc>;
+ interrupts = <4>;
+
+ status = "disabled";
+ };
+
+ gdma: gdma@2800 {
+ compatible = "ralink,rt3883-gdma";
+ reg = <0x2800 0x800>;
+
+ resets = <&rstctrl 14>;
+ reset-names = "dma";
+
+ interrupt-parent = <&intc>;
+ interrupts = <7>;
+
+ #dma-cells = <1>;
+ #dma-channels = <16>;
+ #dma-requests = <16>;
+
+ status = "disabled";
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ spi_cs1_pins: spi_cs1 {
+ spi_cs1 {
+ groups = "spi cs1";
+ function = "spi cs1";
+ };
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ i2s_pins: i2s {
+ i2s {
+ groups = "i2s";
+ function = "i2s";
+ };
+ };
+
+ uart0_pins: uartlite {
+ uartlite {
+ groups = "uart0";
+ function = "uart0";
+ };
+ };
+
+ uart1_pins: uart1 {
+ uart1 {
+ groups = "uart1";
+ function = "uart1";
+ };
+ };
+
+ uart2_pins: uart2 {
+ uart2 {
+ groups = "uart2";
+ function = "uart2";
+ };
+ };
+
+ sdxc_pins: sdxc {
+ sdxc {
+ groups = "sdmode";
+ function = "sdxc";
+ };
+ };
+
+ pwm0_pins: pwm0 {
+ pwm0 {
+ groups = "pwm0";
+ function = "pwm0";
+ };
+ };
+
+ pwm1_pins: pwm1 {
+ pwm1 {
+ groups = "pwm1";
+ function = "pwm1";
+ };
+ };
+
+ pcm_i2s_pins: pcm_i2s {
+ pcm_i2s {
+ groups = "i2s";
+ function = "pcm";
+ };
+ };
+
+ refclk_pins: refclk {
+ refclk {
+ groups = "refclk";
+ function = "refclk";
+ };
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,mt7620a-reset", "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ usbphy: usbphy@10120000 {
+ compatible = "mediatek,mt7628-usbphy", "mediatek,mt7620-usbphy";
+ reg = <0x10120000 0x1000>;
+ #phy-cells = <0>;
+
+ ralink,sysctl = <&sysc>;
+ resets = <&rstctrl 22 &rstctrl 25>;
+ reset-names = "host", "device";
+ clocks = <&clkctrl 22 &clkctrl 25>;
+ clock-names = "host", "device";
+ };
+
+ sdhci: sdhci@10130000 {
+ compatible = "ralink,mt7620-sdhci";
+ reg = <0x10130000 0x4000>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <14>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdxc_pins>;
+
+ status = "disabled";
+ };
+
+ ehci: ehci@101c0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ehci";
+ reg = <0x101c0000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ ehci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ ohci: ohci@101c1000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ohci";
+ reg = <0x101c1000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ ohci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ ethernet: ethernet@10100000 {
+ compatible = "ralink,rt5350-eth";
+ reg = <0x10100000 0x10000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <5>;
+
+ resets = <&rstctrl 21 &rstctrl 23>;
+ reset-names = "fe", "esw";
+
+ mediatek,switch = <&esw>;
+ };
+
+ esw: esw@10110000 {
+ compatible = "mediatek,mt7628-esw", "ralink,rt3050-esw";
+ reg = <0x10110000 0x8000>;
+
+ resets = <&rstctrl 23>;
+ reset-names = "esw";
+
+ interrupt-parent = <&intc>;
+ interrupts = <17>;
+ };
+
+ pcie: pcie@10140000 {
+ compatible = "mediatek,mt7620-pci";
+ reg = <0x10140000 0x100
+ 0x10142000 0x100>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <4>;
+
+ resets = <&rstctrl 26 &rstctrl 27>;
+ reset-names = "pcie0", "pcie1";
+ clocks = <&clkctrl 26 &clkctrl 27>;
+ clock-names = "pcie0", "pcie1";
+
+ status = "disabled";
+
+ device_type = "pci";
+
+ bus-range = <0 255>;
+ ranges = <
+ 0x02000000 0 0x00000000 0x20000000 0 0x10000000 /* pci memory */
+ 0x01000000 0 0x00000000 0x10160000 0 0x00010000 /* io space */
+ >;
+
+ pcie0: pcie@0,0 {
+ reg = <0x0000 0 0 0 0>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ device_type = "pci";
+
+ ranges;
+ };
+ };
+
+ wmac: wmac@10300000 {
+ compatible = "mediatek,mt7628-wmac";
+ reg = <0x10300000 0x100000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <6>;
+
+ status = "disabled";
+
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts
new file mode 100644
index 0000000..d4f6a09
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts
@@ -0,0 +1,132 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (C) 2018 Piotr Dymacz <pepe2k@gmail.com>
+ * All rights reserved.
+ */
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "alfa-network,awusfree1", "mediatek,mt7628an-soc";
+ model = "ALFA Network AWUSFREE1";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "orange:system";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&esw {
+ mediatek,portdisable = <0x1e>;
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "wdt", "wled_an";
+ function = "gpio";
+ };
+
+ ext_lna {
+ groups = "uart1";
+ function = "sw_r";
+ };
+
+ ext_pa {
+ groups = "i2s";
+ function = "antenna";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x1000>;
+ };
+
+ partition@31000 {
+ label = "config";
+ reg = <0x31000 0xf000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n10p-v3.dts b/target/linux/ramips/dts/mt7628an_asus_rt-n10p-v3.dts
new file mode 100644
index 0000000..b638c21
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_asus_rt-n10p-v3.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7628an_asus_rt-n1x.dtsi"
+
+/ {
+ compatible = "asus,rt-n10p-v3", "mediatek,mt7628an-soc";
+ model = "Asus RT-N10P V3";
+};
diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n11p-b1.dts b/target/linux/ramips/dts/mt7628an_asus_rt-n11p-b1.dts
new file mode 100644
index 0000000..d62d4ad
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_asus_rt-n11p-b1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7628an_asus_rt-n1x.dtsi"
+
+/ {
+ compatible = "asus,rt-n11p-b1", "mediatek,mt7628an-soc";
+ model = "Asus RT-N11P B1";
+};
diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n12-vp-b1.dts b/target/linux/ramips/dts/mt7628an_asus_rt-n12-vp-b1.dts
new file mode 100644
index 0000000..8c44c36
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_asus_rt-n12-vp-b1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7628an_asus_rt-n1x.dtsi"
+
+/ {
+ compatible = "asus,rt-n12-vp-b1", "mediatek,mt7628an-soc";
+ model = "Asus RT-N12 VP B1";
+};
diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi
new file mode 100644
index 0000000..239bb08
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "p0led_an", "p1led_an", "refclk", "wled_an";
+ function = "gpio";
+ };
+};
+
+&usbphy {
+ status = "disabled";
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts
new file mode 100644
index 0000000..cb4c61e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts
@@ -0,0 +1,176 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "buffalo,wcr-1166ds", "mediatek,mt7628an-soc";
+ model = "Buffalo WCR-1166DS";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ router_o {
+ label = "orange:router";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ router_g {
+ label = "green:router";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ };
+
+ internet_o {
+ label = "orange:internet";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ internet_g {
+ label = "green:internet";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless_o {
+ label = "orange:wireless";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless_g {
+ label = "green:wireless";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ diag {
+ label = "orange:diag";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,portdisable = <0x27>;
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart1", "wled_an", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "wdt", "refclk", "gpio", "i2s";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "openwrt,trx";
+ label = "firmware";
+ reg = <0x50000 0x7c0000>;
+ };
+
+ partition@810000 {
+ label = "firmware2";
+ reg = <0x810000 0x7c0000>;
+ };
+
+ partition@fd0000 {
+ label = "glbcfg";
+ reg = <0xfd0000 0x10000>;
+ read-only;
+ };
+
+ partition@fe0000 {
+ label = "board_data";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
new file mode 100644
index 0000000..adc9988
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
@@ -0,0 +1,142 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "cudy,wr1000", "mediatek,mt7628an-soc";
+ model = "Cudy WR1000";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-upgrade = &led_wps;
+ label-mac-device = &wmac;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "rfkill";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan1 {
+ label = "blue:lan1";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ lan2 {
+ label = "blue:lan2";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "blue:wan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ led_wps: wps {
+ label = "blue:wps";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2s", "refclk", "wdt", "p4led_an",
+ "p3led_an", "p2led_an", "wled_an";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts
new file mode 100644
index 0000000..e5c5232
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts
@@ -0,0 +1,161 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "d-team,pbr-d1", "mediatek,mt7628an-soc";
+ model = "PBR-D1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ serial0 = &uart2;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "orange:usb";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_power: power {
+ label = "orange:power";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 70 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ wgpio: gpio-wifi {
+ compatible = "mediatek,gpio-wifi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio";
+ function = "gpio";
+ };
+
+ i2c {
+ groups = "i2c";
+ function = "gpio";
+ };
+
+ i2s {
+ groups = "i2s";
+ function = "gpio";
+ };
+
+ spis {
+ groups = "spis";
+ function = "gpio";
+ };
+
+ wdt {
+ groups = "wdt";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x0fb0000>;
+ };
+ };
+ };
+
+ spidev@1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "linux,spidev";
+ reg = <1>;
+ spi-max-frequency = <40000000>;
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&pwm {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&sdhci {
+ status = "okay";
+ mediatek,cd-high;
+};
diff --git a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts
new file mode 100644
index 0000000..f0d3dcb
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts
@@ -0,0 +1,131 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "duzun,dm06", "mediatek,mt7628an-soc";
+ model = "DuZun DM06";
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "Audio-I2S";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&dailink0_master>;
+ simple-audio-card,frame-master = <&dailink0_master>;
+ simple-audio-card,widgets =
+ "Headphone", "Headphones";
+ simple-audio-card,routing =
+ "Headphones", "HP_L",
+ "Headphones", "HP_R";
+ simple-audio-card,mclk-fs = <256>;
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+
+ dailink0_master: simple-audio-card,codec {
+ sound-dai = <&codec>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "uart1";
+ function = "gpio";
+ };
+};
+
+&i2c {
+ status = "okay";
+
+ codec: wm8960@1a {
+ #sound-dai-cells = <0>;
+ compatible = "wlf,wm8960";
+ reg = <0x1a>;
+
+ wlf,shared-lrclk;
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+ mediatek,portdisable = <0x3c>;
+};
+
+&i2s {
+ #sound-dai-cells = <0>;
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s_pins>, <&refclk_pins>;
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&gdma {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <60000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts
new file mode 100644
index 0000000..aa60b8a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts
@@ -0,0 +1,164 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "elecom,wrc-1167fs", "mediatek,mt7628an-soc";
+ model = "ELECOM WRC-1167FS";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wps {
+ label = "red:wps";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "green:internet";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ ap {
+ label = "ap";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x730000>;
+ };
+
+ partition@780000 {
+ label = "storage";
+ reg = <0x780000 0x80000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,portdisable = <0x27>;
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wled_an", "p3led_an", "p4led_an", "wdt", "refclk", "i2c", "i2s";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts
new file mode 100644
index 0000000..c5e0c2e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts
@@ -0,0 +1,133 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/{
+ compatible = "glinet,gl-mt300n-v2", "mediatek,mt7628an-soc";
+ model = "GL-MT300N-V2";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = ðernet;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ default-state = "on";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "red:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ BTN_0 {
+ label = "BTN_0";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ BTN_1 {
+ label = "BTN_1";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&uart1 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_glinet_microuter-n300.dts b/target/linux/ramips/dts/mt7628an_glinet_microuter-n300.dts
new file mode 100644
index 0000000..09afe72
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_glinet_microuter-n300.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_glinet_vixmini_microuter.dtsi"
+
+/ {
+ compatible = "glinet,microuter-n300", "mediatek,mt7628an-soc";
+ model = "GL.iNet microuter-N300";
+};
+
+&firmware_part {
+ reg = <0x50000 0xfb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_glinet_vixmini.dts b/target/linux/ramips/dts/mt7628an_glinet_vixmini.dts
new file mode 100644
index 0000000..02c29d1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_glinet_vixmini.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_glinet_vixmini_microuter.dtsi"
+
+/ {
+ compatible = "glinet,vixmini", "mediatek,mt7628an-soc";
+ model = "GL.iNet VIXMINI";
+};
+
+&firmware_part {
+ reg = <0x50000 0x7b0000>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi
new file mode 100644
index 0000000..738968d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi
@@ -0,0 +1,104 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_power_blue;
+ led-failsafe = &led_power_blue;
+ led-running = &led_power_blue;
+ led-upgrade = &led_power_blue;
+
+ label-mac-device = ðernet;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_blue: power {
+ label = "blue:power";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "white:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "wled_an", "p1led_an";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ /*
+ * Firmware-partition size is model-specific
+ * due to different flash sizes.
+ */
+ firmware_part: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts
new file mode 100644
index 0000000..eaae0b9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts
@@ -0,0 +1,125 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hak5,wifi-pineapple-mk7", "mediatek,mt7628an-soc";
+ model = "Hak5 WiFi Pineapple Mark 7";
+
+ aliases {
+ led-boot = &led_system_blue;
+ led-failsafe = &led_system_blue;
+ led-upgrade = &led_system_blue;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ system_red {
+ label = "red:system";
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ system_green {
+ label = "green:system";
+ gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_system_blue: system_blue {
+ label = "blue:system";
+ gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb-power {
+ gpio-export,name = "usb-power";
+ gpio-export,output = <1>;
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ sdhci@10130000 {
+ compatible = "ralink,mt7620-sdhci";
+ reg = <0x10130000 4000>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <14>;
+
+ status = "okay";
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio", "i2c", "i2s";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ status = "okay";
+
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts
new file mode 100644
index 0000000..f5106a5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts
@@ -0,0 +1,89 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hilink,hlk-7628n", "mediatek,mt7628an-soc";
+ model = "HILINK HLK-7628N";
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c";
+ function = "gpio";
+ };
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts
new file mode 100644
index 0000000..1f878b0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts
@@ -0,0 +1,116 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hilink,hlk-7688a", "mediatek,mt7628an-soc";
+ model = "Hi-Link HLK-7688A";
+
+ aliases {
+ led-boot = &led_wlan;
+ led-failsafe = &led_wlan;
+ led-upgrade = &led_wlan;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wlan: wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+
+ spidev@1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "linux,spidev";
+ reg = <1>;
+ spi-max-frequency = <40000000>;
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts
new file mode 100644
index 0000000..9e4068c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5661a.dts
@@ -0,0 +1,41 @@
+#include "mt7628an_hiwifi_hc5x61a.dtsi"
+
+/ {
+ compatible = "hiwifi,hc5661a", "mediatek,mt7628an-soc";
+ model = "HiWiFi HC5661A";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "refclk", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts
new file mode 100644
index 0000000..828e5b8
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_hiwifi_hc5x61a.dtsi"
+
+/ {
+ compatible = "hiwifi,hc5761a", "mediatek,mt7628an-soc";
+ model = "HiWiFi HC5761A";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
+ };
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 40 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb_power {
+ gpio-export,name = "usb_power";
+ gpio-export,output = <0>;
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "refclk", "wdt", "p2led_an", "p3led_an", "wled_an";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts
new file mode 100644
index 0000000..326c412
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts
@@ -0,0 +1,54 @@
+#include "mt7628an_hiwifi_hc5x61a.dtsi"
+
+/ {
+ compatible = "hiwifi,hc5861b", "mediatek,mt7628an-soc";
+ model = "HiWiFi HC5861B";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "green:system";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "refclk", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ mtd-mac-address = <&factory 0x2e>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ led {
+ led-sources = <2>;
+ led-active-low;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi
new file mode 100644
index 0000000..7bd394c
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi
@@ -0,0 +1,98 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hiwifi,hc5x61a", "mediatek,mt7628an-soc";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "hw_panic";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf70000>;
+ };
+
+ partition@fc0000 {
+ label = "oem";
+ reg = <0xfc0000 0x20000>;
+ read-only;
+ };
+
+ bdinfo: partition@fe0000 {
+ label = "bdinfo";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+
+ partition@ff0000 {
+ label = "backup";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_iptime.dtsi b/target/linux/ramips/dts/mt7628an_iptime.dtsi
new file mode 100644
index 0000000..8a33c37
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_iptime.dtsi
@@ -0,0 +1,106 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = ðernet;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <60>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot: partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "config";
+ reg = <0x20000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x40000 0x7c0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart1", "wdt";
+ function = "gpio";
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+ðernet {
+ mtd-mac-address = <&uboot 0x1fc20>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_iptime_a3.dts b/target/linux/ramips/dts/mt7628an_iptime_a3.dts
new file mode 100644
index 0000000..d90a075
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_iptime_a3.dts
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_iptime.dtsi"
+
+/ {
+ compatible = "iptime,a3", "mediatek,mt7628an-soc";
+ model = "ipTIME A3";
+
+ aliases {
+ led-boot = &led_cpu;
+ led-failsafe = &led_cpu;
+ led-running = &led_cpu;
+ led-upgrade = &led_cpu;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_cpu: cpu {
+ label = "blue:cpu";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+ mediatek,portdisable = <0x32>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_iptime_a604m.dts b/target/linux/ramips/dts/mt7628an_iptime_a604m.dts
new file mode 100644
index 0000000..2f626f1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_iptime_a604m.dts
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_iptime.dtsi"
+
+/ {
+ compatible = "iptime,a604m", "mediatek,mt7628an-soc";
+ model = "ipTIME A604M";
+
+ aliases {
+ led-boot = &led_cpu;
+ led-failsafe = &led_cpu;
+ led-running = &led_cpu;
+ led-upgrade = &led_cpu;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ led_cpu: cpu {
+ label = "blue:cpu";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uart1", "wdt";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8-16m.dts b/target/linux/ramips/dts/mt7628an_jotale_js76x8-16m.dts
new file mode 100644
index 0000000..8bf91fe
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8-16m.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_jotale_js76x8.dtsi"
+
+/ {
+ compatible = "jotale,js76x8-16m", "jotale,js76x8", "mediatek,mt7628an-soc";
+ model = "Jotale JS76x8 (16M)";
+};
+
+&firmware {
+ reg = <0x50000 0xfb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8-32m.dts b/target/linux/ramips/dts/mt7628an_jotale_js76x8-32m.dts
new file mode 100644
index 0000000..75ee988
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8-32m.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_jotale_js76x8.dtsi"
+
+/ {
+ compatible = "jotale,js76x8-32m", "jotale,js76x8", "mediatek,mt7628an-soc";
+ model = "Jotale JS76x8 (32M)";
+};
+
+&flash0 {
+ broken-flash-reset;
+};
+
+&firmware {
+ reg = <0x50000 0x1fb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8-8m.dts b/target/linux/ramips/dts/mt7628an_jotale_js76x8-8m.dts
new file mode 100644
index 0000000..4147376
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8-8m.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_jotale_js76x8.dtsi"
+
+/ {
+ compatible = "jotale,js76x8-8m", "mediatek,mt7628an-soc";
+ model = "Jotale JS76x8 (8M)";
+};
+
+&firmware {
+ reg = <0x50000 0x7b0000>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi
new file mode 100644
index 0000000..e4952d4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi
@@ -0,0 +1,125 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "jotale,js76x8", "mediatek,mt7628an-soc";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "green:system";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "refclk", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ /* reg property is set based on flash size in DTS files */
+ };
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&i2s {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&sdhci {
+ status = "okay";
+ mediatek,cd-low;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
new file mode 100644
index 0000000..cbec8c9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
@@ -0,0 +1,160 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mediatek,linkit-smart-7688", "mediatek,mt7628an-soc";
+ model = "MediaTek LinkIt Smart 7688";
+
+ aliases {
+ led-boot = &led_wifi;
+ led-failsafe = &led_wifi;
+ led-running = &led_wifi;
+ led-upgrade = &led_wifi;
+ };
+
+ chosen {
+ bootargs = "console=ttyS2,57600";
+ };
+
+ aliases {
+ serial0 = &uart2;
+ };
+
+ bootstrap {
+ compatible = "mediatek,linkit";
+
+ status = "okay";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wifi: wifi {
+ label = "orange:wifi";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio";
+ function = "gpio";
+ };
+
+ refclk {
+ groups = "refclk";
+ function = "gpio";
+ };
+
+ i2s {
+ groups = "i2s";
+ function = "gpio";
+ };
+
+ spis {
+ groups = "spis";
+ function = "gpio";
+ };
+
+ wled_an {
+ groups = "wled_an";
+ function = "gpio";
+ };
+
+ wdt {
+ groups = "wdt";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+
+ spidev@1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "linux,spidev";
+ reg = <1>;
+ spi-max-frequency = <40000000>;
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&pwm {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&sdhci {
+ status = "okay";
+ mediatek,cd-high;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_mediatek_mt7628an-eval-board.dts b/target/linux/ramips/dts/mt7628an_mediatek_mt7628an-eval-board.dts
new file mode 100644
index 0000000..5418dac
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_mediatek_mt7628an-eval-board.dts
@@ -0,0 +1,61 @@
+#include "mt7628an.dtsi"
+
+/ {
+ compatible = "mediatek,mt7628an-eval-board", "mediatek,mt7628an-soc";
+ model = "Mediatek MT7628AN evaluation board";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts
new file mode 100644
index 0000000..7aa678a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts
@@ -0,0 +1,100 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mercury,mac1200r-v2", "mediatek,mt7628an-soc";
+ model = "Mercury MAC1200R v2";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x1d800>;
+ };
+
+ factory: partition@1d800 {
+ label = "factory_info";
+ reg = <0x1d800 0x800>;
+ read-only;
+ };
+
+ art: partition@1e000 {
+ label = "art";
+ reg = <0x1e000 0x2000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "config";
+ reg = <0x20000 0x10000>;
+ };
+
+ partition@30000 {
+ label = "u-boot2";
+ reg = <0x30000 0x10000>;
+ };
+
+ partition@40000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x40000 0x7c0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-names = "default";
+ mtd-mac-address = <&factory 0xd>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&art 0x0>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&art 0x1000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
new file mode 100644
index 0000000..3f1c205
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
@@ -0,0 +1,137 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "Minew G1-C";
+ compatible = "minew,g1-c", "mediatek,mt7628an-soc";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "red:system";
+ gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ ws2812 {
+ gpio-export,name = "ws2812";
+ gpio-export,output = <1>;
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ nrf_power {
+ gpio-export,name = "nrf_power";
+ gpio-export,output = <1>;
+ gpios = <&gpio 45 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio";
+ function = "gpio";
+ };
+
+ p0led_an {
+ groups = "p0led_an";
+ function = "gpio";
+ };
+
+ uart1 {
+ groups = "uart1";
+ function = "gpio";
+ };
+
+ wdt {
+ groups = "wdt";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ m25p80@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ status = "okay";
+};
+
+&sdhci {
+ status = "okay";
+ mediatek,cd-high;
+};
diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6020.dts b/target/linux/ramips/dts/mt7628an_netgear_r6020.dts
new file mode 100644
index 0000000..6ae7474
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_netgear_r6020.dts
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_netgear_r6xxx.dtsi"
+
+/ {
+ compatible = "netgear,r6020", "mediatek,mt7628an-soc";
+ model = "Netgear R6020";
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p1led_an", "p2led_an", "p3led_an",
+ "p4led_an", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&partitions {
+ partition@90000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x90000 0x6f0000>;
+ };
+
+ partition@780000 {
+ label = "ML";
+ reg = <0x780000 0x20000>;
+ read-only;
+ };
+
+ partition@7a0000 {
+ label = "ML1";
+ reg = <0x7a0000 0x20000>;
+ read-only;
+ };
+
+ partition@7c0000 {
+ label = "ML2";
+ reg = <0x7c0000 0x20000>;
+ read-only;
+ };
+
+ partition@7e0000 {
+ label = "POT";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ partition@7f0000 {
+ label = "reserved";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6080.dts b/target/linux/ramips/dts/mt7628an_netgear_r6080.dts
new file mode 100644
index 0000000..73cfc47
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_netgear_r6080.dts
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_netgear_r6xxx.dtsi"
+
+/ {
+ compatible = "netgear,r6080", "mediatek,mt7628an-soc";
+ model = "Netgear R6080";
+
+ aliases {
+ label-mac-device = ðernet;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p1led_an", "p2led_an", "p3led_an",
+ "p4led_an", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&partitions {
+ partition@90000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x90000 0x760000>;
+ };
+
+ partition@7f0000 {
+ label = "reserved";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts
new file mode 100644
index 0000000..f4d9823
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts
@@ -0,0 +1,49 @@
+#include "mt7628an_netgear_r6xxx.dtsi"
+
+/ {
+ compatible = "netgear,r6120", "mediatek,mt7628an-soc";
+ model = "Netgear R6120";
+
+ aliases {
+ label-mac-device = ðernet;
+ };
+
+ usb-regulator {
+ compatible = "regulator-fixed";
+
+ regulator-name = "USB-power";
+ gpio = <&gpio 45 GPIO_ACTIVE_HIGH>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+
+ regulator-always-on;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p1led_an", "p2led_an", "p3led_an",
+ "p4led_an", "wdt", "wled_an", "uart1";
+ function = "gpio";
+ };
+};
+
+&partitions {
+ partition@90000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x90000 0xf60000>;
+ };
+
+ partition@ff0000 {
+ label = "reserved";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+};
+
+&wifi5 {
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <(2)>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi
new file mode 100644
index 0000000..c3d7da2
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi
@@ -0,0 +1,115 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g_green {
+ label = "green:wlan2g";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan2g_orange {
+ label = "orange:wlan2g";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <86000000>;
+ m25p,fast-read;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x40000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x20000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "nvram";
+ reg = <0x60000 0x30000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi5: wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_onion_omega2.dts b/target/linux/ramips/dts/mt7628an_onion_omega2.dts
new file mode 100644
index 0000000..a34638b
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_onion_omega2.dts
@@ -0,0 +1,10 @@
+#include "mt7628an_onion_omega2.dtsi"
+
+/ {
+ compatible = "onion,omega2", "mediatek,mt7628an-soc";
+ model = "Onion Omega2";
+};
+
+&firmware {
+ reg = <0x50000 0xfb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
new file mode 100644
index 0000000..460a563
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
@@ -0,0 +1,165 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "onion,omega2", "mediatek,mt7628an-soc";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "amber:system";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio";
+ function = "gpio";
+ };
+
+ perst {
+ groups = "perst";
+ function = "gpio";
+ };
+
+ refclk {
+ groups = "refclk";
+ function = "gpio";
+ };
+
+ i2s {
+ groups = "i2s";
+ function = "gpio";
+ };
+
+ spis {
+ groups = "spis";
+ function = "gpio";
+ };
+
+ wled_kn {
+ groups = "wled_kn";
+ function = "gpio";
+ };
+
+ wled_an {
+ groups = "wled_an";
+ function = "gpio";
+ };
+
+ wdt {
+ groups = "wdt";
+ function = "gpio";
+ };
+
+ pwm0 {
+ groups = "pwm0";
+ function = "gpio";
+ };
+
+ pwm1 {
+ groups = "pwm1";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ firmware: partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ };
+ };
+ };
+
+ spidev@1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "linux,spidev";
+ reg = <1>;
+ spi-max-frequency = <40000000>;
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&sdhci {
+ status = "okay";
+ mediatek,cd-low;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_onion_omega2p.dts b/target/linux/ramips/dts/mt7628an_onion_omega2p.dts
new file mode 100644
index 0000000..5694576
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_onion_omega2p.dts
@@ -0,0 +1,14 @@
+#include "mt7628an_onion_omega2.dtsi"
+
+/ {
+ compatible = "onion,omega2p", "onion,omega2", "mediatek,mt7628an-soc";
+ model = "Onion Omega2+";
+};
+
+&flash0 {
+ broken-flash-reset;
+};
+
+&firmware {
+ reg = <0x50000 0x1fb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
new file mode 100644
index 0000000..63c4901
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "rakwireless,rak633", "mediatek,mt7628an-soc";
+ model = "Rakwireless RAK633";
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi {
+ label = "blue:wifi";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ wled_an {
+ groups = "wled_an";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&i2s {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&gdma {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
new file mode 100644
index 0000000..6962651
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
@@ -0,0 +1,193 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ravpower,rp-wd009", "mediatek,mt7628an-soc";
+ model = "RAVPower RP-WD009";
+
+ aliases {
+ led-boot = &led_globe;
+ led-failsafe = &led_globe;
+ led-running = &led_globe;
+ led-upgrade = &led_globe;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_globe: globe {
+ label = "white:globe";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2 {
+ label = "white:wlan2";
+ gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan5 {
+ label = "white:wlan5";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ sd_white {
+ label = "white:sd";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ sd_red {
+ label = "red:sd";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ /* Power interrupt on Pin 39 */
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+
+ backup {
+ label = "backup";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_COPY>;
+ };
+ };
+};
+
+&gpio {
+ mt7610-power {
+ gpio-hog;
+ gpios = <20 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "mt7610-power";
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uart1", "wled_an", "p0led_an", "p2led_an", "p3led_an",
+ "p4led_an", "uart2", "pwm0", "i2s";
+ function = "gpio";
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+
+ /* Custom PMIC at 0x0a */
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5470000 6000000>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "loader";
+ reg = <0x50000 0x180000>;
+ };
+
+ partition@1d0000 {
+ label = "params";
+ reg = <0x1d0000 0x10000>;
+ read-only;
+ };
+
+ partition@1e0000 {
+ label = "user_backup";
+ reg = <0x1e0000 0x10000>;
+ read-only;
+ };
+
+ partition@1f0000 {
+ label = "user";
+ reg = <0x1f0000 0x10000>;
+ read-only;
+ };
+
+ partition@200000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x200000 0xdf0000>;
+ };
+
+ partition@ff0000 {
+ label = "mode";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts
new file mode 100644
index 0000000..6e1cb39
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts
@@ -0,0 +1,99 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "skylab,skw92a", "mediatek,mt7628an-soc";
+ model = "SKYLAB SKW92A";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: wps {
+ label = "green:wps";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "refclk", "wled_an";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ compatible = "denx,uimage";
+ };
+ };
+ };
+};
+
+&uart1 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_tama_w06.dts b/target/linux/ramips/dts/mt7628an_tama_w06.dts
new file mode 100644
index 0000000..2be5f3f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tama_w06.dts
@@ -0,0 +1,99 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tama,w06", "mediatek,mt7628an-soc";
+ model = "Tama W06";
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless {
+ label = "green:wlan";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&state_default {
+ gpio {
+ groups = "uart1", "p0led_an", "wdt";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xeb0000>;
+ };
+
+ partition@f00000 {
+ label = "user-data";
+ reg = <0xf00000 0x100000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_totolink_a3.dts b/target/linux/ramips/dts/mt7628an_totolink_a3.dts
new file mode 100644
index 0000000..246dfad
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_totolink_a3.dts
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_iptime.dtsi"
+
+/ {
+ compatible = "totolink,a3", "mediatek,mt7628an-soc";
+ model = "TOTOLINK A3";
+
+ aliases {
+ led-boot = &led_cpu;
+ led-failsafe = &led_cpu;
+ led-running = &led_cpu;
+ led-upgrade = &led_cpu;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_cpu: cpu {
+ label = "blue:cpu";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+ mediatek,portdisable = <0x32>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
new file mode 100644
index 0000000..ab5fdd3
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "totolink,lr1200", "mediatek,mt7628dan";
+ model = "TOTOLINK LR1200";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_sys: sys {
+ label = "blue:sys";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ sms {
+ label = "blue:sms";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "blue:wifi";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ 3g {
+ label = "blue:3g";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ 4g {
+ label = "blue:4g";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi1 {
+ label = "blue:rssi1";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi2 {
+ label = "blue:rssi2";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi3 {
+ label = "blue:rssi3";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi4 {
+ label = "blue:rssi4";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio {
+ gpio_modem_reset {
+ gpio-hog;
+ gpios = <45 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "modem-reset";
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio", "i2c", "i2s", "refclk", "uart1", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
new file mode 100644
index 0000000..b6ce7b1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ label-mac-device = ðernet;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "factory-uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "boot";
+ reg = <0x30000 0x20000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x50000 0x770000>;
+ };
+
+ partition@7c0000 {
+ label = "config";
+ reg = <0x7c0000 0x10000>;
+ read-only;
+ };
+
+ rom: partition@7d0000 {
+ label = "rom";
+ reg = <0x7d0000 0x10000>;
+ read-only;
+ };
+
+ partition@7e0000 {
+ label = "romfile";
+ reg = <0x7e0000 0x10000>;
+ };
+
+ radio: partition@7f0000 {
+ label = "radio";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+ mtd-mac-address = <&rom 0xf100>;
+ mediatek,mtd-eeprom = <&radio 0x0>;
+};
+
+ðernet {
+ mtd-mac-address = <&rom 0xf100>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
new file mode 100644
index 0000000..2faf8a8
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
@@ -0,0 +1,64 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ label-mac-device = ðernet;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x7a0000>;
+ };
+
+ partition@7c0000 {
+ label = "config";
+ reg = <0x7c0000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@7d0000 {
+ label = "factory";
+ reg = <0x7d0000 0x30000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+ mtd-mac-address = <&factory 0xf100>;
+ mediatek,mtd-eeprom = <&factory 0x20000>;
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0xf100>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
new file mode 100644
index 0000000..58743db
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
@@ -0,0 +1,107 @@
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,archer-c20-v4", "mediatek,mt7628an-soc";
+ model = "TP-Link Archer C20 v4";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&wmac {
+ mtd-mac-address-increment = <(-2)>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2s", "gpio", "refclk", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x28000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&factory 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
new file mode 100644
index 0000000..d76ce34
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
@@ -0,0 +1,102 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_8m-split-uboot.dtsi"
+
+/ {
+ compatible = "tplink,archer-c20-v5", "mediatek,mt7628an-soc";
+ model = "TP-Link Archer C20 v5";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "green:wlan2g";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "i2s", "gpio", "refclk", "p0led_an", "p1led_an",
+ "p2led_an", "p3led_an", "p4led_an", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&rom 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
new file mode 100644
index 0000000..4966d56
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
@@ -0,0 +1,102 @@
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,archer-c50-v3", "mediatek,mt7628an-soc";
+ model = "TP-Link Archer C50 v3";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan2g";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5 {
+ label = "green:wlan5g";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "gpio", "p0led_an", "p1led_an", "p2led_an",
+ "p3led_an", "p4led_an", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x28000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&factory 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
new file mode 100644
index 0000000..11bf903
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
@@ -0,0 +1,100 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_8m-split-uboot.dtsi"
+
+/ {
+ compatible = "tplink,archer-c50-v4", "mediatek,mt7628an-soc";
+ model = "TP-Link Archer C50 v4";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2 {
+ label = "green:wlan2g";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5 {
+ label = "green:wlan5g";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "p0led_an", "p1led_an", "p2led_an",
+ "p3led_an", "p4led_an", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&rom 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200-v2.dts b/target/linux/ramips/dts/mt7628an_tplink_re200-v2.dts
new file mode 100644
index 0000000..a7e5e51
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_re200-v2.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_re200.dtsi"
+
+/ {
+ compatible = "tplink,re200-v2", "mediatek,mt7628an-soc";
+ model = "TP-Link RE200 v2";
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_re200-v3.dts
new file mode 100644
index 0000000..2c4e09e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_re200-v3.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_re200.dtsi"
+
+/ {
+ compatible = "tplink,re200-v3", "mediatek,mt7628an-soc";
+ model = "TP-Link RE200 v3";
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_re200-v4.dts
new file mode 100644
index 0000000..83f1f3a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_re200-v4.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_re200.dtsi"
+
+/ {
+ compatible = "tplink,re200-v4", "mediatek,mt7628an-soc";
+ model = "TP-Link RE200 v4";
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
new file mode 100644
index 0000000..95addff
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
@@ -0,0 +1,156 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = ðernet;
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600n8";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2g_green {
+ label = "green:wifi2g";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wifi5g_green {
+ label = "green:wifi5g";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wifi2g_red {
+ label = "red:wifi2g";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi5g_red {
+ label = "red:wifi5g";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x7a0000>;
+ };
+
+ config: partition@7c0000 {
+ label = "config";
+ reg = <0x7c0000 0x30000>;
+ read-only;
+ };
+
+ radio: partition@7f0000 {
+ label = "radio";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "p4led_an", "p3led_an", "p2led_an", "p1led_an",
+ "p0led_an", "wled_an", "i2c", "wdt", "refclk";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&config 0x2008>;
+};
+
+&wmac {
+ status = "okay";
+
+ mediatek,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&config 0x2008>;
+ mtd-mac-address-increment = <1>;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&config 0x2008>;
+ mtd-mac-address-increment = <2>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re220-v2.dts b/target/linux/ramips/dts/mt7628an_tplink_re220-v2.dts
new file mode 100644
index 0000000..82d385a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_re220-v2.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_re200.dtsi"
+
+/ {
+ compatible = "tplink,re220-v2", "mediatek,mt7628an-soc";
+ model = "TP-Link RE220 v2";
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
new file mode 100644
index 0000000..22e15eb
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
@@ -0,0 +1,145 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tplink,re305-v1", "mediatek,mt7628an-soc";
+ model = "TP-Link RE305 v1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = ðernet;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ rssi1 {
+ label = "red:rssi";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ rssi2 {
+ label = "blue:rssi";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x5e0000>;
+ };
+
+ config: partition@600000 {
+ label = "config";
+ reg = <0x600000 0x50000>;
+ read-only;
+ };
+
+ /*
+ The flash space between 0x650000 and 0x7f0000 is blank in the
+ stock firmware so it is left out as well.
+ */
+
+ radio: partition@7f0000 {
+ label = "radio";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "refclk", "wdt", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&radio 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&config 0x10008>;
+ mtd-mac-address-increment = <2>;
+ };
+};
+
+&wmac {
+ status = "okay";
+
+ mediatek,mtd-eeprom = <&radio 0x0>;
+ mtd-mac-address = <&config 0x10008>;
+ mtd-mac-address-increment = <1>;
+};
+
+ðernet {
+ mtd-mac-address = <&config 0x10008>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts
new file mode 100644
index 0000000..5bc1275
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts
@@ -0,0 +1,132 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tplink,tl-mr3020-v3", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-MR3020 v3";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ modec1 {
+ label = "sw1";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ modec2 {
+ label = "sw2";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wan {
+ label = "green:3g";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ehci_port1>, <&ohci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x7a0000>;
+ };
+
+ partition@7c0000 {
+ label = "config";
+ reg = <0x7c0000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@7d0000 {
+ label = "factory";
+ reg = <0x7d0000 0x30000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2s", "refclk", "wdt", "p2led_an", "p1led_an", "p0led_an", "wled_an";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ status = "okay";
+ mtd-mac-address = <&factory 0xf100>;
+ mediatek,mtd-eeprom = <&factory 0x20000>;
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0xf100>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts
new file mode 100644
index 0000000..173b4cd
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts
@@ -0,0 +1,81 @@
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-mr3420-v5", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-MR3420 v5";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_amber {
+ label = "amber:wan";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "i2s", "p2led_an", "refclk", "uart1", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
new file mode 100644
index 0000000..a142be7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-mr6400-v4", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-MR6400 v4";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "white:power";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "white:wan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "white:wlan";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ lan {
+ label = "white:lan";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ signal1 {
+ label = "white:signal1";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ signal2 {
+ label = "white:signal2";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ signal3 {
+ label = "white:signal3";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "refclk", "uart1", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,portdisable = <0x21>;
+};
+
+&wmac {
+ mtd-mac-address = <&factory 0x1f100>;
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x1f100>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
new file mode 100644
index 0000000..7ab1963
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-mr6400-v5", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-MR6400 v5";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan {
+ label = "white:wlan";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ lan {
+ label = "white:lan";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "white:power";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "white:wan";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ signal1 {
+ label = "white:signal1";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ signal2 {
+ label = "white:signal2";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ signal3 {
+ label = "white:signal3";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "uart1", "wdt";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x37>;
+ mediatek,portdisable = <0x30>;
+};
+
+&wmac {
+ mtd-mac-address = <&factory 0x1f100>;
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x1f100>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts
new file mode 100644
index 0000000..de9a484
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts
@@ -0,0 +1,75 @@
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-wa801nd-v5", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WA801ND v5";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wps_red {
+ label = "red:wps";
+ gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
+ };
+
+ wps_green {
+ label = "green:wps";
+ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p1led_an", "perst", "refclk",
+ "uart1", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts
new file mode 100644
index 0000000..bce3404
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-wr802n-v4", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WR802N v4";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "refclk", "wdt";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0xf100>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts
new file mode 100644
index 0000000..8a8ba81
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts
@@ -0,0 +1,71 @@
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-wr840n-v4", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WR840N v4";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p2led_an", "perst", "refclk", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts
new file mode 100644
index 0000000..1f8f7f4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts
@@ -0,0 +1,107 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tplink,tl-wr840n-v5", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WR840N v5";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ /* LED used is dual-color,dual lead LED */
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_green: power {
+ label = "green:power";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ orange {
+ label = "orange:power";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x20000 0x3d0000>;
+ };
+
+ factory: partition@3f0000 {
+ label = "factory";
+ reg = <0x3f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&wmac {
+ status = "okay";
+ mtd-mac-address = <&factory 0xf100>;
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0xf100>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p2led_an", "perst";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts
new file mode 100644
index 0000000..5c7f983
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts
@@ -0,0 +1,97 @@
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-wr841n-v13", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WR841N v13";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ };
+
+ lan1 {
+ label = "green:lan1";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ lan2 {
+ label = "green:lan2";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ lan3 {
+ label = "green:lan3";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ lan4 {
+ label = "green:lan4";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "gpio", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "perst", "refclk", "uart1", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
new file mode 100644
index 0000000..a1a83bf
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tplink,tl-wr841n-v14", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WR841N v14";
+
+ aliases {
+ led-boot = &led_wlan;
+ led-failsafe = &led_wlan;
+ led-upgrade = &led_wlan;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wlan: wlan {
+ label = "green:wlan";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wan_orange {
+ label = "orange:wan";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "boot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "tplink,firmware";
+ label = "firmware";
+ reg = <0x10000 0x3e0000>;
+ };
+
+ factory: partition@3f0000 {
+ label = "factory";
+ reg = <0x3f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&wmac {
+ status = "okay";
+
+ mtd-mac-address = <&factory 0xf100>;
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0xf100>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&state_default {
+ gpio {
+ groups = "p4led_an", "p3led_an", "p2led_an", "p1led_an", "p0led_an", "wdt";
+ function = "gpio";
+ };
+};
+
+&gpio {
+ led_wlan_enable {
+ gpio-hog;
+ gpios = <43 GPIO_ACTIVE_HIGH>;
+ output-high;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts
new file mode 100644
index 0000000..9077ec0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts
@@ -0,0 +1,81 @@
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-wr842n-v5", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WR842N v5";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_amber {
+ label = "amber:wan";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "i2s", "p2led_an", "refclk", "uart1", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts
new file mode 100644
index 0000000..7abeae9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts
@@ -0,0 +1,74 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-wr850n-v2", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WR850N v2";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p2led_an", "perst", "refclk", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
new file mode 100644
index 0000000..77a68ac
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
@@ -0,0 +1,98 @@
+#include "mt7628an_tplink_8m.dtsi"
+
+/ {
+ compatible = "tplink,tl-wr902ac-v3", "mediatek,mt7628an-soc";
+ model = "TP-Link TL-WR902AC v3";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ sw1 {
+ label = "sw1";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ sw2 {
+ label = "sw2";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "i2s", "p0led_an", "p2led_an", "p4led_an", "uart1", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x28000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ mtd-mac-address = <&factory 0xf100>;
+ mtd-mac-address-increment = <(-1)>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts b/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts
new file mode 100644
index 0000000..c25a31f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
+ * All rights reserved.
+ */
+
+#include "mt7628an_unielec_u7628-01.dtsi"
+
+/ {
+ compatible = "unielec,u7628-01-16m", "unielec,u7628-01", "mediatek,mt7628an-soc";
+ model = "UniElec U7628-01 (16M flash)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <12000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi
new file mode 100644
index 0000000..f0a6b1d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi
@@ -0,0 +1,101 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
+ * All rights reserved.
+ */
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "unielec,u7628-01", "mediatek,mt7628an-soc";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ lan1 {
+ label = "green:lan1";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ lan2 {
+ label = "green:lan2";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+
+ lan3 {
+ label = "green:lan3";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ lan4 {
+ label = "green:lan4";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "gpio", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "refclk", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts b/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts
new file mode 100644
index 0000000..f8bdc27
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts
@@ -0,0 +1,62 @@
+#include "mt7628an_vocore_vocore2.dtsi"
+
+/ {
+ compatible = "vocore,vocore2-lite", "vocore,vocore2", "mediatek,mt7628an-soc";
+ model = "VoCore2-Lite";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_vocore_vocore2.dts b/target/linux/ramips/dts/mt7628an_vocore_vocore2.dts
new file mode 100644
index 0000000..f4bb872
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_vocore_vocore2.dts
@@ -0,0 +1,62 @@
+#include "mt7628an_vocore_vocore2.dtsi"
+
+/ {
+ compatible = "vocore,vocore2", "mediatek,mt7628an-soc";
+ model = "VoCore2";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "fuchsia:status";
+ gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi b/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi
new file mode 100644
index 0000000..bffcdf6
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi
@@ -0,0 +1,55 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "vocore,vocore2", "mediatek,mt7628an-soc";
+
+ aliases {
+ label-mac-device = &wmac;
+ };
+
+ chosen {
+ bootargs = "console=ttyS2,115200";
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "wled_an", "refclk", "wdt";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x7>;
+ mediatek,portdisable = <0x3a>;
+};
+
+&i2s {
+ status = "okay";
+};
+
+&gdma {
+ status = "okay";
+};
+
+&pwm {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts
new file mode 100644
index 0000000..9cea8b4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts
@@ -0,0 +1,125 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "wavlink,wl-wn570ha1", "mediatek,mt7628an-soc";
+ model = "Wavlink WL-WN570HA1";
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "green:power";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi-high {
+ label = "green:wifi-high";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi-med {
+ label = "green:wifi-med";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi-low {
+ label = "green:wifi-low";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "wled_an", "p0led_an", "wdt", "refclk";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts
new file mode 100644
index 0000000..d6d418f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts
@@ -0,0 +1,120 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "wavlink,wl-wn575a3", "mediatek,mt7628an-soc";
+ model = "Wavlink WL-WN575A3";
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi-high {
+ label = "green:wifi-high";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi-med {
+ label = "green:wifi-med";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi-low {
+ label = "green:wifi-low";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "wled_an", "gpio", "refclk", "wdt", "p0led_an";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts
new file mode 100644
index 0000000..b5f8ff0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts
@@ -0,0 +1,136 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "wavlink,wl-wn577a2", "maginon,wlr-755", "mediatek,mt7628an-soc";
+ model = "WAVLINK WL-WN577A2";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "wdt", "p0led_an", "p3led_an", "p4led_an";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&usbphy {
+ status = "disabled";
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/mt7628an_widora_neo-16m.dts b/target/linux/ramips/dts/mt7628an_widora_neo-16m.dts
new file mode 100644
index 0000000..c6bd640
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_widora_neo-16m.dts
@@ -0,0 +1,56 @@
+#include "mt7628an_widora_neo.dtsi"
+
+/ {
+ compatible = "widora,neo-16m", "widora,neo", "mediatek,mt7628an-soc";
+ model = "Widora-NEO (16M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x0fb0000>;
+ };
+ };
+ };
+
+ spidev@1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "linux,spidev";
+ reg = <1>;
+ spi-max-frequency = <40000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_widora_neo-32m.dts b/target/linux/ramips/dts/mt7628an_widora_neo-32m.dts
new file mode 100644
index 0000000..312e6a9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_widora_neo-32m.dts
@@ -0,0 +1,57 @@
+#include "mt7628an_widora_neo.dtsi"
+
+/ {
+ compatible = "widora,neo-32m", "widora,neo", "mediatek,mt7628an-soc";
+ model = "Widora-NEO (32M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+
+ spidev@1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "linux,spidev";
+ reg = <1>;
+ spi-max-frequency = <40000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_widora_neo.dtsi b/target/linux/ramips/dts/mt7628an_widora_neo.dtsi
new file mode 100644
index 0000000..4c60ad9
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_widora_neo.dtsi
@@ -0,0 +1,118 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "widora,neo", "mediatek,mt7628an-soc";
+
+ aliases {
+ led-boot = &led_wifi;
+ led-failsafe = &led_wifi;
+ led-running = &led_wifi;
+ led-upgrade = &led_wifi;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wifi: wifi {
+ label = "orange:wifi";
+ gpios = <&wgpio 0 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ wgpio: gpio-wifi {
+ compatible = "mediatek,gpio-wifi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio";
+ function = "gpio";
+ };
+
+ perst {
+ groups = "perst";
+ function = "gpio";
+ };
+
+ refclk {
+ groups = "refclk";
+ function = "gpio";
+ };
+
+ i2s {
+ groups = "i2s";
+ function = "gpio";
+ };
+
+ spis {
+ groups = "spis";
+ function = "gpio";
+ };
+
+ wled_kn {
+ groups = "wled_kn";
+ function = "gpio";
+ };
+
+ wled_an {
+ groups = "wled_an";
+ function = "wled_an";
+ };
+
+ wdt {
+ groups = "wdt";
+ function = "gpio";
+ };
+};
+
+&i2c {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&pwm {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&sdhci {
+ status = "okay";
+ mediatek,cd-low;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts
new file mode 100644
index 0000000..08cf9ab
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts
@@ -0,0 +1,162 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "wiznet,wizfi630s", "mediatek,mt7628an-soc";
+ model = "WIZnet WizFi630S";
+
+ chosen {
+ bootargs = "console=ttyS1,115200";
+ };
+
+ aliases {
+ led-boot = &led_run;
+ led-failsafe = &led_run;
+ led-running = &led_run;
+ led-upgrade = &led_run;
+ serial0 = &uart1;
+ serial1 = &uartlite;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_run: run {
+ label = "green:run";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ ledwps {
+ label = "green:wps";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ leduart1 {
+ label = "green:uart1";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ };
+
+ leduart2 {
+ label = "green:uart2";
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ scm1 {
+ label = "SCM1";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ linux,input-type = <EV_SW>;
+ };
+
+ scm2 {
+ label = "SCM2";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_2>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio", "i2s", "i2c", "wdt", "refclk", "p1led_an", "p2led_an";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&pwm {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+ mediatek,portdisable = <0x26>;
+};
+
+&sdhci {
+ status = "okay";
+ mediatek,cd-high;
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi
new file mode 100644
index 0000000..2f2b942
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi
@@ -0,0 +1,91 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "wrtnode,wrtnode2", "mediatek,mt7628an-soc";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts
new file mode 100644
index 0000000..88ec3f0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts
@@ -0,0 +1,29 @@
+#include "mt7628an_wrtnode_wrtnode2.dtsi"
+
+/ {
+ compatible = "wrtnode,wrtnode2p", "wrtnode,wrtnode2", "mediatek,mt7628an-soc";
+ model = "WRTnode2P";
+
+ aliases {
+ led-boot = &led_indicator;
+ led-failsafe = &led_indicator;
+ led-running = &led_indicator;
+ led-upgrade = &led_indicator;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_indicator: indicator {
+ label = "blue:indicator";
+ gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "gpio";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts
new file mode 100644
index 0000000..511354a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts
@@ -0,0 +1,51 @@
+#include "mt7628an_wrtnode_wrtnode2.dtsi"
+
+/ {
+ compatible = "wrtnode,wrtnode2r", "wrtnode,wrtnode2", "mediatek,mt7628an-soc";
+ model = "WRTnode2R";
+
+ aliases {
+ led-boot = &led_indicator;
+ led-failsafe = &led_indicator;
+ led-running = &led_indicator;
+ led-upgrade = &led_indicator;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins>;
+
+ led_indicator: indicator {
+ label = "blue:indicator";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio";
+ function = "gpio";
+ };
+};
+
+&pinctrl {
+ led_pins: led {
+ gpio {
+ groups = "wled_an";
+ function = "gpio";
+ };
+ };
+};
+
+&spi0 {
+ spidev@1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "linux,spidev";
+ reg = <1>;
+ spi-max-frequency = <10000000>;
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
new file mode 100644
index 0000000..0f5897f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
@@ -0,0 +1,102 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_power_yellow;
+ led-failsafe = &led_power_yellow;
+ led-running = &led_power_blue;
+ led-upgrade = &led_power_yellow;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_blue: power_blue {
+ label = "blue:power";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_yellow: power_yellow {
+ label = "yellow:power";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash0: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "config";
+ reg = <0x20000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "crash";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "cfg_bak";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ /* additional partitions in DTS */
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
new file mode 100644
index 0000000..37797fc
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_xiaomi_mi-router-4.dtsi"
+
+/ {
+ compatible = "xiaomi,mi-router-4a-100m", "mediatek,mt7628an-soc";
+ model = "Xiaomi Mi Router 4A (100M Edition)";
+};
+
+&partitions {
+ partition@60000 {
+ label = "overlay";
+ reg = <0x60000 0x100000>;
+ read-only;
+ };
+
+ partition@160000 {
+ label = "firmware";
+ reg = <0x160000 0xea0000>;
+ compatible = "denx,uimage";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <(-1)>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+ mediatek,portdisable = <0x2a>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts
new file mode 100644
index 0000000..4389a9d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an_xiaomi_mi-router-4.dtsi"
+
+/ {
+ compatible = "xiaomi,mi-router-4c", "mediatek,mt7628an-soc";
+ model = "Xiaomi Mi Router 4C";
+
+ aliases {
+ label-mac-device = ðernet;
+ };
+};
+
+&flash0 {
+ spi-max-frequency = <40000000>;
+};
+
+&partitions {
+ partition@60000 {
+ label = "overlay";
+ reg = <0x60000 0x100000>;
+ read-only;
+ };
+
+ partition@160000 {
+ label = "firmware";
+ reg = <0x160000 0xea0000>;
+ compatible = "denx,uimage";
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3d>;
+ mediatek,portdisable = <0x29>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
new file mode 100644
index 0000000..ae6a72e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
@@ -0,0 +1,117 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc";
+ model = "Xiaomi MiWiFi Nano";
+
+ aliases {
+ led-boot = &led_status_amber;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_amber;
+ label-mac-device = ðernet;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_blue: status_blue {
+ label = "blue:status";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_red: status_red {
+ label = "red:status";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_amber: status_amber {
+ label = "amber:status";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio", "refclk", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&ehci {
+ status = "disabled";
+};
+
+&ohci {
+ status = "disabled";
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,portdisable = <0x2a>;
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
new file mode 100644
index 0000000..ac2a01e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
@@ -0,0 +1,113 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "zbtlink,zbt-we1226", "mediatek,mt7628an-soc";
+ model = "Zbtlink ZBT-WE1226";
+
+ aliases {
+ led-boot = &led_wlan;
+ led-failsafe = &led_wlan;
+ led-running = &led_wlan;
+ led-upgrade = &led_wlan;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+ };
+
+ lan1 {
+ label = "green:lan1";
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ lan2 {
+ label = "green:lan2";
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wlan: wlan {
+ label = "green:wlan";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "p0led_an", "p1led_an", "p4led_an", "wdt", "wled_an";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
diff --git a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts
new file mode 100644
index 0000000..7f21f1f
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts
@@ -0,0 +1,200 @@
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,keenetic-extra-ii", "mediatek,mt7628an-soc";
+ model = "ZyXEL Keenetic Extra II";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600n8";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ fn {
+ label = "fn";
+ gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ };
+
+ internet {
+ label = "green:internet";
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usbpower {
+ gpio-export,name = "usbpower";
+ gpio-export,output = <1>;
+ gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xe90000>;
+ };
+
+ partition@ee0000 {
+ label = "config_1";
+ reg = <0xee0000 0x10000>;
+ read-only;
+ };
+
+ partition@ef0000 {
+ label = "storage";
+ reg = <0xef0000 0x100000>;
+ read-only;
+ };
+
+ partition@ff0000 {
+ label = "dump";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+
+ partition@1000000 {
+ label = "u-state";
+ reg = <0x1000000 0x30000>;
+ read-only;
+ };
+
+ partition@1030000 {
+ label = "u-config_res";
+ reg = <0x1030000 0x10000>;
+ read-only;
+ };
+
+ partition@1040000 {
+ label = "rf-eeprom_res";
+ reg = <0x1040000 0x10000>;
+ read-only;
+ };
+
+ partition@1050000 {
+ label = "firmware_2";
+ reg = <0x1050000 0xe90000>;
+ read-only;
+ };
+
+ partition@1ee0000 {
+ label = "config_2";
+ reg = <0x1ee0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ status = "okay";
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "gpio", "i2s", "refclk", "spi cs1", "uart1", "wled_an";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/rt2880.dtsi b/target/linux/ramips/dts/rt2880.dtsi
new file mode 100644
index 0000000..092b37a
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880.dtsi
@@ -0,0 +1,240 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ralink,rt2880-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "mips,mips24KEc";
+ reg = <0>;
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ aliases {
+ serial0 = &uartlite;
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ palmbus: palmbus@300000 {
+ compatible = "palmbus";
+ reg = <0x300000 0x200000>;
+ ranges = <0x0 0x300000 0x1FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "ralink,rt2880-sysc";
+ reg = <0x000 0x100>;
+ };
+
+ timer: timer@100 {
+ compatible = "ralink,rt2880-timer";
+ reg = <0x100 0x20>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+
+ status = "disabled";
+ };
+
+ watchdog: watchdog@120 {
+ compatible = "ralink,rt2880-wdt";
+ reg = <0x120 0x10>;
+ };
+
+ intc: intc@200 {
+ compatible = "ralink,rt2880-intc";
+ reg = <0x200 0x100>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ };
+
+ memc: memc@300 {
+ compatible = "ralink,rt2880-memc";
+ reg = <0x300 0x100>;
+ };
+
+ gpio0: gpio@600 {
+ compatible = "ralink,rt2880-gpio";
+ reg = <0x600 0x34>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <0>;
+ ralink,num-gpios = <24>;
+ ralink,register-map = [ 00 04 08 0c
+ 20 24 28 2c
+ 30 34 ];
+ };
+
+ gpio1: gpio@638 {
+ compatible = "ralink,rt2880-gpio";
+ reg = <0x638 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <24>;
+ ralink,num-gpios = <16>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio2: gpio@660 {
+ compatible = "ralink,rt2880-gpio";
+ reg = <0x660 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <40>;
+ ralink,num-gpios = <32>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ i2c: i2c@900 {
+ compatible = "ralink,rt2880-i2c";
+ reg = <0x900 0x100>;
+
+ resets = <&rstctrl 9>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ralink,rt2880-uart", "ns16550a";
+ reg = <0xc00 0x100>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <8>;
+
+ reg-shift = <2>;
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ sdram {
+ groups = "sdram";
+ function = "sdram";
+ };
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ uartlite_pins: uartlite {
+ uart {
+ groups = "uartlite";
+ function = "uartlite";
+ };
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ pci: pci@440000 {
+ compatible = "ralink,rt288x-pci";
+ reg = <0x00440000 0x20000>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ status = "disabled";
+ };
+
+ ethernet: ethernet@400000 {
+ compatible = "ralink,rt2880-eth";
+ reg = <0x00400000 0x10000>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "fe";
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <5>;
+
+ status = "disabled";
+
+ port@0 {
+ compatible = "ralink,rt2880-port", "mediatek,eth-port";
+ reg = <0>;
+ };
+
+ mdio-bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ wmac: wmac@480000 {
+ compatible = "ralink,rt2880-wmac";
+ reg = <0x480000 0x40000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <6>;
+
+ ralink,eeprom = "soc_wmac.eeprom";
+ };
+};
diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts
new file mode 100644
index 0000000..9d78ca1
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts
@@ -0,0 +1,108 @@
+#include "rt2880.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "airlink101,ar670w", "ralink,rt2880-soc";
+ model = "Airlink101 AR670W";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@bdc00000 {
+ compatible = "cfi-flash";
+ reg = <0xbc400000 0x800000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x30000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ factory: partition@30000 {
+ reg = <0x30000 0x10000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "lzma";
+ reg = <0x40000 0x3c0000>;
+ label = "firmware";
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wpsblue {
+ label = "blue:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi", "uartlite";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x2004>;
+
+ port@0 {
+ phy-handle = <&phy0>;
+ phy-mode = "mii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ phy-mode = "mii";
+ reg = <0>;
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x2000>;
+};
diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts
new file mode 100644
index 0000000..7038fc6
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts
@@ -0,0 +1,118 @@
+#include "rt2880.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "airlink101,ar725w", "ralink,rt2880-soc";
+ model = "Airlink101 AR725W";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@bdc00000 {
+ compatible = "cfi-flash";
+ reg = <0xbc400000 0x800000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x30000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x30000 0x10000>;
+ label = "u-boot-env";
+ };
+
+ factory: partition@40000 {
+ reg = <0x40000 0x10000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ reg = <0x50000 0x3B0000>;
+ label = "firmware";
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ wpsred {
+ label = "red:wps";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ wpsblue {
+ label = "blue:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi", "uartlite";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ phy-handle = <&phy0>;
+ phy-mode = "mii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ phy-mode = "mii";
+ reg = <0>;
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts
new file mode 100644
index 0000000..4b832fa
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts
@@ -0,0 +1,116 @@
+#include "rt2880.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "asus,rt-n15", "ralink,rt2880-soc";
+ model = "Asus RT-N15";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ rtl8366s {
+ compatible = "realtek,rtl8366s";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartlite", "mdio";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ phy-mode = "mii";
+ reg = <0>;
+ };
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts b/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts
new file mode 100644
index 0000000..cbaa3e8
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts
@@ -0,0 +1,237 @@
+#include "rt2880.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "belkin,f5d8235-v1", "ralink,rt2880-soc";
+ model = "Belkin F5D8235 v1";
+
+ aliases {
+ led-boot = &led_wired_blue;
+ led-failsafe = &led_wired_blue;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0xbc400000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ rtl8366s {
+ compatible = "realtek,rtl8366s";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+
+ realtek,initvals = <
+ 0x0242 0x02BF
+ 0x0245 0x02BF
+ 0x0248 0x02BF
+ 0x024B 0x02BF
+ 0x024E 0x02BF
+ 0x0251 0x02BF
+ 0x0254 0x0A3F
+ 0x0256 0x0A3F
+ 0x0258 0x0A3F
+ 0x025A 0x0A3F
+ 0x025C 0x0A3F
+ 0x025E 0x0A3F
+ 0x0263 0x007C
+ 0x0100 0x0004
+ 0xBE5B 0x3500
+ 0x800E 0x200F
+ 0xBE1D 0x0F00
+ 0x8001 0x5011
+ 0x800A 0xA2F4
+ 0x800B 0x17A3
+ 0xBE4B 0x17A3
+ 0xBE41 0x5011
+ 0xBE17 0x2100
+ 0x8000 0x8304
+ 0xBE40 0x8304
+ 0xBE4A 0xA2F4
+ 0x800C 0xA8D5
+ 0x8014 0x5500
+ 0x8015 0x0004
+ 0xBE4C 0xA8D5
+ 0xBE59 0x0008
+ 0xBE09 0x0E00
+ 0xBE36 0x1036
+ 0xBE37 0x1036
+ 0x800D 0x00FF
+ 0xBE4D 0x00FF
+ >;
+
+ realtek,green-ethernet-features;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+
+ internet2 {
+ label = "amber:internet";
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ };
+
+ modem {
+ label = "blue:modem";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ modem2 {
+ label = "amber:modem";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+
+ router {
+ label = "blue:router";
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ storage {
+ label = "blue:storage";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ storage2 {
+ label = "amber:storage";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ security {
+ label = "blue:security";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ security2 {
+ label = "amber:security";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wired_blue: wired {
+ label = "blue:wired";
+ gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wired2 {
+ label = "amber:wired";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless {
+ label = "blue:wireless";
+ gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless2 {
+ label = "amber:wireless";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "mdio", "uartlite";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+};
+
+&pci {
+ status = "okay";
+
+ usb@11,0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "pci1033,0035";
+ reg = <0x8800 0 0 0 0>;
+
+ ohci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ usb@11,1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "pci1033,00e0";
+ reg = <0x8900 0 0 0 0>;
+
+ ehci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts
new file mode 100644
index 0000000..a1f10ae
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts
@@ -0,0 +1,119 @@
+#include "rt2880.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "buffalo,wli-tx4-ag300n", "ralink,rt2880-soc";
+ model = "Buffalo WLI-TX4-AG300N";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ bandwidth {
+ label = "bandwidth";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ diag {
+ label = "red:diag";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ security {
+ label = "blue:security";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ mediatek,fixed-link = <100 1 1 1>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ phy-mode = "mii";
+ reg = <0>;
+ };
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts b/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts
new file mode 100644
index 0000000..cd9e918
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts
@@ -0,0 +1,141 @@
+#include "rt2880.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "buffalo,wzr-agl300nh", "ralink,rt2880-soc";
+ model = "Buffalo WZR-AGL300NH";
+
+ aliases {
+ led-boot = &led_router;
+ led-failsafe = &led_router;
+ led-running = &led_router;
+ led-upgrade = &led_router;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ rtl8366s {
+ compatible = "realtek,rtl8366s";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ router {
+ label = "router_switch";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ linux,code = <BTN_0>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_router: router {
+ label = "green:router";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ diag {
+ label = "red:diag";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ security_g {
+ label = "orange:security_g";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ security_n {
+ label = "orange:security_n";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartlite", "mdio";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ phy-mode = "mii";
+ reg = <0>;
+ };
+ };
+};
+
+&pci {
+ status = "okay";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts
new file mode 100644
index 0000000..3de9dc7
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts
@@ -0,0 +1,141 @@
+#include "rt2880.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dap-1522-a1", "ralink,rt2880-soc";
+ model = "D-Link DAP-1522 A1";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ flash@bc400000 {
+ compatible = "cfi-flash";
+ reg = <0xbc400000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ compatible = "wrg";
+ label = "firmware";
+ reg = <0x40000 0x3a0000>;
+ };
+ };
+ };
+
+ rtl8366s {
+ compatible = "realtek,rtl8366s";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+
+ bridge {
+ label = "bridge";
+ gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
+ };
+
+ ap {
+ label = "blue:ap";
+ gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
+ };
+
+ sta {
+ label = "red:sta";
+ gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status: status {
+ label = "blue:status";
+ gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartlite", "pci";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x2004>;
+
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ phy-mode = "mii";
+ reg = <0>;
+ };
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x2000>;
+};
diff --git a/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts b/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts
new file mode 100644
index 0000000..39045bf
--- /dev/null
+++ b/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts
@@ -0,0 +1,84 @@
+#include "rt2880.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ralink,v11st-fe", "ralink,rt2880-soc";
+ model = "Ralink V11ST-FE";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ flash@1c000000 {
+ compatible = "cfi-flash";
+ reg = <0x1c000000 0x800000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x0030000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x00030000 0x00010000>;
+ label = "u-boot-env";
+ read-only;
+ };
+
+ factory: partition@40000 {
+ reg = <0x00040000 0x00010000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ reg = <0x00050000 0x003b0000>;
+ label = "firmware";
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+ðernet {
+ status = "okay";
+};
+
+&pci {
+ status = "okay";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3050.dtsi b/target/linux/ramips/dts/rt3050.dtsi
new file mode 100644
index 0000000..847c216
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050.dtsi
@@ -0,0 +1,358 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ralink,rt3050-soc", "ralink,rt3052-soc", "ralink,rt3350-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "mips,mips24KEc";
+ reg = <0>;
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ aliases {
+ spi0 = &spi0;
+ serial0 = &uartlite;
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ palmbus: palmbus@10000000 {
+ compatible = "palmbus";
+ reg = <0x10000000 0x200000>;
+ ranges = <0x0 0x10000000 0x1FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "ralink,rt3050-sysc", "syscon";
+ reg = <0x0 0x100>;
+ };
+
+ timer: timer@100 {
+ compatible = "ralink,rt3050-timer", "ralink,rt2880-timer";
+ reg = <0x100 0x20>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ watchdog: watchdog@120 {
+ compatible = "ralink,rt3050-wdt", "ralink,rt2880-wdt";
+ reg = <0x120 0x10>;
+
+ resets = <&rstctrl 8>;
+ reset-names = "wdt";
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ intc: intc@200 {
+ compatible = "ralink,rt3050-intc", "ralink,rt2880-intc";
+ reg = <0x200 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "intc";
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ };
+
+ memc: memc@300 {
+ compatible = "ralink,rt3050-memc";
+ reg = <0x300 0x100>;
+
+ resets = <&rstctrl 20>;
+ reset-names = "mc";
+
+ interrupt-parent = <&intc>;
+ interrupts = <3>;
+ };
+
+ uart: uart@500 {
+ compatible = "ralink,rt3050-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0x500 0x100>;
+
+ resets = <&rstctrl 12>;
+ reset-names = "uart";
+
+ interrupt-parent = <&intc>;
+ interrupts = <5>;
+
+ reg-shift = <2>;
+
+ status = "disabled";
+ };
+
+ gpio0: gpio@600 {
+ compatible = "ralink,rt3050-gpio", "ralink,rt2880-gpio";
+ reg = <0x600 0x34>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <0>;
+ ralink,num-gpios = <24>;
+ ralink,register-map = [ 00 04 08 0c
+ 20 24 28 2c
+ 30 34 ];
+
+ resets = <&rstctrl 13>;
+ reset-names = "pio";
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+ };
+
+ gpio1: gpio@638 {
+ compatible = "ralink,rt3050-gpio", "ralink,rt2880-gpio";
+ reg = <0x638 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <24>;
+ ralink,num-gpios = <16>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio2: gpio@660 {
+ compatible = "ralink,rt3050-gpio", "ralink,rt2880-gpio";
+ reg = <0x660 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <40>;
+ ralink,num-gpios = <12>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gdma: gdma@700 {
+ compatible = "ralink,rt305x-gdma";
+ reg = <0x700 0x100>;
+
+ resets = <&rstctrl 14>;
+ reset-names = "dma";
+
+ interrupt-parent = <&intc>;
+ interrupts = <7>;
+
+ #dma-cells = <1>;
+ #dma-channels = <8>;
+ #dma-requests = <8>;
+
+ status = "disabled";
+ };
+
+ i2c@900 {
+ compatible = "ralink,rt2880-i2c";
+ reg = <0x900 0x100>;
+
+ resets = <&rstctrl 16>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ };
+
+ i2s@a00 {
+ compatible = "ralink,rt3050-i2s";
+ reg = <0xa00 0x100>;
+
+ resets = <&rstctrl 17>;
+ reset-names = "i2s";
+
+ interrupt-parent = <&intc>;
+ interrupts = <10>;
+
+ txdma-req = <2>;
+
+ dmas = <&gdma 4>;
+ dma-names = "tx";
+
+ status = "disabled";
+ };
+
+ spi0: spi@b00 {
+ compatible = "ralink,rt3050-spi", "ralink,rt2880-spi";
+ reg = <0xb00 0x100>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>;
+
+ status = "disabled";
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ralink,rt3050-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0xc00 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "uartl";
+
+ interrupt-parent = <&intc>;
+ interrupts = <12>;
+
+ reg-shift = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uartlite_pins>;
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ sdram {
+ groups = "sdram";
+ function = "sdram";
+ };
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ rgmii_pins: rgmii {
+ rgmii {
+ groups = "rgmii";
+ function = "rgmii";
+ };
+ };
+
+ uartlite_pins: uartlite {
+ uart {
+ groups = "uartlite";
+ function = "uartlite";
+ };
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,rt3050-reset", "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ usbphy: usbphy {
+ compatible = "ralink,rt3050-usbphy";
+ #phy-cells = <0>;
+
+ ralink,sysctl = <&sysc>;
+ resets = <&rstctrl 22>;
+ reset-names = "host";
+ clocks = <&clkctrl 18>;
+ clock-names = "host";
+ };
+
+ ethernet: ethernet@10100000 {
+ compatible = "ralink,rt3050-eth";
+ reg = <0x10100000 0x10000>;
+
+ resets = <&rstctrl 21>;
+ reset-names = "fe";
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <5>;
+
+ mediatek,switch = <&esw>;
+ };
+
+ esw: esw@10110000 {
+ compatible = "ralink,rt3050-esw";
+ reg = <0x10110000 0x8000>;
+
+ resets = <&rstctrl 23>;
+ reset-names = "esw";
+
+ interrupt-parent = <&intc>;
+ interrupts = <17>;
+ };
+
+ wmac: wmac@10180000 {
+ compatible = "ralink,rt3050-wmac", "ralink,rt2880-wmac";
+ reg = <0x10180000 0x40000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <6>;
+
+ ralink,eeprom = "soc_wmac.eeprom";
+ };
+
+ otg: otg@101c0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "ralink,rt3050-otg", "snps,dwc2";
+ reg = <0x101c0000 0x40000>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ resets = <&rstctrl 22>;
+ reset-names = "otg";
+
+ status = "disabled";
+
+ otg_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3050_8devices_carambola.dts b/target/linux/ramips/dts/rt3050_8devices_carambola.dts
new file mode 100644
index 0000000..4ad23ff
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_8devices_carambola.dts
@@ -0,0 +1,79 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "8devices,carambola", "ralink,rt3050-soc";
+ model = "8devices Carambola";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ i2c-gpio {
+ compatible = "i2c-gpio";
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH &gpio0 2 GPIO_ACTIVE_HIGH>;
+ i2c-gpio,delay-us = <10>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_allnet_all0256n-4m.dts b/target/linux/ramips/dts/rt3050_allnet_all0256n-4m.dts
new file mode 100644
index 0000000..efb96da
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_allnet_all0256n-4m.dts
@@ -0,0 +1,46 @@
+#include "rt3050_allnet_all0256n.dtsi"
+
+/ {
+ compatible = "allnet,all0256n-4m", "allnet,all0256n", "ralink,rt3050-soc";
+ model = "Allnet ALL0256N (4M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3050_allnet_all0256n-8m.dts b/target/linux/ramips/dts/rt3050_allnet_all0256n-8m.dts
new file mode 100644
index 0000000..866d9a9
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_allnet_all0256n-8m.dts
@@ -0,0 +1,46 @@
+#include "rt3050_allnet_all0256n.dtsi"
+
+/ {
+ compatible = "allnet,all0256n-8m", "allnet,all0256n", "ralink,rt3050-soc";
+ model = "Allnet ALL0256N (8M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3050_allnet_all0256n.dtsi b/target/linux/ramips/dts/rt3050_allnet_all0256n.dtsi
new file mode 100644
index 0000000..7458165
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_allnet_all0256n.dtsi
@@ -0,0 +1,57 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "allnet,all0256n", "ralink,rt3050-soc";
+
+ leds {
+ compatible = "gpio-leds";
+
+ rssilow {
+ label = "green:rssilow";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ rssimed {
+ label = "green:rssimed";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ rssihigh {
+ label = "green:rssihigh";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3050_alphanetworks_asl26555-16m.dts b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555-16m.dts
new file mode 100644
index 0000000..9cc29d0
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555-16m.dts
@@ -0,0 +1,64 @@
+#include "rt3050_alphanetworks_asl26555.dtsi"
+
+/ {
+ compatible = "alphanetworks,asl26555-16m", "alphanetworks,asl26555", "ralink,rt3050-soc";
+ model = "Alpha ASL26555 (16M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xf80000>;
+ };
+
+ partition@fd0000 {
+ label = "cert";
+ reg = <0xfd0000 0x10000>;
+ read-only;
+ };
+
+ partition@fe0000 {
+ label = "langpack";
+ reg = <0xfe0000 0x10000>;
+ read-only;
+ };
+
+ devdata: partition@ff0000 {
+ label = "devdata";
+ reg = <0xff0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3050_alphanetworks_asl26555-8m.dts b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555-8m.dts
new file mode 100644
index 0000000..c5465b4
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555-8m.dts
@@ -0,0 +1,58 @@
+#include "rt3050_alphanetworks_asl26555.dtsi"
+
+/ {
+ compatible = "alphanetworks,asl26555-8m", "alphanetworks,asl26555", "ralink,rt3050-soc";
+ model = "Alpha ASL26555 (8M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ devdata: partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "rgdb";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x790000>;
+ };
+
+ partition@7e0000 {
+ label = "cert";
+ reg = <0x7e0000 0x10000>;
+ read-only;
+ };
+
+ partition@7f0000 {
+ label = "langpack";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi
new file mode 100644
index 0000000..028238a
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi
@@ -0,0 +1,101 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "alphanetworks,asl26555", "ralink,rt3050-soc";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ eth {
+ label = "green:eth";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wan-red {
+ label = "red:wan";
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ wan-green {
+ label = "green:wan";
+ gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_power_green: power-green {
+ label = "green:power";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ power-red {
+ label = "red:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ 3g-green {
+ label = "green:3g";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ 3g-red {
+ label = "red:3g";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&devdata 0x4004>;
+};
+
+&esw {
+ mediatek,portmap = <0x1e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devdata 0x4000>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts b/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts
new file mode 100644
index 0000000..44b2ad4
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts
@@ -0,0 +1,110 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "arcwireless,freestation5", "ralink,rt3050-soc";
+ model = "ARC FreeStation5";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+
+ /*
+ * Used to enable power-over-ethernet passthrough from port0 to port1.
+ * Disable passthrough by default to prevent accidental equipment damage.
+ */
+ poe {
+ gpio-export,name = "poe-passthrough";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ /*
+ * The following leds are defined in the ArcOS firmware, but reportedly
+ * not present in the Freestation5 device.
+ */
+ wifi {
+ label = "unknown:wifi";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ powerg {
+ label = "unknown:powerg";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "unknown:usb";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x01>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts b/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts
new file mode 100644
index 0000000..0baa2fe
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts
@@ -0,0 +1,85 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rt-g32-b1", "ralink,rt3050-soc";
+ model = "Asus RT-G32 B1";
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "devdata";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ devconf: partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&devconf 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devconf 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts
new file mode 100644
index 0000000..5c19755
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts
@@ -0,0 +1,91 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rt-n10-plus", "ralink,rt3050-soc";
+ model = "Asus RT-N10+";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "devdata";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ devconf: partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&devconf 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devconf 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts
new file mode 100644
index 0000000..cc6cd38
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts
@@ -0,0 +1,106 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,wl-330n", "ralink,rt3050-soc";
+ model = "Asus WL-330N";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ link {
+ label = "blue:link";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts
new file mode 100644
index 0000000..c2513c5
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts
@@ -0,0 +1,115 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,wl-330n3g", "ralink,rt3050-soc";
+ model = "Asus WL-330N3G";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ 3g {
+ label = "blue:3g";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g2 {
+ label = "red:3g";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts
new file mode 100644
index 0000000..ff01fe2
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts
@@ -0,0 +1,112 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dcs-930", "ralink,rt3050-soc";
+ model = "D-Link DCS-930";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x400000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi {
+ label = "red:alert";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts
new file mode 100644
index 0000000..7699dca
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts
@@ -0,0 +1,118 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-300-b1", "ralink,rt3050-soc";
+ model = "D-Link DIR-300 B1";
+
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_green;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_green;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ devdata: partition@30000 {
+ label = "devdata";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ status {
+ label = "amber:status";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_green: status2 {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "amber:wan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wan2 {
+ label = "green:wan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&devdata 0x4004>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devdata 0x4000>;
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts
new file mode 100644
index 0000000..21f0a73
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts
@@ -0,0 +1,118 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-600-b1", "ralink,rt3050-soc";
+ model = "D-Link DIR-600 B1";
+
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_green;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_green;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ devdata: partition@30000 {
+ label = "devdata";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ status {
+ label = "amber:status";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_green: status2 {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "amber:wan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wan2 {
+ label = "green:wan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&devdata 0x4004>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devdata 0x4000>;
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts b/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts
new file mode 100644
index 0000000..e84c9d9
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts
@@ -0,0 +1,116 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-615-d", "ralink,rt3050-soc";
+ model = "D-Link DIR-615 D";
+
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_green;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_green;
+ label-mac-device = &wmac;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ devdata: partition@30000 {
+ label = "devdata";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ status_amber {
+ label = "amber:status";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_green: status_green {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wan_amber {
+ label = "amber:wan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devdata 0x4000>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts
new file mode 100644
index 0000000..c134803
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts
@@ -0,0 +1,127 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-620-a1", "ralink,rt3050-soc";
+ model = "D-Link DIR-620 A1";
+
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_green;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_green;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ status {
+ label = "amber:status";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_green: status2 {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "amber:wan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wan2 {
+ label = "green:wan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+
+ wps2 {
+ label = "amber:wps";
+ gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts
new file mode 100644
index 0000000..07ff8bc
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts
@@ -0,0 +1,123 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
+
+/ {
+ compatible = "edimax,3g-6200n", "ralink,rt3050-soc";
+ model = "Edimax 3g-6200n";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@3e0000 {
+ label = "cimage";
+ reg = <0x3e0000 0x20000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,offset = <FW_EDIMAX_OFFSET>;
+ openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
+ label = "firmware";
+ reg = <0x50000 0x390000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "amber:wlan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "blue:3g";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "wlanswitch";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts
new file mode 100644
index 0000000..f339b7e
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts
@@ -0,0 +1,110 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
+
+/ {
+ compatible = "edimax,3g-6200nl", "ralink,rt3050-soc";
+ model = "Edimax 3g-6200nl";
+
+ aliases {
+ led-boot = &led_internet;
+ led-failsafe = &led_internet;
+ led-running = &led_internet;
+ led-upgrade = &led_internet;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@3e0000 {
+ label = "cimage";
+ reg = <0x3e0000 0x20000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,offset = <FW_EDIMAX_OFFSET>;
+ openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
+ label = "firmware";
+ reg = <0x50000 0x390000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_internet: internet {
+ label = "green:internet";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portdisable = <0x37>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_huawei_d105.dts b/target/linux/ramips/dts/rt3050_huawei_d105.dts
new file mode 100644
index 0000000..2784b0c
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_huawei_d105.dts
@@ -0,0 +1,103 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "huawei,d105", "ralink,rt3050-soc";
+ model = "Huawei D105";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "red:power";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts b/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts
new file mode 100644
index 0000000..581edc6
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts
@@ -0,0 +1,95 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "jcg,jhr-n805r", "ralink,rt3050-soc";
+ model = "JCG JHR-N805R";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3050_netcore_nw718.dts b/target/linux/ramips/dts/rt3050_netcore_nw718.dts
new file mode 100644
index 0000000..124a2ba
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_netcore_nw718.dts
@@ -0,0 +1,117 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "netcore,nw718", "ralink,rt3050-soc";
+ model = "Netcore NW718";
+
+ aliases {
+ led-boot = &led_cpu;
+ led-failsafe = &led_cpu;
+ led-running = &led_cpu;
+ led-upgrade = &led_cpu;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_cpu: cpu {
+ label = "amber:cpu";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "amber:usb";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wps {
+ label = "amber:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&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 = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x20000>;
+ read-only;
+ };
+
+ factory: partition@50000 {
+ label = "factory";
+ reg = <0x50000 0x10000>;
+ read-only;
+ };
+
+ partition@60000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x60000 0x3a0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts
new file mode 100644
index 0000000..e457491
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts
@@ -0,0 +1,109 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "sparklan,wcr-150gn", "ralink,rt3050-soc";
+ model = "Sparklan WCR-150GN";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ user {
+ label = "amber:user";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_power: power {
+ label = "amber:power";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts
new file mode 100644
index 0000000..742edbb
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts
@@ -0,0 +1,99 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "teltonika,rut5xx", "ralink,rt3050-soc";
+ model = "Teltonika RUT5XX";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3050_tenda_w150m.dts b/target/linux/ramips/dts/rt3050_tenda_w150m.dts
new file mode 100644
index 0000000..2826993
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_tenda_w150m.dts
@@ -0,0 +1,123 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tenda,w150m", "ralink,rt3050-soc";
+ model = "Tenda W150M";
+
+ aliases {
+ led-boot = &led_ap;
+ led-failsafe = &led_ap;
+ led-running = &led_ap;
+ led-upgrade = &led_ap;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ 3grouter {
+ label = "blue:3grouter";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_ap: ap {
+ label = "blue:ap";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wisprouter {
+ label = "blue:wisprouter";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wirelessrouter {
+ label = "blue:wirelessrouter";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "blue:3g";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wpsreset {
+ label = "blue:wpsreset";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts
new file mode 100644
index 0000000..7df592b
--- /dev/null
+++ b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts
@@ -0,0 +1,103 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "trendnet,tew-638apb-v2", "ralink,rt3050-soc";
+ model = "TRENDnet TEW-638APB v2";
+
+ aliases {
+ led-boot = &led_wps_green;
+ led-failsafe = &led_wps_green;
+ led-running = &led_wps_green;
+ led-upgrade = &led_wps_green;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x400000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "orange:wps";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps_green: wps2 {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_accton_wr6202.dts b/target/linux/ramips/dts/rt3052_accton_wr6202.dts
new file mode 100644
index 0000000..fac721c
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_accton_wr6202.dts
@@ -0,0 +1,115 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "accton,wr6202", "ralink,rt3052-soc";
+ model = "Accton WR6202";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "blue:3g";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <0>;
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts
new file mode 100644
index 0000000..d88df8c
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts
@@ -0,0 +1,113 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "alfa-network,w502u", "ralink,rt3052-soc";
+ model = "ALFA Network W502U";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_wps: wps {
+ label = "blue:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_argus_atp-52b.dts b/target/linux/ramips/dts/rt3052_argus_atp-52b.dts
new file mode 100644
index 0000000..39afaa5
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_argus_atp-52b.dts
@@ -0,0 +1,105 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "argus,atp-52b", "ralink,rt3052-soc";
+ model = "Argus ATP-52B";
+
+ aliases {
+ led-boot = &led_run;
+ led-failsafe = &led_run;
+ led-running = &led_run;
+ led-upgrade = &led_run;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7a0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_run: run {
+ label = "green:run";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ net {
+ label = "amber:net";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts b/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts
new file mode 100644
index 0000000..5d73043
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts
@@ -0,0 +1,91 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asiarf,awapn2403", "ralink,rt3052-soc";
+ model = "AsiaRF AWAPN2403";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts
new file mode 100644
index 0000000..a67a839
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts
@@ -0,0 +1,107 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rt-n13u", "ralink,rt3052-soc";
+ model = "Asus RT-N13U";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "blue:wifi";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <10>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts
new file mode 100644
index 0000000..2d5f077
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts
@@ -0,0 +1,125 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "aximcom,mr-102n", "ralink,rt3052-soc";
+ model = "AXIMCom MR-102N";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x790000>;
+ };
+
+ partition@7e0000 {
+ label = "nvram";
+ reg = <0x7e0000 0x10000>;
+ };
+
+ partition@7f0000 {
+ label = "nvram_backup";
+ reg = <0x7f0000 0x10000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_status: status {
+ label = "amber:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ status = "okay";
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts
new file mode 100644
index 0000000..f58a519
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts
@@ -0,0 +1,125 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "aztech,hw550-3g", "ralink,rt3052-soc";
+ model = "Aztech HW550-3G";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ connect {
+ label = "connect";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_CONNECT>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts b/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts
new file mode 100644
index 0000000..a9db288
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts
@@ -0,0 +1,142 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "belkin,f5d8235-v2", "ralink,rt3052-soc";
+ model = "Belkin F5D8235 v2";
+
+ aliases {
+ led-boot = &led_router;
+ led-failsafe = &led_router;
+ led-running = &led_router;
+ led-upgrade = &led_router;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ uboot: partition@0 {
+ label = "uboot";
+ reg = <0x0 0x50000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x790000>;
+ };
+
+ partition@7e0000 {
+ label = "nvram";
+ reg = <0x7e0000 0x10000>;
+ };
+
+ factory: partition@7f0000 {
+ label = "factory";
+ reg = <0x7f0000 0x10000>;
+ };
+ };
+ };
+
+ rtl8366rb {
+ compatible = "realtek,rtl8366rb";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ internet {
+ label = "blue:internet";
+ gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+ };
+
+ internet2 {
+ label = "amber:internet";
+ gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+ };
+
+ modem {
+ label = "blue:modem";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ modem2 {
+ label = "amber:modem";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_router: router {
+ label = "blue:router";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ storage {
+ label = "blue:storage";
+ gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ storage2 {
+ label = "amber:storage";
+ gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
+ };
+
+ security {
+ label = "blue:security";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ security2 {
+ label = "amber:security";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&uboot 0x40004>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii_pins>;
+};
+
+&esw {
+ ralink,rgmii = <1>;
+ mediatek,portmap = <0x3f>;
+ ralink,fct2 = <0x0002500c>;
+ /*
+ * ext phy base addr 31, rx/tx clock skew 0,
+ * turbo mii off, rgmi 3.3v off, port 5 polling off
+ * port5: enabled, gige, full-duplex, rx/tx-flow-control
+ * port6: enabled, gige, full-duplex, rx/tx-flow-control
+ */
+ ralink,fpa2 = <0x1f003fff>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&uboot 0x40000>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts b/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts
new file mode 100644
index 0000000..ca6259d
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts
@@ -0,0 +1,125 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "buffalo,whr-g300n", "ralink,rt3052-soc";
+ model = "Buffalo WHR-G300N";
+
+ aliases {
+ led-boot = &led_diag;
+ led-failsafe = &led_diag;
+ led-upgrade = &led_diag;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3a0000>;
+ };
+
+ partition@3f0000 {
+ label = "user";
+ reg = <0x3f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_diag: diag {
+ label = "red:diag";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ router {
+ label = "green:router";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ security {
+ label = "amber:security";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ aoss {
+ label = "aoss";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ router-off {
+ label = "router-off";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_2>;
+ };
+
+ router-on {
+ label = "router-on";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_3>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts
new file mode 100644
index 0000000..a2584e0
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts
@@ -0,0 +1,134 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dap-1350", "ralink,rt3052-soc";
+ model = "D-Link DAP-1350";
+
+ aliases {
+ led-boot = &led_power_blue;
+ led-failsafe = &led_power_blue;
+ led-running = &led_power_blue;
+ led-upgrade = &led_power_blue;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ devdata: partition@30000 {
+ label = "devdata";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x30000>;
+ read-only;
+ };
+
+ partition@70000 {
+ label = "devlang";
+ reg = <0x70000 0x40000>;
+ read-only;
+ };
+
+ partition@b0000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0xb0000 0x750000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_blue: power {
+ label = "blue:power";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ power2 {
+ label = "red:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ rt {
+ label = "rt";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&devdata 0x2e>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devdata 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts
new file mode 100644
index 0000000..4566e7a
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts
@@ -0,0 +1,103 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "engenius,esr-9753", "ralink,rt3052-soc";
+ model = "Senao / EnGenius ESR-9753";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "orange:power";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "orange:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts
new file mode 100644
index 0000000..9d89c6e
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts
@@ -0,0 +1,153 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "fon,fonera-20n", "ralink,rt3052-soc";
+ model = "La Fonera 2.0N";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi {
+ label = "orange:wifi";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "orange:usb";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ switch {
+ label = "switch";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mediatek,portmap = <0x2f>;
+
+ port@0 {
+ compatible = "swconfig,port";
+ reg = <0>;
+ swconfig,segment = "lan";
+ swconfig,portmap = <0 4>;
+ };
+
+ port@1 {
+ compatible = "swconfig,port";
+ reg = <1>;
+ swconfig,segment = "lan";
+ swconfig,portmap = <1 3>;
+ };
+
+ port@2 {
+ compatible = "swconfig,port";
+ reg = <2>;
+ swconfig,segment = "lan";
+ swconfig,portmap = <2 2>;
+ };
+
+ port@3 {
+ compatible = "swconfig,port";
+ reg = <3>;
+ swconfig,segment = "lan";
+ swconfig,portmap = <3 1>;
+ };
+
+ port@4 {
+ compatible = "swconfig,port";
+ reg = <4>;
+ swconfig,segment = "wan";
+ swconfig,portmap = <4 0>;
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts b/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts
new file mode 100644
index 0000000..6734f5b
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts
@@ -0,0 +1,96 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hauppauge,broadway", "ralink,rt3052-soc";
+ model = "Hauppauge Broadway";
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x790000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ diskmounted {
+ label = "red:diskmounted";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wps_active {
+ label = "red:wps_active";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ factory {
+ label = "Factory Reset button";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts
new file mode 100644
index 0000000..92ea59b
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts
@@ -0,0 +1,141 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "huawei,hg255d", "ralink,rt3052-soc";
+ model = "HuaWei HG255D";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x1000000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x40000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x40000 0x20000>;
+ read-only;
+ };
+
+ factory: partition@60000 {
+ label = "factory";
+ reg = <0x60000 0x20000>;
+ read-only;
+ };
+
+ partition@80000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x80000 0xf60000>;
+ };
+
+ partition@fa0000 {
+ label = "factory-orig";
+ reg = <0xfa0000 0x20000>;
+ read-only;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "green:internet";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wlan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ voice {
+ label = "green:voice";
+ gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <10>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts
new file mode 100644
index 0000000..7b71af4
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts
@@ -0,0 +1,90 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "jcg,jhr-n825r", "ralink,rt3052-soc";
+ model = "JCG JHR-N825R";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ led_system: system {
+ label = "red:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts
new file mode 100644
index 0000000..5431443
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts
@@ -0,0 +1,136 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "jcg,jhr-n926r", "ralink,rt3052-soc";
+ model = "JCG JHR-N926R";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan1 {
+ label = "red:wlan";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2 {
+ label = "yellow:wlan";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan3 {
+ label = "green:wlan";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ display_data {
+ gpio-export,name = "display_data";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ display_clock {
+ gpio-export,name = "display_clock";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ display_blank {
+ gpio-export,name = "display_blank";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wlan {
+ label = "wlan";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x2e>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts b/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts
new file mode 100644
index 0000000..245f01c
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts
@@ -0,0 +1,122 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mofinetwork,mofi3500-3gn", "ralink,rt3052-soc";
+ model = "MoFi Network MOFI3500-3GN";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ connect {
+ label = "connect";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_CONNECT>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts
new file mode 100644
index 0000000..e5d70bd
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts
@@ -0,0 +1,145 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "netgear,wnce2001", "ralink,rt3052-soc";
+ model = "Netgear WNCE2001";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_green;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_green: power-green {
+ label = "green:power";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ power-red {
+ label = "red:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan-green {
+ label = "green:wlan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan-red {
+ label = "red:wlan";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ rt {
+ label = "rt";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ ap {
+ label = "ap";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ factory: partition@30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "config";
+ reg = <0x40000 0x20000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "language";
+ reg = <0x60000 0x30000>;
+ read-only;
+ };
+
+ partition@90000 {
+ label = "pot";
+ reg = <0x90000 0x10000>;
+ read-only;
+ };
+
+ partition@a0000 {
+ label = "checksum";
+ reg = <0xa0000 0x10000>;
+ };
+
+ partition@b0000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0xb0000 0x350000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts
new file mode 100644
index 0000000..d3d5afe
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts
@@ -0,0 +1,91 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "nexaira,bc2", "ralink,rt3052-soc";
+ model = "NexAira BC2";
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts
new file mode 100644
index 0000000..bc3dd5e
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts
@@ -0,0 +1,101 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "omnima,miniembwifi", "ralink,rt3052-soc";
+ model = "Omnima MiniEMBWiFi";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts
new file mode 100644
index 0000000..b17097c
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts
@@ -0,0 +1,100 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "petatel,psr-680w", "ralink,rt3052-soc";
+ model = "Petatel PSR-680W Wireless 3G Router";
+
+ aliases {
+ led-boot = &led_wan;
+ led-failsafe = &led_wan;
+ led-running = &led_wan;
+ led-upgrade = &led_wan;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wan: wan {
+ label = "red:wan";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts
new file mode 100644
index 0000000..ff199f8
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts
@@ -0,0 +1,120 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "planex,mzk-w300nh2", "ralink,rt3052-soc";
+ model = "Planex MZK-W300NH2";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@3e0000 {
+ label = "cimage";
+ reg = <0x3e0000 0x20000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x390000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "amber:wlan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "amber:wps";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rt {
+ label = "rt";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts b/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts
new file mode 100644
index 0000000..7f660d6
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts
@@ -0,0 +1,89 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "planex,mzk-wdpr", "ralink,rt3052-soc";
+ model = "Planex MZK-WDPR";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@7f0000 {
+ label = "Data3G";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x680000>;
+ };
+ };
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+
+ lcd_ctrl1 {
+ gpio-export,name = "lcd_ctrl1";
+ gpio-export,output = <0>;
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_poray_ip2202.dts b/target/linux/ramips/dts/rt3052_poray_ip2202.dts
new file mode 100644
index 0000000..f3dab80
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_poray_ip2202.dts
@@ -0,0 +1,97 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "poray,ip2202", "ralink,rt3052-soc";
+ model = "Poray IP2202";
+
+ aliases {
+ led-boot = &led_run;
+ led-failsafe = &led_run;
+ led-running = &led_run;
+ led-upgrade = &led_run;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_run: run {
+ label = "green:run";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ net {
+ label = "amber:net";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts b/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts
new file mode 100644
index 0000000..312007c
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts
@@ -0,0 +1,93 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "prolink,pwh2004", "ralink,rt3052-soc";
+ model = "Prolink PWH2004";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi {
+ label = "red:wifi";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts b/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts
new file mode 100644
index 0000000..2689feb
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts
@@ -0,0 +1,103 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ralink,v22rw-2x2", "ralink,rt3052-soc";
+ model = "Ralink AP-RT3052-V22RW-2X2";
+
+ aliases {
+ led-boot = &led_security;
+ led-failsafe = &led_security;
+ led-running = &led_security;
+ led-upgrade = &led_security;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_security: security {
+ label = "green:security";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "red:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts
new file mode 100644
index 0000000..f4aa24e
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts
@@ -0,0 +1,129 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "sitecom,wl-351", "ralink,rt3052-soc";
+ model = "Sitecom WL-351 v1 002";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "amber:power";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ unpopulated {
+ label = "amber:unpopulated";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ unpopulated2 {
+ label = "blue:unpopulated";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ rtl8366rb {
+ compatible = "realtek,rtl8366rb";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii_pins>;
+};
+
+&esw {
+ ralink,rgmii = <1>;
+ mediatek,portmap = <0x3f>;
+ ralink,fct2 = <0x0002500c>;
+ /*
+ * ext phy base addr 31, rx/tx clock skew 0,
+ * turbo mii off, rgmi 3.3v off, port 5 polling off
+ * port5: enabled, gige, full-duplex, rx/tx-flow-control
+ * port6: enabled, gige, full-duplex, rx/tx-flow-control
+ */
+ ralink,fpa2 = <0x1f003fff>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts b/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts
new file mode 100644
index 0000000..89e6c9e
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts
@@ -0,0 +1,102 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "skyline,sl-r7205", "ralink,rt3052-soc";
+ model = "Skyline SL-R7205 Wireless 3G Router";
+
+ aliases {
+ led-boot = &led_wifi;
+ led-failsafe = &led_wifi;
+ led-running = &led_wifi;
+ led-upgrade = &led_wifi;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wifi: wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_tenda_3g300m.dts b/target/linux/ramips/dts/rt3052_tenda_3g300m.dts
new file mode 100644
index 0000000..dcebe64
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_tenda_3g300m.dts
@@ -0,0 +1,132 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tenda,3g300m", "ralink,rt3052-soc";
+ model = "Tenda 3G300M";
+
+ aliases {
+ led-boot = &led_ap;
+ led-failsafe = &led_ap;
+ led-running = &led_ap;
+ led-upgrade = &led_ap;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ 3grouter {
+ label = "blue:3grouter";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_ap: ap {
+ label = "blue:ap";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wisprouter {
+ label = "blue:wisprouter";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wirelessrouter {
+ label = "blue:wirelessrouter";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "blue:3g";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wpsreset {
+ label = "blue:wpsreset";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts
new file mode 100644
index 0000000..f6c1b2d
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts
@@ -0,0 +1,97 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tenda,w306r-v2", "ralink,rt3052-soc";
+ model = "Tenda W306R V2.0";
+
+ aliases {
+ led-boot = &led_sys;
+ led-failsafe = &led_sys;
+ led-running = &led_sys;
+ led-upgrade = &led_sys;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_sys: sys {
+ label = "green:sys";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "RESET/WPS";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn-4m.dts b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn-4m.dts
new file mode 100644
index 0000000..d3393c0
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn-4m.dts
@@ -0,0 +1,43 @@
+#include "rt3052_unbranded_wr512-3gn.dtsi"
+
+/ {
+ compatible = "unbranded,wr512-3gn-4m", "unbranded,wr512-3gn", "ralink,rt3052-soc";
+ model = "WR512-3GN (4M)";
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn-8m.dts b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn-8m.dts
new file mode 100644
index 0000000..ce25dc9
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn-8m.dts
@@ -0,0 +1,43 @@
+#include "rt3052_unbranded_wr512-3gn.dtsi"
+
+/ {
+ compatible = "unbranded,wr512-3gn-8m", "unbranded,wr512-3gn", "ralink,rt3052-soc";
+ model = "WR512-3GN (8M)";
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi
new file mode 100644
index 0000000..dad0da1
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi
@@ -0,0 +1,80 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "unbranded,wr512-3gn", "ralink,rt3052-soc";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ gateway {
+ label = "green:gateway";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ ap {
+ label = "green:ap";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ station {
+ label = "green:station";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts
new file mode 100644
index 0000000..d94da95
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts
@@ -0,0 +1,101 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "unbranded,xdx-rn502j", "ralink,rt3052-soc";
+ model = "XDX RN502J";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts
new file mode 100644
index 0000000..fc71437
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts
@@ -0,0 +1,122 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "upvel,ur-326n4g", "ralink,rt3052-soc";
+ model = "UPVEL UR-326N4G";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ gateway {
+ label = "green:gateway";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ ap {
+ label = "green:ap";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ station {
+ label = "green:station";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4004>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts
new file mode 100644
index 0000000..2c00ca8
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts
@@ -0,0 +1,122 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "upvel,ur-336un", "ralink,rt3052-soc";
+ model = "UPVEL UR-336UN";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ gateway {
+ label = "green:gateway";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ ap {
+ label = "green:ap";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ station {
+ label = "green:station";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4004>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts
new file mode 100644
index 0000000..6c65d34
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts
@@ -0,0 +1,121 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,keenetic", "ralink,rt3052-soc";
+ model = "ZyXEL Keenetic";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&otg_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RFKILL>;
+ linux,input-type = <EV_SW>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&otg {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts
new file mode 100644
index 0000000..db4f8d4
--- /dev/null
+++ b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts
@@ -0,0 +1,103 @@
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,nbg-419n", "ralink,rt3052-soc";
+ model = "ZyXEL NBG-419N";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1f000000 {
+ compatible = "cfi-flash";
+ reg = <0x1f000000 0x800000>;
+ bank-width = <2>;
+ device-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3352.dtsi b/target/linux/ramips/dts/rt3352.dtsi
new file mode 100644
index 0000000..2a51b14
--- /dev/null
+++ b/target/linux/ramips/dts/rt3352.dtsi
@@ -0,0 +1,401 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ralink,rt3352-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "mips,mips24KEc";
+ reg = <0>;
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ aliases {
+ spi0 = &spi0;
+ spi1 = &spi1;
+ serial0 = &uartlite;
+ };
+
+ palmbus: palmbus@10000000 {
+ compatible = "palmbus";
+ reg = <0x10000000 0x200000>;
+ ranges = <0x0 0x10000000 0x1FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "ralink,rt3352-sysc", "ralink,rt3050-sysc", "syscon";
+ reg = <0x0 0x100>;
+ };
+
+ timer: timer@100 {
+ compatible = "ralink,rt3352-timer", "ralink,rt2880-timer";
+ reg = <0x100 0x20>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ watchdog: watchdog@120 {
+ compatible = "ralink,rt3352-wdt", "ralink,rt2880-wdt";
+ reg = <0x120 0x10>;
+
+ resets = <&rstctrl 8>;
+ reset-names = "wdt";
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ intc: intc@200 {
+ compatible = "ralink,rt3352-intc", "ralink,rt2880-intc";
+ reg = <0x200 0x100>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ };
+
+ memc: memc@300 {
+ compatible = "ralink,rt3352-memc", "ralink,rt3050-memc";
+ reg = <0x300 0x100>;
+
+ resets = <&rstctrl 20>;
+ reset-names = "mc";
+
+ interrupt-parent = <&intc>;
+ interrupts = <3>;
+ };
+
+ uart: uart@500 {
+ compatible = "ralink,rt3352-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0x500 0x100>;
+
+ resets = <&rstctrl 12>;
+ reset-names = "uart";
+
+ interrupt-parent = <&intc>;
+ interrupts = <5>;
+
+ reg-shift = <2>;
+
+ status = "disabled";
+ };
+
+ gpio0: gpio@600 {
+ compatible = "ralink,rt3352-gpio", "ralink,rt2880-gpio";
+ reg = <0x600 0x34>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <0>;
+ ralink,num-gpios = <24>;
+ ralink,register-map = [ 00 04 08 0c
+ 20 24 28 2c
+ 30 34 ];
+ resets = <&rstctrl 13>;
+ reset-names = "pio";
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+ };
+
+ gpio1: gpio@638 {
+ compatible = "ralink,rt3352-gpio", "ralink,rt2880-gpio";
+ reg = <0x638 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <24>;
+ ralink,num-gpios = <16>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio2: gpio@660 {
+ compatible = "ralink,rt3352-gpio", "ralink,rt2880-gpio";
+ reg = <0x660 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <40>;
+ ralink,num-gpios = <6>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ i2c@900 {
+ compatible = "ralink,rt2880-i2c";
+ reg = <0x900 0x100>;
+
+ resets = <&rstctrl 16>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ };
+
+ i2s@a00 {
+ compatible = "ralink,rt3352-i2s";
+ reg = <0xa00 0x100>;
+
+ resets = <&rstctrl 17>;
+ reset-names = "i2s";
+
+ interrupt-parent = <&intc>;
+ interrupts = <10>;
+
+ txdma-req = <2>;
+ rxdma-req = <3>;
+
+ dmas = <&gdma 4>,
+ <&gdma 6>;
+ dma-names = "tx", "rx";
+
+ status = "disabled";
+ };
+
+ spi0: spi@b00 {
+ compatible = "ralink,rt3352-spi", "ralink,rt2880-spi";
+ reg = <0xb00 0x40>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>;
+
+ status = "disabled";
+ };
+
+ spi1: spi@b40 {
+ compatible = "ralink,rt3352-spi", "ralink,rt2880-spi";
+ reg = <0xb40 0x60>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_cs1>;
+
+ status = "disabled";
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ralink,rt3352-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0xc00 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "uartl";
+
+ interrupt-parent = <&intc>;
+ interrupts = <12>;
+
+ reg-shift = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uartlite_pins>;
+ };
+
+ gdma: gdma@2800 {
+ compatible = "ralink,rt3883-gdma";
+ reg = <0x2800 0x800>;
+
+ resets = <&rstctrl 14>;
+ reset-names = "dma";
+
+ interrupt-parent = <&intc>;
+ interrupts = <7>;
+
+ #dma-cells = <1>;
+ #dma-channels = <16>;
+ #dma-requests = <16>;
+
+ status = "disabled";
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ mdio_pins: mdio {
+ mdio {
+ groups = "mdio";
+ function = "mdio";
+ };
+ };
+
+ rgmii_pins: rgmii {
+ rgmii {
+ groups = "rgmii";
+ function = "rgmii";
+ };
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ spi_cs1: spi1 {
+ spi1 {
+ groups = "spi_cs1";
+ function = "spi_cs1";
+ };
+ };
+
+ uartlite_pins: uartlite {
+ uart {
+ groups = "uartlite";
+ function = "uartlite";
+ };
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,rt3352-reset", "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ ethernet: ethernet@10100000 {
+ compatible = "ralink,rt3352-eth", "ralink,rt3050-eth";
+ reg = <0x10100000 0x10000>;
+
+ resets = <&rstctrl 21>;
+ reset-names = "fe";
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <5>;
+
+ mediatek,switch = <&esw>;
+ };
+
+ esw: esw@10110000 {
+ compatible = "ralink,rt3352-esw", "ralink,rt3050-esw";
+ reg = <0x10110000 0x8000>;
+
+ resets = <&rstctrl 23>;
+ reset-names = "esw";
+
+ interrupt-parent = <&intc>;
+ interrupts = <17>;
+ };
+
+ usbphy: usbphy {
+ compatible = "ralink,rt3352-usbphy";
+ #phy-cells = <0>;
+
+ ralink,sysctl = <&sysc>;
+ resets = <&rstctrl 22 &rstctrl 25>;
+ reset-names = "host", "device";
+ clocks = <&clkctrl 18 &clkctrl 20>;
+ clock-names = "host", "device";
+ };
+
+ wmac: wmac@10180000 {
+ compatible = "ralink,rt3352-wmac", "ralink,rt2880-wmac";
+ reg = <0x10180000 0x40000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <6>;
+
+ ralink,eeprom = "soc_wmac.eeprom";
+ };
+
+ ehci: ehci@101c0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ehci";
+ reg = <0x101c0000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ status = "disabled";
+
+ ehci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ ohci: ohci@101c1000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ohci";
+ reg = <0x101c1000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ status = "disabled";
+
+ ohci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3352_allnet_all5002.dts b/target/linux/ramips/dts/rt3352_allnet_all5002.dts
new file mode 100644
index 0000000..3aa132a
--- /dev/null
+++ b/target/linux/ramips/dts/rt3352_allnet_all5002.dts
@@ -0,0 +1,111 @@
+#include "rt3352.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "allnet,all5002", "ralink,rt3352-soc";
+ model = "Allnet ALL5002";
+
+ i2c-gpio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compatible = "i2c-gpio";
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH &gpio0 2 GPIO_ACTIVE_HIGH>;
+ i2c-gpio,delay-us = <10>;
+
+ pcf0: iexp@38 {
+ #gpio-cells = <2>;
+ compatible = "inxp,pcf8574a";
+ reg = <0x38>;
+ gpio-controller;
+ };
+
+ hwmon@4b {
+ compatible = "national,lm92";
+ reg = <0x4b>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ ld1 {
+ label = "green:ld1";
+ gpios = <&pcf0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ ld2 {
+ label = "green:ld2";
+ gpios = <&pcf0 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts
new file mode 100644
index 0000000..2233c90
--- /dev/null
+++ b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts
@@ -0,0 +1,125 @@
+#include "rt3352.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-615-h1", "ralink,rt3352-soc";
+ model = "D-Link DIR-615 H1";
+
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_green;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_green;
+ label-mac-device = &wmac;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ status {
+ label = "amber:status";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_status_green: status2 {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ wan {
+ label = "amber:wan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wan2 {
+ label = "green:wan";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii_pins &mdio_pins>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts
new file mode 100644
index 0000000..50b762c
--- /dev/null
+++ b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts
@@ -0,0 +1,110 @@
+#include "rt3352.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-620-d1", "ralink,rt3352-soc";
+ model = "D-Link DIR-620 D1";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii_pins &mdio_pins>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3352_zte_mf283plus.dts b/target/linux/ramips/dts/rt3352_zte_mf283plus.dts
new file mode 100644
index 0000000..a91d0e6
--- /dev/null
+++ b/target/linux/ramips/dts/rt3352_zte_mf283plus.dts
@@ -0,0 +1,131 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rt3352.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zte,mf283plus", "ralink,rt3352-soc";
+ model = "ZTE MF283+";
+
+ aliases {
+ led-boot = &led_wwan_green;
+ led-failsafe = &led_wwan_red;
+ led-upgrade = &led_wwan_red;
+ label-mac-device = ðernet;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wwan_blue: wwan_blue {
+ label = "blue:wwan";
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wwan_green: wwan_green {
+ label = "green:wwan";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wwan_red: wwan_red {
+ label = "red:wwan";
+ gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ };
+
+ signal {
+ label = "blue:signal";
+ gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x60000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "u-boot-env";
+ reg = <0x60000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@70000 {
+ label = "factory";
+ reg = <0x70000 0x10000>;
+ read-only;
+ };
+
+ partition@80000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x80000 0xf80000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts
new file mode 100644
index 0000000..84bb645
--- /dev/null
+++ b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts
@@ -0,0 +1,125 @@
+#include "rt3352.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,nbg-419n-v2", "ralink,rt3352-soc";
+ model = "ZyXEL NBG-419N v2";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ rfkill {
+ label = "rfkill";
+ linux,input-type = <EV_SW>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts
new file mode 100644
index 0000000..98426b8
--- /dev/null
+++ b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts
@@ -0,0 +1,147 @@
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rt-n56u", "ralink,rt3662-soc", "ralink,rt3883-soc";
+ model = "Asus RT-N56U";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1c000000 {
+ compatible = "cfi-flash";
+ reg = <0x1c000000 0x800000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x0030000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x00030000 0x00010000>;
+ label = "u-boot-env";
+ read-only;
+ };
+
+ factory: partition@40000 {
+ reg = <0x00040000 0x00010000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ reg = <0x00050000 0x007b0000>;
+ label = "firmware";
+ };
+ };
+ };
+
+ rtl8367 {
+ compatible = "realtek,rtl8367";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "blue:wan";
+ gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+};
+
+&pci {
+ status = "okay";
+};
+
+&pci1 {
+ status = "okay";
+
+ wifi@0,0 {
+ compatible = "pci1814,3091";
+ reg = <0x10000 0 0 0 0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,2ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts
new file mode 100644
index 0000000..2331375
--- /dev/null
+++ b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts
@@ -0,0 +1,148 @@
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-645", "ralink,rt3662-soc", "ralink,rt3883-soc";
+ model = "D-Link DIR-645";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ rtl8367b {
+ compatible = "realtek,rtl8367b";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ inet {
+ label = "green:inet";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&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 = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x4000>;
+ read-only;
+ };
+
+ factory: partition@34000 {
+ label = "factory";
+ reg = <0x34000 0x4000>;
+ read-only;
+ };
+
+ partition@38000 {
+ label = "nvram";
+ reg = <0x38000 0x8000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "devdata";
+ reg = <0x40000 0x10000>;
+ };
+
+ partition@50000 {
+ compatible = "seama";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 0>;
+ };
+};
+
+&wmac {
+ ralink,5ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts
new file mode 100644
index 0000000..56d9dc0
--- /dev/null
+++ b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts
@@ -0,0 +1,175 @@
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
+
+/ {
+ compatible = "edimax,br-6475nd", "ralink,rt3662-soc", "ralink,rt3883-soc";
+ model = "Edimax BR-6475nD";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "amber:wlan";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan_5ghz {
+ label = "amber:wlan_5ghz";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ flash@1c000000 {
+ compatible = "cfi-flash";
+ reg = <0x1c000000 0x800000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x00000000 0x00030000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x00030000 0x00010000>;
+ label = "nvram";
+ read-only;
+ };
+
+ factory: partition@40000 {
+ reg = <0x00040000 0x00010000>;
+ label = "factory";
+ read-only;
+ };
+
+ devdata: partition@50000 {
+ reg = <0x00050000 0x00020000>;
+ label = "devdata";
+ read-only;
+ };
+
+ partition@70000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,offset = <FW_EDIMAX_OFFSET>;
+ openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
+ reg = <0x00070000 0x00790000>;
+ label = "firmware";
+ };
+ };
+ };
+
+ rtl8367 {
+ compatible = "realtek,rtl8367";
+ gpio-sda = <&gpio0 5 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 4 GPIO_ACTIVE_HIGH>;
+ realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
+ };
+
+ /*
+ * Unclear if this is the correct gpio setup; the USB ports are
+ * unpopulated on a stock BR-6475nD, even though the hardware exists
+ * and the headers are there.
+ */
+ /*
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name="usb";
+ gpio-export,output=<0>;
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+ */
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+&timer {
+ status = "okay";
+};
+
+&uartlite {
+ status = "okay";
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&devdata 0xd>;
+
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 1>;
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pci {
+ status = "okay";
+};
+
+&pci1 {
+ status = "okay";
+
+ wifi@0,0 {
+ compatible = "pci0,0";
+ reg = <0x10000 0 0 0 0>;
+ ralink,5ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3662_engenius_esr600h.dts b/target/linux/ramips/dts/rt3662_engenius_esr600h.dts
new file mode 100644
index 0000000..cce44ed
--- /dev/null
+++ b/target/linux/ramips/dts/rt3662_engenius_esr600h.dts
@@ -0,0 +1,171 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "engenius,esr600h", "ralink,rt3662-soc", "ralink,rt3883-soc";
+ model = "EnGenius ESR600H";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset-wps {
+ label = "reset-wps";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x1000>;
+ };
+
+ partition@32000 {
+ label = "config";
+ reg = <0x32000 0xe000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+
+ port@0 {
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+
+ qca,ar8327-initvals = <
+ 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
+ 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
+ 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
+ 0x50 0xc437c437 /* LED Control Register 0 */
+ 0x54 0xc337c337 /* LED Control Register 1 */
+ 0x58 0x00000000 /* LED Control Register 2 */
+ 0x5c 0x03ffff00 /* LED Control Register 3 */
+ 0x7c 0x0000007e /* PORT0_STATUS */
+ 0x94 0x0000007e /* PORT6 STATUS */
+ >;
+ };
+ };
+};
+
+&pci {
+ status = "okay";
+};
+
+&pci1 {
+ status = "okay";
+
+ wifi@0,1,0 {
+ compatible = "pci1814,3091";
+ reg = <0x0 1 0 0 0>;
+ ralink,5ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&wmac {
+ status = "okay";
+
+ ralink,2ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3662_loewe_wmdr-143n.dts b/target/linux/ramips/dts/rt3662_loewe_wmdr-143n.dts
new file mode 100644
index 0000000..2501c17
--- /dev/null
+++ b/target/linux/ramips/dts/rt3662_loewe_wmdr-143n.dts
@@ -0,0 +1,66 @@
+#include "rt3883.dtsi"
+
+/ {
+ compatible = "loewe,wmdr-143n", "ralink,rt3662-soc", "ralink,rt3883-soc";
+ model = "Loewe WMDR-143N";
+};
+
+&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 = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x00010000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ port@0 {
+ phy-handle = <&phy0>;
+ phy-mode = "mii";
+ };
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "mii";
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt3662_omnima_hpm.dts b/target/linux/ramips/dts/rt3662_omnima_hpm.dts
new file mode 100644
index 0000000..c0f30ec
--- /dev/null
+++ b/target/linux/ramips/dts/rt3662_omnima_hpm.dts
@@ -0,0 +1,158 @@
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "omnima,hpm", "ralink,rt3662-soc", "ralink,rt3883-soc";
+ model = "Omnima HPM";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "orange:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ eth {
+ label = "green:eth";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ eth2 {
+ label = "red:eth";
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi2 {
+ label = "red:wifi";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+ /* gpio 12 and 13 handle the OC input */
+
+ usb0 {
+ gpio-export,name = "usb0";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb1 {
+ gpio-export,name = "usb1";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <25000000>;
+ reg = <0>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x0030000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x00030000 0x00010000>;
+ label = "config";
+ read-only;
+ };
+
+ factory: partition@40000 {
+ reg = <0x00040000 0x00010000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ reg = <0x00050000 0x00fb0000>;
+ label = "firmware";
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii";
+ mtd-mac-address = <&factory 0x28>;
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@4 {
+ reg = <4>;
+ };
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts b/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts
new file mode 100644
index 0000000..ad41785
--- /dev/null
+++ b/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts
@@ -0,0 +1,154 @@
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "samsung,cy-swr1100", "ralink,rt3662-soc", "ralink,rt3883-soc";
+ model = "Samsung CY-SWR1100";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ flash@1c000000 {
+ compatible = "cfi-flash";
+ reg = <0x1c000000 0x800000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x4000>;
+ read-only;
+ };
+
+ factory: partition@34000 {
+ label = "factory";
+ reg = <0x34000 0x4000>;
+ read-only;
+ };
+
+ partition@38000 {
+ label = "nvram";
+ reg = <0x38000 0x8000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "seama";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+
+ rtl8367 {
+ compatible = "realtek,rtl8367";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "spi";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+};
+
+&pci {
+ status = "okay";
+};
+
+&pci1 {
+ status = "okay";
+
+ wifi@0,0 {
+ compatible = "pci1814,3091";
+ reg = <0x10000 0 0 0 0>;
+ ralink,mtd-eeprom = <&factory 0x2000>;
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,2ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3883.dtsi b/target/linux/ramips/dts/rt3883.dtsi
new file mode 100644
index 0000000..a605d60
--- /dev/null
+++ b/target/linux/ramips/dts/rt3883.dtsi
@@ -0,0 +1,499 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ralink,rt3883-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "mips,mips74Kc";
+ reg = <0>;
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ aliases {
+ spi0 = &spi0;
+ spi1 = &spi1;
+ serial0 = &uartlite;
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ palmbus: palmbus@10000000 {
+ compatible = "palmbus";
+ reg = <0x10000000 0x200000>;
+ ranges = <0x0 0x10000000 0x1FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "ralink,rt3883-sysc", "ralink,rt3050-sysc", "syscon";
+ reg = <0x0 0x100>;
+ };
+
+ timer: timer@100 {
+ compatible = "ralink,rt3883-timer", "ralink,rt2880-timer";
+ reg = <0x100 0x20>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ watchdog: watchdog@120 {
+ compatible = "ralink,rt3883-wdt", "ralink,rt2880-wdt";
+ reg = <0x120 0x10>;
+
+ resets = <&rstctrl 8>;
+ reset-names = "wdt";
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ intc: intc@200 {
+ compatible = "ralink,rt3883-intc", "ralink,rt2880-intc";
+ reg = <0x200 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "intc";
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ };
+
+ memc: memc@300 {
+ compatible = "ralink,rt3883-memc", "ralink,rt3050-memc";
+ reg = <0x300 0x100>;
+
+ resets = <&rstctrl 20>;
+ reset-names = "mc";
+
+ interrupt-parent = <&intc>;
+ interrupts = <3>;
+ };
+
+ uart: uart@500 {
+ compatible = "ralink,rt3883-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0x500 0x100>;
+
+ resets = <&rstctrl 12>;
+ reset-names = "uart";
+
+ interrupt-parent = <&intc>;
+ interrupts = <5>;
+
+ reg-shift = <2>;
+
+ status = "disabled";
+ };
+
+ gpio0: gpio@600 {
+ compatible = "ralink,rt3883-gpio", "ralink,rt2880-gpio";
+ reg = <0x600 0x34>;
+
+ resets = <&rstctrl 13>;
+ reset-names = "pio";
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <0>;
+ ralink,num-gpios = <24>;
+ ralink,register-map = [ 00 04 08 0c
+ 20 24 28 2c
+ 30 34 ];
+ };
+
+ gpio1: gpio@638 {
+ compatible = "ralink,rt3883-gpio", "ralink,rt2880-gpio";
+ reg = <0x638 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <24>;
+ ralink,num-gpios = <16>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio2: gpio@660 {
+ compatible = "ralink,rt3883-gpio", "ralink,rt2880-gpio";
+ reg = <0x660 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <40>;
+ ralink,num-gpios = <32>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ gpio3: gpio@688 {
+ compatible = "ralink,rt3883-gpio", "ralink,rt2880-gpio";
+ reg = <0x688 0x24>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <72>;
+ ralink,num-gpios = <24>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ i2c@900 {
+ compatible = "ralink,rt2880-i2c";
+ reg = <0x900 0x100>;
+
+ resets = <&rstctrl 16>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+ };
+
+ i2s@a00 {
+ compatible = "ralink,rt3883-i2s";
+ reg = <0xa00 0x100>;
+
+ resets = <&rstctrl 17>;
+ reset-names = "i2s";
+
+ interrupt-parent = <&intc>;
+ interrupts = <10>;
+
+ txdma-req = <2>;
+ rxdma-req = <3>;
+
+ dmas = <&gdma 4>,
+ <&gdma 6>;
+ dma-names = "tx", "rx";
+
+ status = "disabled";
+ };
+
+ spi0: spi@b00 {
+ compatible = "ralink,rt3883-spi", "ralink,rt2880-spi";
+ reg = <0xb00 0x40>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>;
+
+ status = "disabled";
+ };
+
+ spi1: spi@b40 {
+ compatible = "ralink,rt3883-spi", "ralink,rt2880-spi";
+ reg = <0xb40 0x60>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_cs1>;
+
+ status = "disabled";
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ralink,rt3883-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0xc00 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "uartl";
+
+ interrupt-parent = <&intc>;
+ interrupts = <12>;
+
+ reg-shift = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uartlite_pins>;
+ };
+
+ gdma: gdma@2800 {
+ compatible = "ralink,rt3883-gdma";
+ reg = <0x2800 0x800>;
+
+ resets = <&rstctrl 14>;
+ reset-names = "dma";
+
+ interrupt-parent = <&intc>;
+ interrupts = <7>;
+
+ #dma-cells = <1>;
+ #dma-channels = <16>;
+ #dma-requests = <16>;
+
+ status = "disabled";
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ spi_cs1: spi1 {
+ spi1 {
+ groups = "pci";
+ function = "pci-func";
+ };
+ };
+
+ uartlite_pins: uartlite {
+ uart {
+ groups = "uartlite";
+ function = "uartlite";
+ };
+ };
+
+ pci_pins: pci {
+ pci {
+ groups = "pci";
+ function = "pci-fnc";
+ };
+ };
+ };
+
+ ethernet: ethernet@10100000 {
+ compatible = "ralink,rt3883-eth";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x10100000 0x10000>;
+
+ resets = <&rstctrl 21>;
+ reset-names = "fe";
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <5>;
+
+ port@0 {
+ compatible = "ralink,rt3883-port", "mediatek,eth-port";
+ reg = <0>;
+ };
+
+ mdio-bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,rt3883-reset", "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ pci: pci@10140000 {
+ compatible = "ralink,rt3883-pci";
+ reg = <0x10140000 0x20000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges; /* direct mapping */
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pci_pins>;
+
+ status = "disabled";
+
+ pciintc: interrupt-controller {
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <4>;
+ };
+
+ pci@0 {
+ #address-cells = <3>;
+ #size-cells = <2>;
+ #interrupt-cells = <1>;
+
+ device_type = "pci";
+
+ bus-range = <0 255>;
+ ranges = <
+ 0x02000000 0 0x00000000 0x20000000 0 0x10000000 /* pci memory */
+ 0x01000000 0 0x00000000 0x10160000 0 0x00010000 /* io space */
+ >;
+
+ interrupt-map-mask = <0xf800 0 0 7>;
+ interrupt-map = <
+ /* IDSEL 17 */
+ 0x8800 0 0 1 &pciintc 18
+ 0x8800 0 0 2 &pciintc 18
+ 0x8800 0 0 3 &pciintc 18
+ 0x8800 0 0 4 &pciintc 18
+ /* IDSEL 18 */
+ 0x9000 0 0 1 &pciintc 19
+ 0x9000 0 0 2 &pciintc 19
+ 0x9000 0 0 3 &pciintc 19
+ 0x9000 0 0 4 &pciintc 19
+ >;
+
+ pci1: pci@1 {
+ reg = <0x0800 0 0 0 0>;
+ device_type = "pci";
+ #interrupt-cells = <1>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ status = "disabled";
+
+ interrupt-map-mask = <0x0 0 0 0>;
+ interrupt-map = <0x0 0 0 0 &pciintc 20>;
+
+ bus-range = <1 255>;
+ ranges;
+ };
+
+ pci17: pci@11,0 {
+ reg = <0x8800 0 0 0 0>;
+ #interrupt-cells = <1>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ status = "disabled";
+ };
+
+ pci18: pci@12,0 {
+ reg = <0x9000 0 0 0 0>;
+ #interrupt-cells = <1>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ status = "disabled";
+ };
+ };
+ };
+
+ usbphy: usbphy {
+ compatible = "ralink,rt3352-usbphy";
+ #phy-cells = <0>;
+
+ ralink,sysctl = <&sysc>;
+ resets = <&rstctrl 22 &rstctrl 25>;
+ reset-names = "host", "device";
+ clocks = <&clkctrl 22 &clkctrl 25>;
+ clock-names = "host", "device";
+ };
+
+ wmac: wmac@10180000 {
+ compatible = "ralink,rt3883-wmac", "ralink,rt2880-wmac";
+ reg = <0x10180000 0x40000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <6>;
+
+ ralink,eeprom = "soc_wmac.eeprom";
+ };
+
+ ehci: ehci@101c0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ehci";
+ reg = <0x101c0000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ status = "disabled";
+
+ ehci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ ohci: ohci@101c1000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ohci";
+ reg = <0x101c1000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ status = "disabled";
+
+ ohci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts b/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts
new file mode 100644
index 0000000..78c9bb4
--- /dev/null
+++ b/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts
@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rt3883_belkin_f9k110x.dtsi"
+
+/ {
+ compatible = "belkin,f9k1109v1", "ralink,rt3883-soc";
+ model = "Belkin F9K1109 Version 1.0";
+
+ aliases {
+ led-boot = &led_status_amber;
+ led-failsafe = &led_status_amber;
+ led-running = &led_status_blue;
+ led-upgrade = &led_status_amber;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status_amber: internet_amber {
+ label = "amber:internet";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_blue: internet_blue {
+ label = "blue:internet";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ usb1 {
+ label = "green:usb1";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ usb2 {
+ label = "green:usb2";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port2>, <&ehci_port2>;
+ linux,default-trigger = "usbport";
+ };
+
+ wps_amber {
+ label = "amber:wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ wps_blue {
+ label = "blue:wps";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&ehci {
+ ehci_port2: port@2 {
+ reg = <2>;
+ #trigger-source-cells = <0>;
+ };
+};
+
+&ohci {
+ ohci_port2: port@2 {
+ reg = <2>;
+ #trigger-source-cells = <0>;
+ };
+};
diff --git a/target/linux/ramips/dts/rt3883_belkin_f9k110x.dtsi b/target/linux/ramips/dts/rt3883_belkin_f9k110x.dtsi
new file mode 100644
index 0000000..0b2c760
--- /dev/null
+++ b/target/linux/ramips/dts/rt3883_belkin_f9k110x.dtsi
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ralink,rt3883-soc";
+
+ rtl8367b {
+ compatible = "realtek,rtl8367b";
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
+ };
+};
+
+&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 = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7a0000>;
+ };
+
+ partition@7f0000 {
+ label = "user-cfg";
+ reg = <0x7f0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ port@0 {
+ mediatek,fixed-link = <1000 1 1 1>;
+ phy-mode = "rgmii";
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&pci {
+ status = "okay";
+};
+
+&pci1 {
+ status = "okay";
+
+ wifi@1,0 {
+ compatible = "pci1814,3091";
+ reg = <0x10000 0 0 0 0>;
+ ralink,5ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
new file mode 100644
index 0000000..ccf9917
--- /dev/null
+++ b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
@@ -0,0 +1,182 @@
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "sitecom,wlr-6000", "ralink,rt3883-soc";
+ model = "Sitecom WLR-6000";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "red:power";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ };
+
+ ops {
+ label = "white:ops";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x8004>;
+ mtd-mac-address-increment = <1>;
+
+ port@0 {
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+
+ qca,ar8327-initvals = <
+ 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
+ 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
+ 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
+ 0x50 0xc437c437 /* LED Control Register 0 */
+ 0x54 0xc337c337 /* LED Control Register 1 */
+ 0x58 0x00000000 /* LED Control Register 2 */
+ 0x5c 0x03ffff00 /* LED Control Register 3 */
+ 0x7c 0x0000007e /* PORT0_STATUS */
+ 0x94 0x0000007e /* PORT6 STATUS */
+ >;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <8600000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x713000>;
+ };
+
+ partition@763000 {
+ label = "manufacture";
+ reg = <0x763000 0x7D000>;
+ read-only;
+ };
+
+ partition@7E0000 {
+ label = "backup";
+ reg = <0x7E0000 0x10000>;
+ read-only;
+ };
+
+ partition@7F0000 {
+ label = "storage";
+ reg = <0x7F0000 0x10000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pci {
+ status = "okay";
+};
+
+&pci1 {
+ status = "okay";
+
+ wifi@0,0 {
+ compatible = "pci1814,3091";
+ reg = <0x10000 0 0 0 0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,2ghz = <0>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
new file mode 100644
index 0000000..03e504a
--- /dev/null
+++ b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
@@ -0,0 +1,121 @@
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "trendnet,tew-691gr", "ralink,rt3883-soc";
+ model = "TRENDnet TEW-691GR";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ };
+
+ flash@1c000000 {
+ compatible = "cfi-flash";
+ reg = <0x1c000000 0x800000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x0030000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x00030000 0x00010000>;
+ label = "u-boot-env";
+ read-only;
+ };
+
+ factory: partition@40000 {
+ reg = <0x00040000 0x00010000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ reg = <0x00050000 0x007b0000>;
+ label = "firmware";
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wps: wps {
+ label = "green:wps";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+ };
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,5ghz = <0>;
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <1>;
+};
diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts
new file mode 100644
index 0000000..95a2bb7
--- /dev/null
+++ b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts
@@ -0,0 +1,147 @@
+#include "rt3883.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "trendnet,tew-692gr", "ralink,rt3883-soc";
+ model = "TRENDnet TEW-692GR";
+
+ aliases {
+ led-boot = &led_wps_green;
+ led-failsafe = &led_wps_green;
+ led-running = &led_wps_green;
+ led-upgrade = &led_wps_green;
+ };
+
+ flash@1c000000 {
+ compatible = "cfi-flash";
+ reg = <0x1c000000 0x800000>;
+ bank-width = <2>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x0030000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x00030000 0x00010000>;
+ label = "u-boot-env";
+ read-only;
+ };
+
+ factory: partition@40000 {
+ reg = <0x00040000 0x00010000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ reg = <0x00050000 0x007b0000>;
+ label = "firmware";
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "orange:wps";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wps_green: wps2 {
+ label = "green:wps";
+ gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "spi", "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ status = "okay";
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii";
+ };
+
+ mdio-bus {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "rgmii";
+
+ qca,ar8327-initvals = <
+ 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
+ 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
+ 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
+ 0x50 0xc437c437 /* LED Control Register 0 */
+ 0x54 0xc337c337 /* LED Control Register 1 */
+ 0x58 0x00000000 /* LED Control Register 2 */
+ 0x5c 0x03ffff00 /* LED Control Register 3 */
+ 0x7c 0x0000007e /* PORT0_STATUS */
+ 0x94 0x0000007e /* PORT6 STATUS */
+ >;
+ };
+ };
+};
+
+&pci {
+ status = "okay";
+};
+
+&pci1 {
+ status = "okay";
+
+ wifi@0,0 {
+ compatible = "pci0,0";
+ reg = < 0x10000 0 0 0 0 >;
+ ralink,2ghz = <0>;
+ };
+};
+
+&wmac {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,5ghz = <0>;
+ mtd-mac-address = <&factory 0x4>;
+ mtd-mac-address-increment = <3>;
+};
diff --git a/target/linux/ramips/dts/rt5350.dtsi b/target/linux/ramips/dts/rt5350.dtsi
new file mode 100644
index 0000000..da282b5
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350.dtsi
@@ -0,0 +1,411 @@
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ralink,rt5350-soc";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "mips,mips24KEc";
+ reg = <0>;
+ };
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ cpuintc: cpuintc {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ compatible = "mti,cpu-interrupt-controller";
+ };
+
+ aliases {
+ spi0 = &spi0;
+ spi1 = &spi1;
+ serial0 = &uartlite;
+ };
+
+ palmbus: palmbus@10000000 {
+ compatible = "palmbus";
+ reg = <0x10000000 0x200000>;
+ ranges = <0x0 0x10000000 0x1FFFFF>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sysc: sysc@0 {
+ compatible = "ralink,rt5350-sysc", "ralink,rt3050-sysc", "syscon";
+ reg = <0x0 0x100>;
+ };
+
+ timer: timer@100 {
+ compatible = "ralink,rt5350-timer", "ralink,rt2880-timer";
+ reg = <0x100 0x20>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ watchdog: watchdog@120 {
+ compatible = "ralink,rt5350-wdt", "ralink,rt2880-wdt";
+ reg = <0x120 0x10>;
+
+ resets = <&rstctrl 8>;
+ reset-names = "wdt";
+
+ interrupt-parent = <&intc>;
+ interrupts = <1>;
+ };
+
+ intc: intc@200 {
+ compatible = "ralink,rt5350-intc", "ralink,rt2880-intc";
+ reg = <0x200 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "intc";
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <2>;
+ };
+
+ memc: memc@300 {
+ compatible = "ralink,rt5350-memc", "ralink,rt3050-memc";
+ reg = <0x300 0x100>;
+
+ resets = <&rstctrl 20>;
+ reset-names = "mc";
+
+ interrupt-parent = <&intc>;
+ interrupts = <3>;
+ };
+
+ uart: uart@500 {
+ compatible = "ralink,rt5350-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0x500 0x100>;
+
+ resets = <&rstctrl 12>;
+ reset-names = "uart";
+
+ interrupt-parent = <&intc>;
+ interrupts = <5>;
+
+ reg-shift = <2>;
+
+ status = "disabled";
+ };
+
+ gpio0: gpio@600 {
+ compatible = "ralink,rt5350-gpio", "ralink,rt2880-gpio";
+ reg = <0x600 0x34>;
+
+ resets = <&rstctrl 13>;
+ reset-names = "pio";
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <0>;
+ ralink,num-gpios = <22>;
+ ralink,register-map = [ 00 04 08 0c
+ 20 24 28 2c
+ 30 34 ];
+ };
+
+ gpio1: gpio@660 {
+ compatible = "ralink,rt5350-gpio", "ralink,rt2880-gpio";
+ reg = <0x660 0x24>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ ralink,gpio-base = <22>;
+ ralink,num-gpios = <6>;
+ ralink,register-map = [ 00 04 08 0c
+ 10 14 18 1c
+ 20 24 ];
+
+ status = "disabled";
+ };
+
+ i2c: i2c@900 {
+ compatible = "ralink,rt2880-i2c";
+ reg = <0x900 0x100>;
+
+ resets = <&rstctrl 16>;
+ reset-names = "i2c";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+
+ status = "disabled";
+ };
+
+ i2s: i2s@a00 {
+ compatible = "ralink,rt3352-i2s";
+ reg = <0xa00 0x100>;
+
+ resets = <&rstctrl 17>;
+ reset-names = "i2s";
+
+ interrupt-parent = <&intc>;
+ interrupts = <10>;
+
+ txdma-req = <2>;
+ rxdma-req = <3>;
+
+ dmas = <&gdma 4>,
+ <&gdma 6>;
+ dma-names = "tx", "rx";
+
+ status = "disabled";
+ };
+
+ spi0: spi@b00 {
+ compatible = "ralink,rt5350-spi", "ralink,rt2880-spi";
+ reg = <0xb00 0x40>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_pins>;
+
+ status = "disabled";
+ };
+
+ spi1: spi@b40 {
+ compatible = "ralink,rt5350-spi", "ralink,rt2880-spi";
+ reg = <0xb40 0x60>;
+
+ resets = <&rstctrl 18>;
+ reset-names = "spi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_cs1>;
+
+ status = "disabled";
+ };
+
+ uartlite: uartlite@c00 {
+ compatible = "ralink,rt5350-uart", "ralink,rt2880-uart", "ns16550a";
+ reg = <0xc00 0x100>;
+
+ resets = <&rstctrl 19>;
+ reset-names = "uartl";
+
+ interrupt-parent = <&intc>;
+ interrupts = <12>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uartlite_pins>;
+
+ reg-shift = <2>;
+ };
+
+ systick: systick@d00 {
+ compatible = "ralink,rt5350-systick", "ralink,cevt-systick";
+ reg = <0xd00 0x10>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <7>;
+ };
+
+ pcm: pcm@2000 {
+ compatible = "ralink,rt5350-pcm";
+ reg = <0x2000 0x800>;
+
+ resets = <&rstctrl 11>;
+ reset-names = "pcm";
+
+ interrupt-parent = <&intc>;
+ interrupts = <4>;
+
+ status = "disabled";
+ };
+
+ gdma: gdma@2800 {
+ compatible = "ralink,rt3883-gdma";
+ reg = <0x2800 0x800>;
+
+ resets = <&rstctrl 14>;
+ reset-names = "dma";
+
+ interrupt-parent = <&intc>;
+ interrupts = <7>;
+
+ #dma-cells = <1>;
+ #dma-channels = <16>;
+ #dma-requests = <16>;
+
+ status = "disabled";
+ };
+ };
+
+ pinctrl: pinctrl {
+ compatible = "ralink,rt2880-pinmux";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinctrl0 {
+ };
+
+ i2c_pins: i2c_pins {
+ i2c_pins {
+ groups = "i2c";
+ function = "i2c";
+ };
+ };
+
+ spi_pins: spi_pins {
+ spi_pins {
+ groups = "spi";
+ function = "spi";
+ };
+ };
+
+ phy_led_pins: phy_led {
+ phy_led {
+ groups = "led";
+ function = "led";
+ };
+ };
+
+ uartlite_pins: uartlite {
+ uart {
+ groups = "uartlite";
+ function = "uartlite";
+ };
+ };
+
+ uartf_pins: uartf {
+ uartf {
+ groups = "uartf";
+ function = "uartf";
+ };
+ };
+
+ spi_cs1: spi1 {
+ spi1 {
+ groups = "spi_cs1";
+ function = "spi_cs1";
+ };
+ };
+ };
+
+ rstctrl: rstctrl {
+ compatible = "ralink,rt5350-reset", "ralink,rt2880-reset";
+ #reset-cells = <1>;
+ };
+
+ clkctrl: clkctrl {
+ compatible = "ralink,rt2880-clock";
+ #clock-cells = <1>;
+ };
+
+ usbphy: usbphy {
+ compatible = "ralink,rt3352-usbphy";
+ #phy-cells = <0>;
+
+ ralink,sysctl = <&sysc>;
+ resets = <&rstctrl 22 &rstctrl 25>;
+ reset-names = "host", "device";
+ clocks = <&clkctrl 18>;
+ clock-names = "host";
+ };
+
+ ethernet: ethernet@10100000 {
+ compatible = "ralink,rt5350-eth";
+ reg = <0x10100000 0x10000>;
+
+ resets = <&rstctrl 21 &rstctrl 23>;
+ reset-names = "fe", "esw";
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <5>;
+
+ mediatek,switch = <&esw>;
+ };
+
+ esw: esw@10110000 {
+ compatible = "ralink,rt5350-esw", "ralink,rt3050-esw";
+ reg = <0x10110000 0x8000>;
+
+ resets = <&rstctrl 23>;
+ reset-names = "esw";
+
+ interrupt-parent = <&intc>;
+ interrupts = <17>;
+ };
+
+ wmac: wmac@10180000 {
+ compatible = "ralink,rt5350-wmac", "ralink,rt2880-wmac";
+ reg = <0x10180000 0x40000>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <6>;
+
+ ralink,eeprom = "soc_wmac.eeprom";
+ };
+
+ ehci: ehci@101c0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ehci";
+ reg = <0x101c0000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ ehci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+
+ ohci: ohci@101c1000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "generic-ohci";
+ reg = <0x101c1000 0x1000>;
+
+ phys = <&usbphy>;
+ phy-names = "usb";
+
+ interrupt-parent = <&intc>;
+ interrupts = <18>;
+
+ ohci_port1: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_7links_px-4885-4m.dts b/target/linux/ramips/dts/rt5350_7links_px-4885-4m.dts
new file mode 100644
index 0000000..383bde7
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_7links_px-4885-4m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_7links_px-4885.dtsi"
+
+/ {
+ compatible = "7links,px-4885-4m", "7links,px-4885", "ralink,rt5350-soc";
+ model = "7Links PX-4885 (4M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "devdata";
+ reg = <0x20000 0x20000>;
+ read-only;
+ };
+
+ devconf: partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_7links_px-4885-8m.dts b/target/linux/ramips/dts/rt5350_7links_px-4885-8m.dts
new file mode 100644
index 0000000..25c635a
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_7links_px-4885-8m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_7links_px-4885.dtsi"
+
+/ {
+ compatible = "7links,px-4885-8m", "7links,px-4885", "ralink,rt5350-soc";
+ model = "7Links PX-4885 (8M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition@20000 {
+ label = "devdata";
+ reg = <0x20000 0x20000>;
+ read-only;
+ };
+
+ devconf: partition@40000 {
+ label = "devconf";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_7links_px-4885.dtsi b/target/linux/ramips/dts/rt5350_7links_px-4885.dtsi
new file mode 100644
index 0000000..a15d140
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_7links_px-4885.dtsi
@@ -0,0 +1,61 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "7links,px-4885", "ralink,rt5350-soc";
+
+ aliases {
+ led-boot = &led_wifi;
+ led-failsafe = &led_wifi;
+ led-running = &led_wifi;
+ led-upgrade = &led_wifi;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wifi: wifi {
+ label = "orange:wifi";
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ };
+
+ storage {
+ label = "blue:storage";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&devconf 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&devconf 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts
new file mode 100644
index 0000000..0a62c75
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts
@@ -0,0 +1,95 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "airlive,air3gii", "ralink,rt5350-soc";
+ model = "AirLive Air3GII";
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan {
+ label = "green:wlan";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ mobile {
+ label = "green:mobile";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_allnet_all5003.dts b/target/linux/ramips/dts/rt5350_allnet_all5003.dts
new file mode 100644
index 0000000..96dde0f
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_allnet_all5003.dts
@@ -0,0 +1,103 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "allnet,all5003", "ralink,rt5350-soc";
+ model = "Allnet ALL5003";
+
+ i2c-gpio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compatible = "i2c-gpio";
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH &gpio0 2 GPIO_ACTIVE_HIGH>;
+ i2c-gpio,delay-us = <10>;
+
+ pcf0: iexp@38 {
+ #gpio-cells = <2>;
+ compatible = "inxp,pcf8574a";
+ reg = <0x38>;
+ gpio-controller;
+ };
+
+ hwmon@4b {
+ compatible = "national,lm92";
+ reg = <0x4b>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ ld1 {
+ label = "green:ld1";
+ gpios = <&pcf0 0 GPIO_ACTIVE_LOW>;
+ };
+
+ ld2 {
+ label = "green:ld2";
+ gpios = <&pcf0 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x1fb0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x3f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_asiarf_awm002-evb-4m.dts b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb-4m.dts
new file mode 100644
index 0000000..56f1ced
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb-4m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_asiarf_awm002-evb.dtsi"
+
+/ {
+ compatible = "asiarf,awm002-evb-4m", "ralink,rt5350-soc";
+ model = "AsiaRF AWM002 EVB (4M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ reg = <0>;
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_asiarf_awm002-evb-8m.dts b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb-8m.dts
new file mode 100644
index 0000000..43b599a
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb-8m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_asiarf_awm002-evb.dtsi"
+
+/ {
+ compatible = "asiarf,awm002-evb-8m", "ralink,rt5350-soc";
+ model = "AsiaRF AWM002 EVB (8M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ reg = <0>;
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi
new file mode 100644
index 0000000..80965a4
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi
@@ -0,0 +1,63 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asiarf,awm002-evb", "ralink,rt5350-soc";
+
+ leds {
+ compatible = "gpio-leds";
+
+ tx {
+ label = "green:tx";
+ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+ };
+
+ rx {
+ label = "green:rx";
+ gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset_wps {
+ label = "reset_wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3f>;
+};
diff --git a/target/linux/ramips/dts/rt5350_belkin_f7c027.dts b/target/linux/ramips/dts/rt5350_belkin_f7c027.dts
new file mode 100644
index 0000000..e3691b7
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_belkin_f7c027.dts
@@ -0,0 +1,139 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "belkin,f7c027", "ralink,rt5350-soc";
+ model = "Belkin F7C027";
+
+ aliases {
+ led-boot = &led_status_orange;
+ led-failsafe = &led_status_orange;
+ led-running = &led_status_orange;
+ led-upgrade = &led_status_orange;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ status {
+ label = "blue:status";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ power {
+ label = "blue:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status_orange: orange {
+ label = "orange:status";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ relay {
+ label = "device:relay";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ top {
+ label = "restore";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ power {
+ label = "power";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+
+ sensor {
+ label = "sensor";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x770000>;
+ };
+
+ partition@7c0000 {
+ label = "firmware2";
+ reg = <0x7c0000 0x770000>;
+ };
+
+ partition@f30000 {
+ label = "belkin_settings";
+ reg = <0xf30000 0xa0000>;
+ };
+
+ partition@fd0000 {
+ label = "unknown";
+ reg = <0xfd0000 0x10000>;
+ };
+
+ partition@fe0000 {
+ label = "nvram";
+ reg = <0xfe0000 0x10000>;
+ };
+
+ partition@ff0000 {
+ label = "user_factory";
+ reg = <0xff0000 0x10000>;
+ };
+ };
+ };
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts
new file mode 100644
index 0000000..58a8407
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts
@@ -0,0 +1,106 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dcs-930l-b1", "ralink,rt5350-soc";
+ model = "D-Link DCS-930L B1";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "red:power";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf", "led";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts
new file mode 100644
index 0000000..bcc02f3
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts
@@ -0,0 +1,109 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-300-b7", "ralink,rt5350-soc";
+ model = "D-Link DIR-300 B7";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "blue:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <0x17>;
+};
+
+&wmac {
+ status = "okay";
+ ralink,led-polarity = <1>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts
new file mode 100644
index 0000000..7d9bb0e
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts
@@ -0,0 +1,129 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-320-b1", "ralink,rt5350-soc";
+ model = "D-Link DIR-320 B1";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "green:usb";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ root_hub {
+ gpio-export,name = "root_hub";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <0x17>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts
new file mode 100644
index 0000000..5bd8719
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts
@@ -0,0 +1,110 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dir-610-a1", "ralink,rt5350-soc";
+ model = "D-Link DIR-610 A1";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ devdata: partition@30000 {
+ label = "devdata";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "seama";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&devdata 0x4004>;
+};
+
+&esw {
+ status = "okay";
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <0x17>;
+};
+
+&wmac {
+ status = "okay";
+ ralink,led-polarity = <1>;
+ ralink,mtd-eeprom = <&devdata 0x4000>;
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts
new file mode 100644
index 0000000..48fb1d4
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts
@@ -0,0 +1,145 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "dlink,dwr-512-b", "ralink,rt5350-soc";
+ model = "D-Link DWR-512 B";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ sms {
+ label = "green:sms";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+ led_status: status {
+ label = "green:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ 2g {
+ label = "green:2g";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+ 3g {
+ label = "green:3g";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ };
+ sstrengthr {
+ label = "red:sigstrength";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+ sstrengthg {
+ label = "green:sigstrength";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ slic_int {
+ gpio-export,name = "slic_int";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ };
+ modem3g_enable {
+ gpio-export,name = "modem3g_enable";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <30000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "jboot";
+ reg = <0x0 0x10000>;
+ read-only;
+ };
+
+ partition@10000 {
+ compatible = "amit,jimage";
+ label = "firmware";
+ reg = <0x10000 0x7e0000>;
+ };
+
+ config: partition@7f0000 {
+ label = "config";
+ reg = <0x7f0000 0x10000>;
+ };
+ };
+ };
+};
+
+&spi1 {
+ status = "okay";
+
+ spidev@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "siliconlabs,si3210";
+
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+ðernet {
+ mtd-mac-address = <&config 0xe07e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&config 0xe08a>;
+ ralink,led-polarity = <1>;
+ mtd-mac-address = <&config 0xe07e>;
+};
diff --git a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts
new file mode 100644
index 0000000..3b1fdd4
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts
@@ -0,0 +1,65 @@
+#include "rt5350.dtsi"
+
+/ {
+ compatible = "easyacc,wizard-8800", "ralink,rt5350-soc";
+ model = "EASYACC WI-STOR WIZARD 8800";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts
new file mode 100644
index 0000000..1386ec9
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts
@@ -0,0 +1,117 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hame,mpr-a1", "ralink,rt5350-soc";
+ model = "HAME MPR-A1";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ power {
+ label = "red:power";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ root_hub {
+ gpio-export,name = "root_hub";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf", "led";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts
new file mode 100644
index 0000000..f9365d5
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts
@@ -0,0 +1,118 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hame,mpr-a2", "ralink,rt5350-soc";
+ model = "HAME MPR-A2";
+
+ aliases {
+ led-boot = &led_system;
+ led-failsafe = &led_system;
+ led-running = &led_system;
+ led-upgrade = &led_system;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_system: system {
+ label = "blue:system";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ power {
+ label = "red:power";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ root_hub {
+ gpio-export,name = "root_hub";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x1>;
+ mediatek,portdisable = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts b/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts
new file mode 100644
index 0000000..83b1fb2
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts
@@ -0,0 +1,111 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hilink,hlk-rm04", "ralink,rt5350-soc";
+ model = "HILINK HLK-RM04";
+
+ chosen {
+ bootargs = "console=ttyS1,57600";
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ /* I2C */
+ gpio1 {
+ /* I2C_I2C_SD */
+ gpio-export,name = "hlk-rm04:gpio0";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ };
+ gpio2 {
+ /* I2C_I2C_SCLK */
+ gpio-export,name = "hlk-rm04:gpio1";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ wps {
+ label = "wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&uart {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag";
+ function = "gpio";
+ };
+
+ uartf_gpio {
+ groups = "uartf";
+ function = "gpio uartf";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts
new file mode 100644
index 0000000..543fda7
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts
@@ -0,0 +1,108 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "hootoo,ht-tm02", "ralink,rt5350-soc";
+ model = "HooToo HT-TM02";
+
+ aliases {
+ led-boot = &led_wlan;
+ led-failsafe = &led_wlan;
+ led-running = &led_wlan;
+ led-upgrade = &led_wlan;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wlan: wlan {
+ label = "blue:wlan";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ modeswitch {
+ label = "modeswitch";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x10>;
+ mediatek,portdisable = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts
new file mode 100644
index 0000000..8ab2a87
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts
@@ -0,0 +1,110 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "intenso,memory2move", "ralink,rt5350-soc";
+ model = "Intenso Memory 2 Move";
+
+ aliases {
+ led-boot = &led_wifi;
+ led-failsafe = &led_wifi;
+ led-running = &led_wifi;
+ led-upgrade = &led_wifi;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600n8 root=/dev/mtdblock5";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wifi: wifi {
+ label = "blue:wifi";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ power {
+ label = "power";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_POWER>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "Config";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_nexx_wt1520-4m.dts b/target/linux/ramips/dts/rt5350_nexx_wt1520-4m.dts
new file mode 100644
index 0000000..0b1b57c
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_nexx_wt1520-4m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_nexx_wt1520.dtsi"
+
+/ {
+ compatible = "nexx,wt1520-4m", "nexx,wt1520", "ralink,rt5350-soc";
+ model = "Nexx WT1520 (4M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_nexx_wt1520-8m.dts b/target/linux/ramips/dts/rt5350_nexx_wt1520-8m.dts
new file mode 100644
index 0000000..c28dae3
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_nexx_wt1520-8m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_nexx_wt1520.dtsi"
+
+/ {
+ compatible = "nexx,wt1520-8m", "nexx,wt1520", "ralink,rt5350-soc";
+ model = "Nexx WT1520 (8M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_nexx_wt1520.dtsi b/target/linux/ramips/dts/rt5350_nexx_wt1520.dtsi
new file mode 100644
index 0000000..540fd25
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_nexx_wt1520.dtsi
@@ -0,0 +1,34 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "nexx,wt1520", "ralink,rt5350-soc";
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_nixcore_x1-16m.dts b/target/linux/ramips/dts/rt5350_nixcore_x1-16m.dts
new file mode 100644
index 0000000..19b7f39
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_nixcore_x1-16m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_nixcore_x1.dtsi"
+
+/ {
+ compatible = "nixcore,x1-16m", "nixcore,x1", "ralink,rt5350-soc";
+ model = "NixcoreX1 (16M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_nixcore_x1-8m.dts b/target/linux/ramips/dts/rt5350_nixcore_x1-8m.dts
new file mode 100644
index 0000000..888c67d
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_nixcore_x1-8m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_nixcore_x1.dtsi"
+
+/ {
+ compatible = "nixcore,x1-8m", "nixcore,x1", "ralink,rt5350-soc";
+ model = "NixcoreX1 (8M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_nixcore_x1.dtsi b/target/linux/ramips/dts/rt5350_nixcore_x1.dtsi
new file mode 100644
index 0000000..2459c6b
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_nixcore_x1.dtsi
@@ -0,0 +1,141 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "nixcore,x1", "ralink,rt5350-soc";
+
+ chosen {
+ bootargs = "console=ttyS1,57600";
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ gpio0 {
+ gpio-export,name = "gpio0";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio1 {
+ gpio-export,name = "gpio1";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* GPIOs 1-6 are I2C,SPI */
+ /* GPIO 7-14 are uart1 */
+ /* GPIOs 15 & 16 are uart2 */
+ /* JTAG */
+
+ gpio17 {
+ /* JTAG_TDO */
+ gpio-export,name = "gpio17";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio18 {
+ /* JTAG_TDI */
+ gpio-export,name = "gpio18";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio19 {
+ /* JTAG_TMS */
+ gpio-export,name = "gpio19";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio20 {
+ /* JTAG_TCLK */
+ gpio-export,name = "gpio20";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio21 {
+ /* JTAG_TRST_N */
+ gpio-export,name = "gpio21";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* ETH LEDs */
+ /*
+ gpio22 {
+ gpio-export,name = "gpio22";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio23 {
+ gpio-export,name = "gpio23";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio24 {
+ gpio-export,name = "gpio24";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio25 {
+ gpio-export,name = "gpio25";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ */
+ gpio26 {
+ /* ETH4_LED */
+ gpio-export,name = "gpio26";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio27 {
+ /* spi_cs1 */
+ gpio-export,name = "gpio27";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+&uart {
+ status = "okay";
+ reset-names = "gpio uartf";
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "led", "spi_cs1";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x17>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino-evb.dts b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino-evb.dts
new file mode 100644
index 0000000..88f4b0e
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino-evb.dts
@@ -0,0 +1,30 @@
+#include "rt5350_olimex_rt5350f-olinuxino.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "olimex,rt5350f-olinuxino-evb", "ralink,rt5350-soc";
+ model = "Olimex RT5350F-OLinuXino-EVB";
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ relay1 {
+ gpio-export,name = "relay1";
+ gpio-export,output = <0>;
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ relay2 {
+ gpio-export,name = "relay2";
+ gpio-export,output = <0>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ button {
+ gpio-export,name = "button";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dts b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dts
new file mode 100644
index 0000000..a2b4c8c
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dts
@@ -0,0 +1,6 @@
+#include "rt5350_olimex_rt5350f-olinuxino.dtsi"
+
+/ {
+ compatible = "olimex,rt5350f-olinuxino", "ralink,rt5350-soc";
+ model = "Olimex RT5350F-OLinuXino";
+};
diff --git a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi
new file mode 100644
index 0000000..7d85109
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi
@@ -0,0 +1,83 @@
+#include "rt5350.dtsi"
+
+/ {
+ compatible = "olimex,rt5350f-olinuxino", "ralink,rt5350-soc";
+
+ aliases {
+ serial0 = &uartlite;
+ serial1 = &uart;
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag";
+ function = "gpio";
+ };
+ uartf_gpio {
+ groups = "uartf";
+ function = "gpio uartf";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <0x17>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,led-polarity = <1>;
+};
+
+&i2c {
+ status = "okay";
+};
+
+&uart {
+ status = "okay";
+};
diff --git a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts
new file mode 100644
index 0000000..499b555
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts
@@ -0,0 +1,113 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "omnima,miniembplug", "ralink,rt5350-soc";
+ model = "Omnima MiniEMBPlug";
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan {
+ label = "red:wlan";
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ mobile {
+ label = "green:mobile";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ mode-one {
+ label = "mode1";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ mode-two {
+ label = "mode2";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts
new file mode 100644
index 0000000..d3d1ebe
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts
@@ -0,0 +1,104 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "planex,mzk-dp150n", "ralink,rt5350-soc";
+ model = "Planex MZK-DP150N";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&spi1 {
+ spidev@0 {
+ compatible = "linux,spidev";
+ spi-max-frequency = <10000000>;
+ reg = <0>;
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uartf", "led";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x17>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,led-polarity = <1>;
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_m3.dts b/target/linux/ramips/dts/rt5350_poray_m3.dts
new file mode 100644
index 0000000..b6bad0a
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_poray_m3.dts
@@ -0,0 +1,104 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "poray,m3", "ralink,rt5350-soc";
+ model = "Poray M3";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "blue:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <1>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,led-polarity = <1>;
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_m4-4m.dts b/target/linux/ramips/dts/rt5350_poray_m4-4m.dts
new file mode 100644
index 0000000..f6f6a5a
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_poray_m4-4m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_poray_m4.dtsi"
+
+/ {
+ compatible = "poray,m4-4m", "poray,m4", "ralink,rt5350-soc";
+ model = "Poray M4 (4M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_m4-8m.dts b/target/linux/ramips/dts/rt5350_poray_m4-8m.dts
new file mode 100644
index 0000000..2cf5891
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_poray_m4-8m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_poray_m4.dtsi"
+
+/ {
+ compatible = "poray,m4-8m", "poray,m4", "ralink,rt5350-soc";
+ model = "Poray M4 (8M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_m4.dtsi b/target/linux/ramips/dts/rt5350_poray_m4.dtsi
new file mode 100644
index 0000000..9b36961
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_poray_m4.dtsi
@@ -0,0 +1,56 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "poray,m4", "ralink,rt5350-soc";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ label = "blue:status";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <1>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,led-polarity = <1>;
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_x5.dts b/target/linux/ramips/dts/rt5350_poray_x5.dts
new file mode 100644
index 0000000..9c00da8
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_poray_x5.dts
@@ -0,0 +1,136 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "poray,x5", "ralink,rt5350-soc";
+ model = "Poray X5";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ 20 {
+ label = "green:20";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ 50 {
+ label = "green:50";
+ gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+ };
+
+ 80 {
+ label = "green:80";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ bat {
+ label = "bat";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ mode {
+ label = "mode";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ linux,input-type = <EV_SW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb-mode {
+ gpio-export,name = "usb-mode";
+ gpio-export,output = <0>;
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <1>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,led-polarity = <1>;
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_x8.dts b/target/linux/ramips/dts/rt5350_poray_x8.dts
new file mode 100644
index 0000000..b60bb99
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_poray_x8.dts
@@ -0,0 +1,97 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "poray,x8", "ralink,rt5350-soc";
+ model = "Poray X8";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <1>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,led-polarity = <1>;
+};
diff --git a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts
new file mode 100644
index 0000000..35ccee1
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts
@@ -0,0 +1,114 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tenda,3g150b", "ralink,rt5350-soc";
+ model = "Tenda 3G150B";
+
+ aliases {
+ led-boot = &led_ap;
+ led-failsafe = &led_ap;
+ led-running = &led_ap;
+ led-upgrade = &led_ap;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_ap: ap {
+ label = "blue:ap";
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+
+ 3g {
+ label = "blue:3g";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf", "led";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+ ralink,led-polarity = <1>;
+};
diff --git a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts
new file mode 100644
index 0000000..13d1a16
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts
@@ -0,0 +1,117 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "trendnet,tew-714tru", "ralink,rt5350-soc";
+ model = "TRENDnet TEW714TRU";
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "red:usb";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
+ linux,default-trigger = "usbport";
+ };
+
+ wifi {
+ label = "green:wifi";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ repeater {
+ gpio-export,name = "repeater_switch";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ wisp {
+ gpio-export,name = "wisp_switch";
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x1>;
+ mediatek,portdisable = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts
new file mode 100644
index 0000000..089b856
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts
@@ -0,0 +1,119 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "unbranded,a5-v11", "ralink,rt5350-soc";
+ model = "A5-V11";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = ðernet;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ system {
+ label = "blue:system";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "red:power";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ root_hub {
+ gpio-export,name = "root_hub";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf", "led";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x1>;
+ mediatek,portdisable = <0x3e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_vocore_vocore-16m.dts b/target/linux/ramips/dts/rt5350_vocore_vocore-16m.dts
new file mode 100644
index 0000000..e28563c
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_vocore_vocore-16m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_vocore_vocore.dtsi"
+
+/ {
+ compatible = "vocore,vocore-16m", "vocore,vocore", "ralink,rt5350-soc";
+ model = "VoCore (16M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_vocore_vocore-8m.dts b/target/linux/ramips/dts/rt5350_vocore_vocore-8m.dts
new file mode 100644
index 0000000..4fa291a
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_vocore_vocore-8m.dts
@@ -0,0 +1,46 @@
+#include "rt5350_vocore_vocore.dtsi"
+
+/ {
+ compatible = "vocore,vocore-8m", "vocore,vocore", "ralink,rt5350-soc";
+ model = "VoCore (8M)";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi b/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi
new file mode 100644
index 0000000..0c82919
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi
@@ -0,0 +1,195 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "vocore,vocore", "ralink,rt5350-soc";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ label-mac-device = ðernet;
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ gpio0 {
+ gpio-export,name = "gpio0";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* UARTF */
+ gpio7 {
+ /* UARTF_RTS_N */
+ gpio-export,name = "gpio7";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio8 {
+ /* UARTF_TXD */
+ gpio-export,name = "gpio8";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio9 {
+ /* UARTF_CTS_N */
+ gpio-export,name = "gpio9";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio12 {
+ /* UARTF_DCD_N */
+ gpio-export,name = "gpio12";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio13 {
+ /* UARTF_DSR_N */
+ gpio-export,name = "gpio13";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio14 {
+ /* UARTF_RIN */
+ gpio-export,name = "gpio14";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* JTAG */
+ gpio17 {
+ /* JTAG_TDO */
+ gpio-export,name = "gpio17";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio18 {
+ /* JTAG_TDI */
+ gpio-export,name = "gpio18";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio19 {
+ /* JTAG_TMS */
+ gpio-export,name = "gpio19";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio20 {
+ /* JTAG_TCLK */
+ gpio-export,name = "gpio20";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio21 {
+ /* JTAG_TRST_N */
+ gpio-export,name = "gpio21";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* ETH LEDs */
+ gpio22 {
+ /* ETH0_LED */
+ gpio-export,name = "gpio22";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio23 {
+ /* ETH1_LED */
+ gpio-export,name = "gpio23";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio24 {
+ /* ETH2_LED */
+ gpio-export,name = "gpio24";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio25 {
+ /* ETH3_LED */
+ gpio-export,name = "gpio25";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio26 {
+ /* ETH4_LED */
+ gpio-export,name = "gpio26";
+ gpio-export,direction_may_change = <1>;
+ gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_status: status {
+ /* UARTF_RXD */
+ label = "green:status";
+ gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+ };
+
+ eth {
+ /* UARTF_DTR_N */
+ label = "orange:eth";
+ gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&i2c {
+ status = "okay";
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uartf", "led";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x11>;
+ mediatek,portdisable = <0x2e>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&spi1 {
+ status = "okay";
+
+ spidev@0 {
+ compatible = "linux,spidev";
+ spi-max-frequency = <10000000>;
+ reg = <0>;
+ };
+};
diff --git a/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts b/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts
new file mode 100644
index 0000000..adb4034
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts
@@ -0,0 +1,65 @@
+#include "rt5350.dtsi"
+
+/ {
+ compatible = "wansview,ncs601w", "ralink,rt5350-soc";
+ model = "Wansview NCS601W";
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts
new file mode 100644
index 0000000..2cb6101
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts
@@ -0,0 +1,142 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "wiznet,wizfi630a", "ralink,rt5350-soc";
+ model = "WIZnet WizFi630A";
+
+ aliases {
+ led-boot = &led_run;
+ led-failsafe = &led_run;
+ led-running = &led_run;
+ led-upgrade = &led_run;
+ };
+
+ chosen {
+ bootargs = "console=ttyS1,115200";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_run: run {
+ label = ":run";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = ":wps";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ uart1 {
+ label = ":uart1";
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ };
+
+ uart2 {
+ label = ":uart2";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ scm1 {
+ label = "SCM1";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_0>;
+ };
+
+ scm2 {
+ label = "SCM2";
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ linux,code = <BTN_1>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ #size-cells = <1>;
+ label = "uboot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ #size-cells = <1>;
+ label = "uboot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ #size-cells = <1>;
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ #size-cells = <1>;
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&uart {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&uartf_pins>;
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag" ;
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portmap = <0x17>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts
new file mode 100644
index 0000000..0879c11
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts
@@ -0,0 +1,100 @@
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zorlik,zl5900v2", "ralink,rt5350-soc";
+ model = "Zorlik ZL5900V2";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+ mediatek,portdisable = <0x2f>;
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts
new file mode 100644
index 0000000..bc16e2c
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts
@@ -0,0 +1,109 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,keenetic-lite-b", "ralink,rt5350-soc";
+ model = "ZyXEL Keenetic Lite Rev.B";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "green:wps";
+ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <60000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <0x17>;
+};
+
+&wmac {
+ ralink,led-polarity = <1>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+};
diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts
new file mode 100644
index 0000000..eb7d7ed
--- /dev/null
+++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts
@@ -0,0 +1,112 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rt5350.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "zyxel,keenetic-start", "ralink,rt5350-soc";
+ model = "ZyXEL Keenetic Start";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ label-mac-device = ðernet;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+ };
+
+ internet {
+ label = "green:internet";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ wps {
+ label = "wps";
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "i2c", "jtag", "uartf";
+ function = "gpio";
+ };
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,led_polarity = <0x17>;
+};
+
+&wmac {
+ status = "okay";
+ ralink,led-polarity = <1>;
+ ralink,mtd-eeprom = <&factory 0x0>;
+};