From 58accb66991186df1b5a39556bc8df2c9281deae Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 29 May 2022 19:38:40 +0800 Subject: [PATCH] ramips: msg1500 x.00: switch to new hnat driver --- .../dts/mt7621_raisecom_msg1500-x-00.dts | 25 ++++++++++++------- .../mt7621/base-files/etc/board.d/02_network | 7 ++++-- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts index 3c326d60c..f38f150be 100644 --- a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts +++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts @@ -114,18 +114,25 @@ }; }; -ðernet { - compatible = "mediatek,ralink-mt7621-eth"; - mediatek,switch = <&gsw>; -}; - -&switch0 { - /delete-property/ compatible; - phy-mode = "rgmii"; +&gmac1 { + status = "okay"; }; &gsw { - compatible = "mediatek,ralink-mt7621-gsw"; + mediatek,portmap = "llllw"; + status = "okay"; +}; + +&hnat { + mtketh-wan = "eth1"; + mtketh-ppd = "eth0"; + mtketh-lan = "eth0"; + mtketh-max-gmac = <2>; + /delete-property/ mtkdsa-wan-port; +}; + +&switch0 { + status = "disabled"; }; &state_default { diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index b302fcae0..ab33cf795 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -47,8 +47,7 @@ ramips_setup_interfaces() "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan" "6@eth0" ucidef_set_interface_lan "eth0.1 ra0 rai0" ;; - d-team,newifi-d2|\ - raisecom,msg1500-x-00) + d-team,newifi-d2) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0" ucidef_set_interface_lan "eth0.1 ra0 rai0" @@ -81,6 +80,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; + raisecom,msg1500-x-00) + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6u@eth0" "5u@eth1" + ;; tplink,eap235-wall-v1) ucidef_set_interface_lan "lan0 lan1 lan2 lan3" ;;