Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mt7621 refactor and mux phy0/4 to gmac1 to achieve 2 Gbps CPU bandwidth #10238

Closed
wants to merge 4 commits into from

Conversation

arinc9
Copy link
Contributor

@arinc9 arinc9 commented Jul 10, 2022

Hi, I maintain MT7621 SoC and Ralink Pinctrl driver on upstream Linux.
https://github.com/torvalds/linux/blob/4e23eeebb2e57f5a28b36221aa776b5a1122dde5/MAINTAINERS#L17040


This patch series brings thorough refactoring to the devicetrees of the mt7621 SoC and fix GB-PC1 and GB-PC2 devicetrees while at it.

It is possible to achieve 2 Gbps routing in total on devices with MT7621 SoCs.
Currently you can only get a maximum of 500/500 Mbps (download/upload) bandwidth on routing between networks.

With the last patch in the series, 1000/1000 Mbps routing or 2 Gbps total bandwidth to the CPU is possible.

Speed Test

Here are the results for iperf3 bidirectional speed test with hardware offloading.
Routing and NAT performance is identical.

Without the patch

[  5][RX-S]   0.00-20.00  sec   353 MBytes   148 Mbits/sec                  receiver
[  8][TX-S]   0.00-20.00  sec  1.79 GBytes   769 Mbits/sec    0             sender

With the patch

[  5][RX-S]   0.00-20.00  sec  2.16 GBytes   926 Mbits/sec                  receiver
[  8][TX-S]   0.00-20.00  sec  1.80 GBytes   775 Mbits/sec    0             sender

Devices That Benefit 2 Gbps CPU Bandwidth

There's a lot to make a list. Check the changelog for the last patch.

The Patch Series Was Tested On

  • Unielec U7621-06 16M by me and OpenWrt forum user user31894691
  • TP-Link RE650 v1 by me
  • Ubiquiti EdgeRouter X SFP by me
  • D-Link DIR-882 rev. A1 by OpenWrt forum user Warlock
  • D-Link DIR-878 rev. A1 by OpenWrt forum user Warlock
  • MTS WG430223 by @csharper2005
  • Xiaomi Mi Router 3 Pro by OpenWrt forum user SopaDeMacaco-UmaDeli
  • Beeline Smartbox Giga by OpenWrt forum user SopaDeMacaco-UmaDeli
  • Netgear WAC124 by OpenWrt forum user piaddic7ed
  • Beeline Smartbox Flash by OpenWrt forum user SopaDeMacaco-UmaDeli
  • Xiaomi Mi Router 4A Gigabit Edition by @ulp1an, @ubatuhan and @dkey21
  • Xiaomi Redmi AC2100 by @Stkrx
  • Ubiquiti EdgeRouter X by OpenWrt forum user d687r02j8g
  • ZyXEL NWA50AX by @ThxAndBye
  • Unielec U7621-01 by OpenWrt forum user Toomoch
  • Xiaomi Router 3G by @jokubasver and @eduardo010174
  • D-Team Newifi D2 by @csharper2005
  • H3C TX1801 Plus by @DragonBluep
  • Xiaomi Mi Router CR660x by @infiWang
  • Cudy X6 by OpenWrt forum user jedboy
  • Cudy 2100 by OpenWrt forum user jedboy
  • TP-Link Archer C6U v1 by @dreamer7
  • GnuBee GB-PC2 by Petr Louda
  • YouHua WR1200JS by @ayyyuki1
  • D-Link DIR-1960 by OpenWrt forum user adiastra
  • Netgear WAX202 by @looi
  • ipTIME T5004 by @odkrys
  • TOTOLINK X5000R by OpenWrt forum user Agent
  • Beeline SmartBox TURBO by @csharper2005
  • YunCore AX820 by @f00b4r0

Forum link for more information:
https://forum.openwrt.org/t/users-needed-to-test-2-gbps-wan-lan-nat-routing-on-ramips-mt7621-devices/131478

@ptpt52
Copy link
Contributor

ptpt52 commented Jul 10, 2022

mark

@hauke hauke added the target/ramips pull request/issue for ramips target label Jul 10, 2022
@neheb
Copy link
Contributor

neheb commented Jul 11, 2022

How interesting...

Do you think this would also work on mt7622?

edit: it won't.

So if I get this right, gmac0 is already connected to the switch. this PR connects gmac1 as well. Doesn't that require multi-CPU DSA?

edit2: reading this PR again looks like port 4 is taken out of the switch and assigned to gmac1. Hrm.

edit3: does raise the question whether it was a good idea for the PC2 to introduce another ethernet interface. After all there are two ethernet ports. If port 4 can be remapped to gmac1, what was the point?

@arinc9
Copy link
Contributor Author

arinc9 commented Jul 11, 2022

edit3: does raise the question whether it was a good idea for the PC2 to introduce another ethernet interface. After all there are two ethernet ports. If port 4 can be remapped to gmac1, what was the point?

I asked the same question back in time. Best thing I could come up with is it was a community effort project and I don't really think they knew better. After all, you can connect up to 5 ports on the MT7530 switch in MT7621AT/MT7621ST. There was no need to add an external phy on the board just to add one more ethernet port.

So if I get this right, gmac0 is already connected to the switch. this PR connects gmac1 as well. Doesn't that require multi-CPU DSA?

edit2: reading this PR again looks like port 4 is taken out of the switch and assigned to gmac1. Hrm.

They implemented this feature in the MT7530 DSA subdriver. I'd rather want the phy muxing code to be run from the Mediatek Gigabit PHY driver instead. Maybe we can move the code from the DSA subdriver to there in the future.

@arinc9
Copy link
Contributor Author

arinc9 commented Jul 11, 2022

v2:
mt7621_beeline_smartbox-giga.dts: fix phy reg offset
mt7621_linksys_ea6350-v4.dts: fix formatting
mt7621_tplink_eap615-wall-v1.dts: fix gmac1 label

@mrkiko
Copy link
Contributor

mrkiko commented Jul 11, 2022

Thanks for your work.
Has thisPR been already run-tested on a GB-PC1?

Thanks!

@arinc9
Copy link
Contributor Author

arinc9 commented Jul 11, 2022

Thanks for your work. Has thisPR been already run-tested on a GB-PC1?

Thanks!

I had Sergio confirm the muxed phy working on mainline Linux on GB-PC1. However, I don't expect to see any issues on OpenWrt. It wouldn't hurt to test my builds if you have one.

@rsalvaterra
Copy link
Member

Well, this one flew right under my radar. I will definitely give it a spin on my Redmi AC2100, though. Thanks, @arinc9!

@csharper2005
Copy link
Contributor

csharper2005 commented Jul 13, 2022

Great work. MTS WG430223 - runtests ok.

@neheb
Copy link
Contributor

neheb commented Jul 20, 2022

Can you include changes for the WAX202?

@arinc9
Copy link
Contributor Author

arinc9 commented Jul 21, 2022

Can you include changes for the WAX202?

Done.

v3:
Include ZyXEL NWA50AX, NWA55AXE and Netgear WAX202.
Slightly change the patch log for better explanation.

@neheb
Copy link
Contributor

neheb commented Jul 21, 2022

Great. I'm currently running this patchset with no problems.

@ptpt52
Copy link
Contributor

ptpt52 commented Jul 21, 2022

tested this patch set, looks good.

ptpt52 pushed a commit to x-wrt/x-wrt that referenced this pull request Jul 21, 2022
All pin groups function as gpio unless set otherwise. Therefore, remove
this unnecessary binding.

Remove the ethernet node workaround for rgmii2.

Tested on a range of devices documented on the GitHub PR.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d9a683f57b5b4ba9814a49963346cadf562dad2f
Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
ptpt52 pushed a commit to x-wrt/x-wrt that referenced this pull request Jul 21, 2022
Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
@csharper2005
Copy link
Contributor

Pending Beeline SmartBox TURBO - runtest ok. The device dts has been updated in accordance with the best practice from this PR.

@ulp1an
Copy link

ulp1an commented Jul 21, 2022

Tested on Xiaomi Mi Router 4A Gigabit Edition w/ 1 Gbps fiber connection and it definitely worked. Thank you.

ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Feb 3, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
@Ntemis
Copy link

Ntemis commented Jun 16, 2023

You forgot the MQmaker WiTi board as it has 2 wan ports as well but only gmac0 node is set in dts
Check known issues here
https://openwrt.org/toh/mqmaker/witi
With CONFIG_ICPLUS_PHY=y been set i think is time to bring the second wan to life

@arinc9
Copy link
Contributor Author

arinc9 commented Jun 17, 2023

@Ntemis I did not forget, I did not have this information to properly address the devicetree for this device. Do you have this device to test WAN2? I will make a patch for this.

@arinc9
Copy link
Contributor Author

arinc9 commented Jun 17, 2023

The known issues section on the link claims the external PHY for WAN2 is wired to the switch instead of the SoC's GMAC. I'll need to you test to confirm that.

@Ntemis
Copy link

Ntemis commented Jun 18, 2023

i can test and yes i do own the device

@arinc9
Copy link
Contributor Author

arinc9 commented Jun 18, 2023

Try the images here. See if the network connectivity using the wan1 and wan2 interfaces works.

Source code: arinc9@d84cb17

@Ntemis
Copy link

Ntemis commented Jun 19, 2023

I let you know asap tomorrow, thanks for the image

@Ntemis
Copy link

Ntemis commented Jun 20, 2023

@arinc9 you the man! It works perfectly, amazing thanks

@arinc9
Copy link
Contributor Author

arinc9 commented Jun 20, 2023

parakallo! I'll send a patch with you stated as a tester soon.

@Ntemis
Copy link

Ntemis commented Jun 20, 2023

büyük desteğin için teşekkürler komşu

skbeh added a commit to skbeh/openwrt that referenced this pull request Jun 22, 2023
Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Aug 22, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Aug 22, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Aug 24, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Aug 24, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Aug 24, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Aug 30, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Sep 5, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
ABu33 pushed a commit to ABu33/openwrt that referenced this pull request Sep 16, 2023
… bandwidth

ramips: fix GB-PC1 and GB-PC2 device support

Change switch port labels to ethblack & ethblue.
Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
Add the external phy with ethyellow label on the GB-PC2 devicetree.
Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
Update interface name and change netdev function.
Enable lzma compression to make up for the increased size of the kernel.
Make spi flash bindings on par with mainline Linux to fix read errors.

Tested on GB-PC2 by Petr.

Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: do not claim rgmii2 group as gpio for certain devices

These devices do not use rgmii2 as gpio, therefore remove rgmii2 pin group
from state-default. Remove overwriting the ethernet node for these devices.

Move claiming the rgmii2 group from mt7621_zyxel_nwa-ax.dtsi to
mt7621_zyxel_nwa50ax.dts as it's only the latter using rgmii2 pins as gpio.

Remove duplicate ethernet overwrite from mt7621_tplink_archer-x6-v3.dtsi.

Claim rgmii2 group as gpio on mt7621_bolt_arion.dts as it uses an rgmii2
pin, 26, as gpio.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: mt7621-dts: mux phy0/4 to gmac1

Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: openwrt#10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

ramips: Correct Unielec 01 and 06 dts labels
@Npeca75 Npeca75 mentioned this pull request Oct 25, 2023
1 task
@sanitariu
Copy link

Hi, anyone have problems like double arping from ISP or packet losses when router is connected via epon optical device ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target/ramips pull request/issue for ramips target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet