ramips: rework network settings for HC5861
authorChen Minqiang <ptpt52@gmail.com>
Fri, 22 Feb 2019 14:38:59 +0000 (22:38 +0800)
committerChristian Lamparter <chunkeey@gmail.com>
Wed, 6 Mar 2019 21:02:56 +0000 (22:02 +0100)
dts: disable port4 and leave it ephy mode because it connect to nothing
switch port5 connected to GE port we use it as wan port

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/dts/HC5861.dts

index 8417ac68abc47c2dd9ee62ce6726255910990fdc..6657b7273d17bb00f2c56835d3bbc65613786ef7 100755 (executable)
@@ -315,11 +315,14 @@ ramips_setup_interfaces()
                        "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
                ;;
        hc5661|\
-       hc5861|\
        y1s)
                ucidef_add_switch "switch0" \
                        "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0"
                ;;
+       hc5861)
+               ucidef_add_switch "switch0" \
+                       "0:lan" "1:lan" "5:wan" "6@eth0"
+               ;;
        iodata,wn-ac1167gr)
                ucidef_add_switch "switch1" \
                        "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
index 09e2383e3aa86efe53d56687bd5a855625157159..76b2ce1088d5cdcfea355b516fd980910a307edf 100644 (file)
        status = "okay";
        mtd-mac-address = <&factory 0x4>;
        pinctrl-names = "default";
-       pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+       pinctrl-0 = <&rgmii1_pins &mdio_pins>;
        mediatek,portmap = "wllll";
 
-       port@4 {
-               status = "okay";
-               phy-handle = <&phy4>;
-               phy-mode = "rgmii";
-       };
-
        port@5 {
                status = "okay";
                phy-handle = <&phy5>;
        mdio-bus {
                status = "okay";
 
-               phy4: ethernet-phy@4 {
-                       reg = <4>;
-                       phy-mode = "rgmii";
-               };
-
                phy5: ethernet-phy@5 {
                        reg = <5>;
                        phy-mode = "rgmii";
        };
 };
 
-&gsw {
-       mediatek,port4 = "gmac";
-};
-
 &pcie {
        status = "okay";
 };
 
 &pcie0 {
-       mt76@0,0 {
+       wifi@0,0 {
+               compatible = "pci14c3,7662";
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
+
+&state_default {
+       gpio {
+               ralink,group = "uartf", "wled", "rgmii2", "ephy";
+               ralink,function = "gpio";
+       };
+};