aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSungbo Eo <mans0n@gorani.run>2019-12-23 01:25:39 +0900
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-12-31 12:59:23 +0100
commit7a3c9e557a61d6687aaea42ba82d249db166fb4e (patch)
tree9726f6a841a37a67380f44fad3c822f75232042a
parent9a8ba44f9c386f0c51280932b5756ffcdb20cc25 (diff)
downloadupstream-7a3c9e557a61d6687aaea42ba82d249db166fb4e.tar.gz
upstream-7a3c9e557a61d6687aaea42ba82d249db166fb4e.tar.bz2
upstream-7a3c9e557a61d6687aaea42ba82d249db166fb4e.zip
ramips: fix switch setup for Xiaomi MiWiFi Nano
MiWiFi Nano has two LAN ports, which are in reverse order. Add port numbers to them, and disable unused ports. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
-rw-r--r--target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts5
-rwxr-xr-xtarget/linux/ramips/mt76x8/base-files/etc/board.d/02_network7
2 files changed, 10 insertions, 2 deletions
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
index 92bb8b7288..e502f273af 100644
--- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
@@ -66,6 +66,11 @@
status = "disabled";
};
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,portdisable = <0x2a>;
+};
+
&wmac {
status = "okay";
};
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index 90eec9c8a0..a733353f71 100755
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -61,8 +61,7 @@ ramips_setup_interfaces()
mercury,mac1200r-v2|\
totolink,lr1200|\
wavlink,wl-wn570ha1|\
- wavlink,wl-wn575a3|\
- xiaomi,miwifi-nano)
+ wavlink,wl-wn575a3)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
;;
@@ -109,6 +108,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"4:lan:1" "2:lan:2" "0:wan" "6@eth0"
;;
+ xiaomi,miwifi-nano)
+ ucidef_add_switch "switch0" \
+ "0:lan:2" "2:lan:1" "4:wan" "6@eth0"
+ ;;
zbtlink,zbt-we1226)
ucidef_add_switch "switch0" \
"0:lan:2" "1:lan:1" "4:wan" "6@eth0"