mt7622-rfb-mtk0897-ubi
authorChuanhong Guo <gch981213@gmail.com>
Thu, 7 Apr 2022 02:20:40 +0000 (10:20 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sat, 9 Apr 2022 12:31:32 +0000 (20:31 +0800)
target/linux/mediatek/dts/mt7622-rfb-mtk0897-ubi.dts [new file with mode: 0644]
target/linux/mediatek/image/mt7622.mk
target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh

diff --git a/target/linux/mediatek/dts/mt7622-rfb-mtk0897-ubi.dts b/target/linux/mediatek/dts/mt7622-rfb-mtk0897-ubi.dts
new file mode 100644 (file)
index 0000000..ad24cf4
--- /dev/null
@@ -0,0 +1,130 @@
+/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 = <&ethsys>;
+               mediatek,mdio = <&mdio>;
+               mediatek,reset-pin = <&pio 54 0>;
+               status = "okay";
+       };
+};
+
+&eth {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&eth_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";
+};
index 8e0126f5764758468c5178f9f7829e4bb840357c..531af99f1e8f0e0e4f83015aa68636ec894793e7 100644 (file)
@@ -203,6 +203,16 @@ define Device/mediatek_mt7622-rfb1-ubi
 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
index f54665dfa15b685940aa770d5660ac55fb03bb41..196bd1d87f14ebe5e24e5f039d620c70e66ab481 100755 (executable)
@@ -45,6 +45,7 @@ platform_do_upgrade() {
                default_do_upgrade "$1"
                ;;
        mediatek,mt7622-rfb1-ubi|\
+       mediatek,mt7622-rfb-mtk0897-ubi|\
        totolink,a8000ru|\
        xiaomi,redmi-router-ax6s)
                nand_do_upgrade "$1"
@@ -68,6 +69,7 @@ platform_check_image() {
                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"