[OpenWrt-Devel] [RFC 9/9] wap6805: use mtk-eth-soc driver with DSA
Bjørn Mork
bjorn at mork.no
Mon Oct 15 06:25:03 EDT 2018
Signed-off-by: Bjørn Mork <bjorn at mork.no>
---
.../linux/ramips/base-files/etc/board.d/02_network | 3 +-
target/linux/ramips/dts/WAP6805.dts | 61 +++++++++++++++++++++-
target/linux/ramips/image/mt7621.mk | 1 +
3 files changed, 62 insertions(+), 3 deletions(-)
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index f53bf02d221f..5b0dffbc0be2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -405,8 +405,7 @@ ramips_setup_interfaces()
"0:lan:2" "1:lan:1" "4:wan" "6 at eth0"
;;
wap6805)
- ucidef_add_switch "switch0" \
- "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "6 at eth0"
+ ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
;;
*)
RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
diff --git a/target/linux/ramips/dts/WAP6805.dts b/target/linux/ramips/dts/WAP6805.dts
index 53ef7301d13b..95fd3ecbebda 100644
--- a/target/linux/ramips/dts/WAP6805.dts
+++ b/target/linux/ramips/dts/WAP6805.dts
@@ -125,7 +125,66 @@
};
ðernet {
- mtd-mac-address = <&factory 0xe000>;
+ gmac0: mac at 0 {
+ compatible = "mediatek,eth-mac";
+ reg = <0>;
+ phy-mode = "rgmii";
+ mtd-mac-address = <&factory 0xe000>;
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ pause;
+ };
+ };
+ gmac1: mac at 1 {
+ compatible = "mediatek,eth-mac";
+ reg = <1>;
+ mtd-mac-address = <&factory 0xe000>;
+ mtd-mac-address-increment = <1>;
+ phy-mode = "rgmii";
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ pause;
+ };
+ };
+};
+
+&phy1f {
+ compatible = "mediatek,mt7530";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port at 0 {
+ reg = <0>;
+ label = "lan0";
+ cpu = <&cpu_port0>;
+ };
+ port at 1 {
+ reg = <1>;
+ label = "lan1";
+ cpu = <&cpu_port0>;
+ };
+ port at 2 {
+ reg = <2>;
+ label = "lan2";
+ cpu = <&cpu_port0>;
+ };
+ port at 3 {
+ reg = <3>;
+ label = "lan3";
+ cpu = <&cpu_port0>;
+ };
+ cpu_port0: port at 6 {
+ reg = <6>;
+ label = "cpu";
+ ethernet = <&gmac0>;
+ };
+ };
};
&xhci {
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index cc37c53bad28..b2f07b5e2e68 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -539,6 +539,7 @@ define Device/wap6805
IMAGE_SIZE := $(ralink_default_fw_size_32M)
DEVICE_TITLE := ZyXEL WAP6805
DEVICE_PACKAGES := \
+ kmod-mtk-eth-soc \
kmod-mt7603 kmod-mt76x2 \
kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini \
-swconfig
--
2.11.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list