--- /dev/null
+/dts-v1/;
+
+#include "mt7622-rfb1.dts"
+/ {
+ model = "MT7622_RTL8367S RFB MTK0897 (UBI)";
+ compatible = "mediatek,mt7622-rfb-mtk0897-ubi";
+
+ rtkgsw: rtkgsw@0 {
+ compatible = "mediatek,rtk-gsw";
+ mediatek,ethsys = <ðsys>;
+ mediatek,mdio = <&mdio>;
+ mediatek,reset-pin = <&pio 54 0>;
+ status = "okay";
+ };
+};
+
+ð {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <ð_pins>;
+
+ gmac1: mac@1 {
+ compatible = "mediatek,eth-mac";
+ reg = <1>;
+ phy-mode = "rgmii";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ pause;
+ };
+ };
+
+ mdio: mdio-bus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ /delete-node/ switch@0;
+ };
+};
+
+&pio {
+ epa_elna_pins: epa-elna-pins {
+ mux {
+ function = "antsel";
+ groups = "antsel0", "antsel1", "antsel2", "antsel3",
+ "antsel4", "antsel5", "antsel6", "antsel7",
+ "antsel8", "antsel9", "antsel12", "antsel13",
+ "antsel14", "antsel15", "antsel16", "antsel17";
+ };
+ };
+};
+
+&slot0 {
+ mt7615@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x5000>;
+ ieee80211-freq-limit = <5490000 6000000>;
+ };
+};
+
+&slot1 {
+ mt7615@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x10000>;
+ ieee80211-freq-limit = <5000000 5490000>;
+ };
+};
+
+&wmac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&epa_elna_pins>;
+ mediatek,mtd-eeprom = <&factory 0x0>;
+ status = "okay";
+};
+
+/*
+&nandc {
+ status = "okay";
+};
+*/
+&bch {
+ status = "okay";
+};
+
+&snfi {
+ status = "okay";
+ flash@0 {
+ /delete-node/ partitions;
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Preloader";
+ reg = <0x00000 0x0080000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "ATF";
+ reg = <0x80000 0x0040000>;
+ };
+
+ partition@c0000 {
+ label = "Bootloader";
+ reg = <0xc0000 0x0080000>;
+ };
+
+ partition@140000 {
+ label = "Config";
+ reg = <0x140000 0x0080000>;
+ };
+
+ factory: partition@1c0000 {
+ label = "Factory";
+ reg = <0x1c0000 0x0040000>;
+ };
+
+ partition@200000 {
+ label = "ubi";
+ reg = <0x200000 0x6400000>;
+ };
+ };
+ };
+};
+
+&mmc0 {
+ status = "disabled";
+};
endef
TARGET_DEVICES += mediatek_mt7622-rfb1-ubi
+define Device/mediatek_mt7622-rfb-mtk0897-ubi
+ DEVICE_VENDOR := MediaTek
+ DEVICE_MODEL := MTK7622 MTK0897 UBI
+ DEVICE_DTS := mt7622-rfb-mtk0897-ubi
+ DEVICE_DTS_DIR := ../dts
+ DEVICE_PACKAGES := swconfig
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += mediatek_mt7622-rfb-mtk0897-ubi
+
define Device/ruijie_rg-ew3200gx-pro
DEVICE_VENDOR := Ruijie
DEVICE_MODEL := RG-EW3200GX PRO
default_do_upgrade "$1"
;;
mediatek,mt7622-rfb1-ubi|\
+ mediatek,mt7622-rfb-mtk0897-ubi|\
totolink,a8000ru|\
xiaomi,redmi-router-ax6s)
nand_do_upgrade "$1"
buffalo_check_image "$board" "$magic" "$1" || return 1
;;
mediatek,mt7622-rfb1-ubi|\
+ mediatek,mt7622-rfb-mtk0897-ubi|\
totolink,a8000ru|\
xiaomi,redmi-router-ax6s)
nand_do_platform_check "$board" "$1"