mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
ramips: mt7621: fixes dsa hnat support
This commit is contained in:
parent
a28334d8b8
commit
1ccc3bfd54
@ -490,13 +490,7 @@
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <1>;
|
||||
status = "disabled";
|
||||
phy-mode = "rgmii";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
phy-mode = "rgmii-rxid";
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
@ -563,8 +557,8 @@
|
||||
|
||||
hnat: hnat@1e100000 {
|
||||
compatible = "mediatek,mtk-hnat_v1";
|
||||
/* ext-devices = "apcli0", "apclii0","apclix0",
|
||||
"ra0", "rai0", "rax0", "wlan0", "wlan1"; */
|
||||
ext-devices = "apcli0", "apclii0","apclix0",
|
||||
"ra0", "rai0", "rax0", "wlan0", "wlan1";
|
||||
reg = <0x1e100000 0x3000>;
|
||||
|
||||
resets = <ðsys 0>;
|
||||
@ -573,7 +567,7 @@
|
||||
mtketh-wan = "wan";
|
||||
mtketh-ppd = "lan";
|
||||
mtketh-lan = "lan";
|
||||
mtketh-max-gmac = <1>;
|
||||
mtketh-max-gmac = <2>;
|
||||
mtkdsa-wan-port = <4>;
|
||||
};
|
||||
|
||||
|
@ -113,7 +113,14 @@
|
||||
&gmac1 {
|
||||
mtd-mac-address = <&factory 0xe000>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
phy-mode = "rgmii";
|
||||
status = "okay";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
|
@ -214,6 +214,10 @@
|
||||
mtd-mac-address-increment = <6>;
|
||||
};
|
||||
|
||||
&hnat {
|
||||
mtketh-wan = "eth5";
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
|
@ -160,6 +160,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&hnat {
|
||||
mtkdsa-wan-port = <0>;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@1 {
|
||||
|
@ -94,7 +94,14 @@
|
||||
|
||||
&gmac1 {
|
||||
mtd-mac-address = <&factory 0xe006>;
|
||||
phy-mode = "rgmii";
|
||||
status = "okay";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
|
@ -107,7 +107,14 @@
|
||||
|
||||
&gmac1 {
|
||||
mtd-mac-address = <&factory 0xe006>;
|
||||
phy-mode = "rgmii";
|
||||
status = "okay";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
|
@ -115,7 +115,14 @@
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
phy-mode = "rgmii";
|
||||
status = "okay";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
|
@ -135,7 +135,14 @@
|
||||
|
||||
&gmac1 {
|
||||
mtd-mac-address = <&factory 0x3fffa>;
|
||||
phy-mode = "rgmii";
|
||||
status = "okay";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
|
@ -30,7 +30,14 @@
|
||||
|
||||
&gmac1 {
|
||||
mtd-mac-address = <&factory 0xe006>;
|
||||
phy-mode = "rgmii";
|
||||
status = "okay";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
|
@ -91,7 +91,14 @@
|
||||
&gmac1 {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
mtd-mac-address-increment = <1>;
|
||||
phy-mode = "rgmii";
|
||||
status = "okay";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
|
@ -3400,6 +3400,7 @@ static const struct net_device_ops mtk_netdev_ops = {
|
||||
|
||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||
{
|
||||
const char *name = of_get_property(np, "label", NULL);
|
||||
const __be32 *_id = of_get_property(np, "reg", NULL);
|
||||
struct phylink *phylink;
|
||||
int phy_mode, id, err;
|
||||
@ -3490,6 +3491,9 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||
eth->netdev[id]->irq = eth->irq[0];
|
||||
eth->netdev[id]->dev.of_node = np;
|
||||
|
||||
if (name)
|
||||
strlcpy(eth->netdev[id]->name, name, IFNAMSIZ);
|
||||
|
||||
return 0;
|
||||
|
||||
free_netdev:
|
||||
|
Loading…
Reference in New Issue
Block a user