Skip to content

Commit

Permalink
add d1 support 1
Browse files Browse the repository at this point in the history
  • Loading branch information
thl committed May 22, 2022
1 parent c31c2c5 commit 8a99f52
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
50 changes: 50 additions & 0 deletions target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
Expand Up @@ -142,6 +142,56 @@
nvmem-cell-names = "mac-address";
};

&gmac1 {
nvmem-cells = <&macaddr_factory_e006>;
nvmem-cell-names = "mac-address";
};

&hnat {
mtketh-wan = "eth1";
mtketh-ppd = "eth0";
mtketh-lan = "eth0";
ext-devices = "wlan0","wlan1","rax0","ra0", "rai0","apclii0","apclix0", "apcli0";
mtketh-max-gmac = <2>;
status = "okay";
};

&gsw {
mediatek,mdio = <&mdio>;
mediatek,portmap = "llllw";
mediatek,mcm;
mt7530,direct-phy-access;

resets = <&rstctrl 2>;
reset-names = "mcm";

port5: port@5 {
compatible = "mediatek,mt753x-port";
reg = <5>;
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};

port6: port@6 {
compatible = "mediatek,mt753x-port";
reg = <6>;
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};

mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
};
};


&switch0 {
ports {
port@1 {
Expand Down
5 changes: 4 additions & 1 deletion target/linux/ramips/mt7621/base-files/etc/board.d/02_network
Expand Up @@ -43,7 +43,6 @@ ramips_setup_interfaces()
glinet,gl-mt1300|\
iptime,a3002mesh|\
jcg,q20|\
lenovo,newifi-d1|\
mikrotik,routerboard-m33g|\
oraybox,x3a|\
renkforce,ws-wn530hp3-a|\
Expand Down Expand Up @@ -170,6 +169,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth0" "5u@eth1"
;;
lenovo,newifi-d1)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6u@eth0" "5u@eth1"
;;
*)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
;;
Expand Down

0 comments on commit 8a99f52

Please sign in to comment.