Soc MT7622
WAN Aquantia AQR112C
4x LAN mt7530 Switch
Openwrt 24.10.0
the wan interface works on eth1
but i got no luck in getting lan to work ,
see Openwrt pull the interface up and mark it in forwarding status
and even the led setup is correct but
only Tx counting with 0 Rx
no data is coming out of the switch at all
only the physical link is working
i have root access to OEM firmware found it built on openwrt lede kernel 4.4
this is what was in 02_network file
mt7622)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" "5@eth1"
;;
now modern Openwrt uses DSA so my network configuration now is
ucidef_set_interfaces_lan_wan "lan4 lan3 lan2 lan1" wan
i can't get the switch to work
wan port works on either phy7 or phy8
Help will be appreciated
this is current eth node
ð {
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";
nvmem-cells = <&macaddr_config_60004>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
phy-mode = "2500base-x";
phy-handle = <ðernet_phy7>;
nvmem-cells = <&macaddr_config_40004>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
ethernet_phy7: ethernet-phy@7 {
compatible = "ethernet-phy-ieee802.3-c45";
phy-connection-type = "2500base-x";
reg = <7>;
};
mt7530: switch@1f {
compatible = "mediatek,mt7530";
reg = <31>;
interrupt-parent = <&pio>;
interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
interrupt-controller;
#interrupt-cells = <1>;
gpio-controller;
#gpio-cells = <2>;
core-supply = <®_1p8v>;
io-supply = <®_3p3v>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
label = "lan4";
};
port@2 {
reg = <2>;
label = "lan3";
};
port@3 {
reg = <3>;
label = "lan2";
};
port@4 {
reg = <4>;
label = "lan1";
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac0>;
phy-mode = "2500base-x";
nvmem-cells = <&macaddr_config_60004>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};
};
};
and this is the output
lan3 has cable plugged in.
root@OpenWrt:~# ifconfig
br-lan Link encap:Ethernet HWaddr B4:A9:4F:4A:9F:C7
inet addr:192.168.77.1 Bcast:192.168.77.255 Mask:255.255.255.0
inet6 addr: fe80::b6a9:4fff:fe4a:9fc7/64 Scope:Link
inet6 addr: fdbd:3e8e:38d0::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:252 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:46286 (45.2 KiB)
eth0 Link encap:Ethernet HWaddr 00:0C:E7:11:22:33
inet6 addr: fe80::20c:e7ff:fe11:2233/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1504 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:268 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:176 (176.0 B) TX bytes:50078 (48.9 KiB)
Interrupt:123
eth1 Link encap:Ethernet HWaddr B4:A9:4F:4A:9F:C6
inet addr:192.168.1.124 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::b6a9:4fff:fe4a:9fc6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9165977 errors:0 dropped:230 overruns:0 frame:0
TX packets:18592968 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:751590507 (716.7 MiB) TX bytes:1599022552 (1.4 GiB)
Interrupt:123
lan1 Link encap:Ethernet HWaddr B4:A9:4F:4A:9F:C7
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:1 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:172 (172.0 B) TX bytes:0 (0.0 B)
lan2 Link encap:Ethernet HWaddr B4:A9:4F:4A:9F:C7
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lan3 Link encap:Ethernet HWaddr B4:A9:4F:4A:9F:C7
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:252 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:46286 (45.2 KiB)
lan4 Link encap:Ethernet HWaddr B4:A9:4F:4A:9F:C7
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:18596066 errors:0 dropped:0 overruns:0 frame:0
TX packets:18596066 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1636529607 (1.5 GiB) TX bytes:1636529607 (1.5 GiB)
root@OpenWrt:~# uptime
01:51:25 up 1:51, load average: 0.00, 0.00, 0.02
root@OpenWrt:~#
wireless connection works fine. but not for lan ports
boot log
[ 3.017124] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xffffffc080fa0000, irq 123
[ 3.027025] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xffffffc080fa0000, irq 123
[ 3.941027] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[ 4.021838] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[ 4.030705] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 4.032023] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=132)
[ 4.051287] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=133)
[ 4.063236] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7530 PHY] (irq=134)
[ 4.075201] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7530 PHY] (irq=135)
[ 4.087100] mtk_soc_eth 1b100000.ethernet eth0: entered promiscuous mode
[ 5.025386] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[ 5.033885] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 5.041682] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[ 16.170453] mtk_soc_eth 1b100000.ethernet eth0: Link is Down
[ 16.189614] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[ 16.201308] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 16.214939] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[ 16.222729] br-lan: port 1(lan1) entered blocking state
[ 16.227967] br-lan: port 1(lan1) entered disabled state
[ 16.233343] mt7530-mdio mdio-bus:1f lan1: entered allmulticast mode
[ 16.239669] mtk_soc_eth 1b100000.ethernet eth0: entered allmulticast mode
[ 16.250808] mt7530-mdio mdio-bus:1f lan1: entered promiscuous mode
[ 16.268313] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
[ 16.280678] br-lan: port 2(lan2) entered blocking state
[ 16.285920] br-lan: port 2(lan2) entered disabled state
[ 16.291262] mt7530-mdio mdio-bus:1f lan2: entered allmulticast mode
[ 16.299719] mt7530-mdio mdio-bus:1f lan2: entered promiscuous mode
[ 16.315878] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
[ 16.340169] br-lan: port 3(lan3) entered blocking state
[ 16.345416] br-lan: port 3(lan3) entered disabled state
[ 16.350791] mt7530-mdio mdio-bus:1f lan3: entered allmulticast mode
[ 16.378938] mt7530-mdio mdio-bus:1f lan3: entered promiscuous mode
[ 16.399899] mt7530-mdio mdio-bus:1f lan4: configuring for phy/gmii link mode
[ 16.414464] br-lan: port 4(lan4) entered blocking state
[ 16.419776] br-lan: port 4(lan4) entered disabled state
[ 16.425065] mt7530-mdio mdio-bus:1f lan4: entered allmulticast mode
[ 16.436000] mt7530-mdio mdio-bus:1f lan4: entered promiscuous mode
[ 16.450233] mtk_soc_eth 1b100000.ethernet eth1: configuring for fixed/2500base-x link mode
[ 16.461395] mtk_soc_eth 1b100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 19.200661] mt7530-mdio mdio-bus:1f lan3: Link is Up - 1Gbps/Full - flow control rx/tx
[ 19.200705] br-lan: port 3(lan3) entered blocking state
[ 19.213864] br-lan: port 3(lan3) entered forwarding state
For some reason which I do not understand WAN port worked in gmac0 and gmac1 alike.
while the switch only worked with gmac1 connected to port5 not port6
ð {
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";
phy-handle = <ðernet_phy7>;
nvmem-cells = <&macaddr_config_40004>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
phy-mode = "rgmii";
nvmem-cells = <&macaddr_config_60004>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
ethernet_phy7: ethernet-phy@7 {
compatible = "ethernet-phy-ieee802.3-c45";
phy-connection-type = "2500base-x";
reg = <7>;
};
mt7530: switch@1f {
compatible = "mediatek,mt7530";
reg = <31>;
interrupt-parent = <&pio>;
interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
interrupt-controller;
#interrupt-cells = <1>;
gpio-controller;
#gpio-cells = <2>;
core-supply = <®_1p8v>;
io-supply = <®_3p3v>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
label = "lan4";
};
port@2 {
reg = <2>;
label = "lan3";
};
port@3 {
reg = <3>;
label = "lan2";
};
port@4 {
reg = <4>;
label = "lan1";
};
port@5 {
reg = <5>;
label = "cpu";
ethernet = <&gmac1>;
phy-mode = "rgmii";
nvmem-cells = <&macaddr_config_60004>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};
};
};
1 Like
system
Closed
April 18, 2025, 11:26am
4
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.