b/target/linux/ramips/dts/mt7621_tozed_s12-unisoc-plus.dts
new file mode 100644
@@ -0,0 +1,278 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+// Copyright (C) 2022, Ian Pangilinan <braveheart_leo@yahoo.com>
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "tozed,s12-unisoc-plus", "mediatek,mt7621-soc";
+ model = "Tozed S12 Plus (UNISOC)";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ led-boot = &led_power0;
+ led-failsafe = &led_power0;
+ led-running = &led_power1;
+ led-upgrade = &led_power0;
+ label-mac-device = &gmac0;
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ /* external LTE antenna 1 */
+ ext_ant0 {
+ gpio-export,name = "ext_ant0";
+ gpio-export,input = <0>;
+ gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ /* external LTE antenna 2 */
+ ext_ant1 {
+ gpio-export,name = "ext_ant1";
+ gpio-export,input = <0>;
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ reset_cp {
+ gpio-export,name = "reset_cp";
+ gpio-export,output = <1>;
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power0: led-0 {
+ label = "yellow:power";
+ gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power1: led-1 {
+ label = "blue:power";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ led-2 {
+ label = "blue:wifi";
+ gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ led-3 {
+ label = "red:data";
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ };
+
+ led-4 {
+ label = "blue:data";
+ gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
+ };
+
+ led-5 {
+ label = "blue:signal1";
+ gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+ };
+
+ led-6 {
+ label = "blue:signal2";
+ gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+ };
+
+ led-7 {
+ label = "blue:signal3";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ };
+
+ led-8 {
+ label = "blue:signal4";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+
+ led-9 {
+ label = "blue:signal5";
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ };
+
+ led-10 {
+ label = "blue:tel";
+ gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ key-reset {
+ label = "reset";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+
+ key-wps {
+ label = "wps";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WPS_BUTTON>;
+ };
+
+ key-wifi {
+ label = "wifi";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RFKILL>;
+ };
+ };
+};
+
+&state_default {
+ gpio {
+ groups = "jtag", "rgmii2", "uart3", "wdt";
+ function = "gpio";
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ wifi@0,0 {
+ compatible = "pci14c3,7662";
+ reg = <0x0 0 0 0 0>;
+
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+
+ nvmem-cells = <&macaddr_factory_8004>;
+ nvmem-cell-names = "mac-address";
+ };
+};
+
+&pcie1 {
+ wifi@0,0 {
+ compatible = "pci14c3,7603";
+ reg = <0x0 0 0 0 0>;
+
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
+ };
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "wan";
+
+ nvmem-cells = <&macaddr_factory_e006>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@4 {
+ status = "okay";
+ label = "lan1";
+ };
+ };
+};
+
+&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;
+ };
+
+ partition30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x8000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+
+ partition@38000 {
+ label = "tozed-conf";
+ reg = <0x38000 0x8000>;
+ read-only;
+ };
+ };
+ };
+};
+
+ðernet {
+ pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
+};
+
+&gmac0 {
+ nvmem-cells = <&macaddr_factory_e000>;
+ nvmem-cell-names = "mac-address";
+};
+
+&factory {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* WLAN24 MAC address */
+ macaddr_factory_4: macaddr@4 {
+ reg = <0x4 0x6>;
+ };
+
+ /* WLAN5 MAC address */
+ macaddr_factory_8004: macaddr@8004 {
+ reg = <0x8004 0x6>;
+ };
+
+ /* LAN MAC address */
+ macaddr_factory_e000: macaddr@e000 {
+ reg = <0xe000 0x6>;
+ };
+
+ /* WAN MAC address */
+ macaddr_factory_e006: macaddr@e006 {
+ reg = <0xe006 0x6>;
+ };
+};
b/target/linux/ramips/image/mt7621.mk
@@ -1615,6 +1630,16 @@ define Device/totolink_x5000r
endef
TARGET_DEVICES += totolink_x5000r
+define Device/tozed_s12-unisoc-plus
+ $(Device/dsa-migration)
+ $(Device/uimage-lzma-loader)
+ IMAGE_SIZE := 16064k
+ DEVICE_VENDOR := Tozed
+ DEVICE_MODEL := S12 Plus (UNISOC)
+ DEVICE_PACKAGES := kmod-usb3 kmod-mt7603 kmod-mt76x2 comgt-ncm
+endef
+TARGET_DEVICES += tozed_s12-unisoc-plus
+
define Device/tplink_archer-a6-v3
$(Device/dsa-migration)
$(Device/tplink-safeloader)
a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -27,6 +27,7 @@ ramips_setup_interfaces()
ampedwireless,ally-r1900k|\
gehua,ghl-r-001|\
hiwifi,hc5962|\
+ tozed,s12-unisoc-plus|\
xiaomi,mi-router-3-pro|\
xiaomi,mi-router-ac2100|\
xiaomi,mi-router-cr6606|\