mediatek:correct nums of lan ports

This commit is contained in:
padavanonly 2023-11-21 21:14:22 +08:00 committed by hanwckf
parent 514e9497eb
commit 850894a6e6
6 changed files with 113 additions and 80 deletions

View File

@ -143,26 +143,26 @@
compatible = "mediatek,eth-mac"; compatible = "mediatek,eth-mac";
reg = <0>; reg = <0>;
phy-mode = "2500base-x"; phy-mode = "2500base-x";
ext-phy-reg = <1>;
ext-phy-reset-gpios = <&pio 10 0>;
fixed-link { fixed-link {
speed = <2500>; speed = <2500>;
full-duplex; full-duplex;
pause; pause;
}; };
ext-phy-reg = <1>;
ext-phy-reset-gpios = <&pio 10 0>;
}; };
gmac1: mac@1 { gmac1: mac@1 {
compatible = "mediatek,eth-mac"; compatible = "mediatek,eth-mac";
reg = <1>; reg = <1>;
phy-mode = "2500base-x"; phy-mode = "2500base-x";
ext-phy-reg = <7>;
ext-phy-reset-gpios = <&pio 19 0>;
fixed-link { fixed-link {
speed = <2500>; speed = <2500>;
full-duplex; full-duplex;
pause; pause;
}; };
ext-phy-reg = <7>;
ext-phy-reset-gpios = <&pio 19 0>;
}; };
mdio: mdio-bus { mdio: mdio-bus {
@ -180,29 +180,25 @@
port@0 { port@0 {
reg = <0>; reg = <0>;
label = "lan0"; label = "lan1";
}; };
port@1 { port@1 {
reg = <1>; reg = <1>;
label = "lan1"; label = "lan2";
}; };
port@2 { port@2 {
reg = <2>; reg = <2>;
label = "lan2"; label = "lan3";
}; };
port@3 { port@3 {
reg = <3>; reg = <3>;
label = "lan3";
};
port@4 {
reg = <4>;
label = "lan4"; label = "lan4";
}; };
port@5 { port@5 {
reg = <5>; reg = <5>;
label = "lan5"; label = "lan5";

View File

@ -80,91 +80,36 @@
compatible = "mediatek,eth-mac"; compatible = "mediatek,eth-mac";
reg = <0>; reg = <0>;
phy-mode = "2500base-x"; phy-mode = "2500base-x";
ext-phy-reg = <5>;
ext-phy-reset-gpios = <&pio 13 0>;
fixed-link { fixed-link {
speed = <2500>; speed = <2500>;
full-duplex; full-duplex;
pause; pause;
}; };
ext-phy-reg = <5>;
ext-phy-reset-gpios = <&pio 13 0>;
}; };
gmac1: mac@1 { gmac1: mac@1 {
compatible = "mediatek,eth-mac"; compatible = "mediatek,eth-mac";
reg = <1>; reg = <1>;
phy-mode = "2500base-x"; phy-mode = "2500base-x";
ext-phy-reg = <7>;
ext-phy-reset-gpios = <&pio 17 0>;
fixed-link { fixed-link {
speed = <2500>; speed = <2500>;
full-duplex; full-duplex;
pause; pause;
}; };
ext-phy-reg = <7>;
ext-phy-reset-gpios = <&pio 17 0>;
}; };
mdio: mdio-bus { mdio: mdio-bus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
switch@0 { switch:switch@0 {
compatible = "mediatek,mt7531"; compatible = "mediatek,mt7531";
reg = <31>; reg = <31>;
reset-gpios = <&pio 5 0>; reset-gpios = <&pio 5 0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan0";
};
port@1 {
reg = <1>;
label = "lan1";
};
port@2 {
reg = <2>;
label = "lan2";
};
port@3 {
reg = <3>;
label = "lan3";
};
port@4 {
reg = <4>;
label = "lan4";
};
port@5 {
reg = <5>;
label = "lan5";
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
}; };
}; };
}; };

View File

@ -6,3 +6,40 @@
model = "TP-Link TL-XDR6086"; model = "TP-Link TL-XDR6086";
compatible = "tplink,tl-xdr6086", "mediatek,mt7986a"; compatible = "tplink,tl-xdr6086", "mediatek,mt7986a";
}; };
&switch {
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan1";
};
port@5 {
reg = <5>;
label = "lan2";
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};

View File

@ -6,3 +6,55 @@
model = "TP-Link TL-XDR6088"; model = "TP-Link TL-XDR6088";
compatible = "tplink,tl-xdr6088", "mediatek,mt7986a"; compatible = "tplink,tl-xdr6088", "mediatek,mt7986a";
}; };
&switch {
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan1";
};
port@1 {
reg = <1>;
label = "lan2";
};
port@2 {
reg = <2>;
label = "lan3";
};
port@3 {
reg = <3>;
label = "lan4";
};
port@5 {
reg = <5>;
label = "lan5";
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};

View File

@ -28,13 +28,16 @@ mediatek_setup_interfaces()
ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_set_interfaces_lan_wan "eth0" "eth1"
;; ;;
netcore,n60) netcore,n60)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4" eth1 ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" eth1
;; ;;
glinet,gl-mt6000) glinet,gl-mt6000)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4 lan5" eth1 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" eth1
;; ;;
tplink,tl-xdr608*) tplink,tl-xdr6086)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4 lan5" eth1 ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
;;
tplink,tl-xdr6088)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" eth1
;; ;;
*) *)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4 lan5" eth1 ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4 lan5" eth1

View File

@ -152,10 +152,10 @@ platform_do_upgrade() {
*snand*) *snand*)
nand_do_upgrade "$1" nand_do_upgrade "$1"
;; ;;
bananapi,bpi-r3mini-emmc |\
*emmc*) *emmc*)
mtk_mmc_do_upgrade "$1" mtk_mmc_do_upgrade "$1"
;; ;;
bananapi,bpi-r3mini-emmc |\
glinet,gl-mt6000) glinet,gl-mt6000)
CI_KERNPART="kernel" CI_KERNPART="kernel"
CI_ROOTPART="rootfs" CI_ROOTPART="rootfs"