From 50a4c1afcede190df342fe9b43911ea5538de3d5 Mon Sep 17 00:00:00 2001 From: Chuanhong Guo Date: Thu, 7 Apr 2022 10:20:40 +0800 Subject: [PATCH] mt7622-rfb-mtk0897-ubi --- .../mediatek/dts/mt7622-rfb-mtk0897-ubi.dts | 130 ++++++++++++++++++ target/linux/mediatek/image/mt7622.mk | 10 ++ .../mt7622/base-files/lib/upgrade/platform.sh | 2 + 3 files changed, 142 insertions(+) create mode 100644 target/linux/mediatek/dts/mt7622-rfb-mtk0897-ubi.dts 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 index 0000000000..ad24cf4c36 --- /dev/null +++ b/target/linux/mediatek/dts/mt7622-rfb-mtk0897-ubi.dts @@ -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 = <ð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"; +}; diff --git a/target/linux/mediatek/image/mt7622.mk b/target/linux/mediatek/image/mt7622.mk index 8e0126f576..531af99f1e 100644 --- a/target/linux/mediatek/image/mt7622.mk +++ b/target/linux/mediatek/image/mt7622.mk @@ -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 diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh index f54665dfa1..196bd1d87f 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -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" -- 2.30.2