mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +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";
|
compatible = "mediatek,eth-mac";
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
phy-mode = "rgmii";
|
phy-mode = "rgmii-rxid";
|
||||||
|
|
||||||
fixed-link {
|
|
||||||
speed = <1000>;
|
|
||||||
full-duplex;
|
|
||||||
pause;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mdio: mdio-bus {
|
mdio: mdio-bus {
|
||||||
@ -563,8 +557,8 @@
|
|||||||
|
|
||||||
hnat: hnat@1e100000 {
|
hnat: hnat@1e100000 {
|
||||||
compatible = "mediatek,mtk-hnat_v1";
|
compatible = "mediatek,mtk-hnat_v1";
|
||||||
/* ext-devices = "apcli0", "apclii0","apclix0",
|
ext-devices = "apcli0", "apclii0","apclix0",
|
||||||
"ra0", "rai0", "rax0", "wlan0", "wlan1"; */
|
"ra0", "rai0", "rax0", "wlan0", "wlan1";
|
||||||
reg = <0x1e100000 0x3000>;
|
reg = <0x1e100000 0x3000>;
|
||||||
|
|
||||||
resets = <ðsys 0>;
|
resets = <ðsys 0>;
|
||||||
@ -573,7 +567,7 @@
|
|||||||
mtketh-wan = "wan";
|
mtketh-wan = "wan";
|
||||||
mtketh-ppd = "lan";
|
mtketh-ppd = "lan";
|
||||||
mtketh-lan = "lan";
|
mtketh-lan = "lan";
|
||||||
mtketh-max-gmac = <1>;
|
mtketh-max-gmac = <2>;
|
||||||
mtkdsa-wan-port = <4>;
|
mtkdsa-wan-port = <4>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -113,7 +113,14 @@
|
|||||||
&gmac1 {
|
&gmac1 {
|
||||||
mtd-mac-address = <&factory 0xe000>;
|
mtd-mac-address = <&factory 0xe000>;
|
||||||
mtd-mac-address-increment = <1>;
|
mtd-mac-address-increment = <1>;
|
||||||
|
phy-mode = "rgmii";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&gsw {
|
||||||
|
@ -61,11 +61,11 @@
|
|||||||
cpu_fan: cpu_fan {
|
cpu_fan: cpu_fan {
|
||||||
compatible = "gpio-fan";
|
compatible = "gpio-fan";
|
||||||
gpios = <&gpio 13 GPIO_ACTIVE_HIGH
|
gpios = <&gpio 13 GPIO_ACTIVE_HIGH
|
||||||
&gpio 14 GPIO_ACTIVE_HIGH>;
|
&gpio 14 GPIO_ACTIVE_HIGH>;
|
||||||
gpio-fan,speed-map = < 0 0
|
gpio-fan,speed-map = < 0 0
|
||||||
2000 1
|
2000 1
|
||||||
4000 2
|
4000 2
|
||||||
6000 3>;
|
6000 3>;
|
||||||
#cooling-cells = <2>;
|
#cooling-cells = <2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -214,6 +214,10 @@
|
|||||||
mtd-mac-address-increment = <6>;
|
mtd-mac-address-increment = <6>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&hnat {
|
||||||
|
mtketh-wan = "eth5";
|
||||||
|
};
|
||||||
|
|
||||||
&switch0 {
|
&switch0 {
|
||||||
ports {
|
ports {
|
||||||
port@0 {
|
port@0 {
|
||||||
|
@ -160,6 +160,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&hnat {
|
||||||
|
mtkdsa-wan-port = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
&switch0 {
|
&switch0 {
|
||||||
ports {
|
ports {
|
||||||
port@1 {
|
port@1 {
|
||||||
|
@ -94,7 +94,14 @@
|
|||||||
|
|
||||||
&gmac1 {
|
&gmac1 {
|
||||||
mtd-mac-address = <&factory 0xe006>;
|
mtd-mac-address = <&factory 0xe006>;
|
||||||
|
phy-mode = "rgmii";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&gsw {
|
||||||
|
@ -107,7 +107,14 @@
|
|||||||
|
|
||||||
&gmac1 {
|
&gmac1 {
|
||||||
mtd-mac-address = <&factory 0xe006>;
|
mtd-mac-address = <&factory 0xe006>;
|
||||||
|
phy-mode = "rgmii";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&gsw {
|
||||||
|
@ -115,7 +115,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&gmac1 {
|
&gmac1 {
|
||||||
|
phy-mode = "rgmii";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&gsw {
|
||||||
|
@ -135,7 +135,14 @@
|
|||||||
|
|
||||||
&gmac1 {
|
&gmac1 {
|
||||||
mtd-mac-address = <&factory 0x3fffa>;
|
mtd-mac-address = <&factory 0x3fffa>;
|
||||||
|
phy-mode = "rgmii";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&gsw {
|
||||||
|
@ -30,7 +30,14 @@
|
|||||||
|
|
||||||
&gmac1 {
|
&gmac1 {
|
||||||
mtd-mac-address = <&factory 0xe006>;
|
mtd-mac-address = <&factory 0xe006>;
|
||||||
|
phy-mode = "rgmii";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&gsw {
|
||||||
|
@ -91,7 +91,14 @@
|
|||||||
&gmac1 {
|
&gmac1 {
|
||||||
mtd-mac-address = <&factory 0x4>;
|
mtd-mac-address = <&factory 0x4>;
|
||||||
mtd-mac-address-increment = <1>;
|
mtd-mac-address-increment = <1>;
|
||||||
|
phy-mode = "rgmii";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
pause;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&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)
|
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);
|
const __be32 *_id = of_get_property(np, "reg", NULL);
|
||||||
struct phylink *phylink;
|
struct phylink *phylink;
|
||||||
int phy_mode, id, err;
|
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]->irq = eth->irq[0];
|
||||||
eth->netdev[id]->dev.of_node = np;
|
eth->netdev[id]->dev.of_node = np;
|
||||||
|
|
||||||
|
if (name)
|
||||||
|
strlcpy(eth->netdev[id]->name, name, IFNAMSIZ);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
free_netdev:
|
free_netdev:
|
||||||
|
Loading…
Reference in New Issue
Block a user