Repository navigation
mediatek: mt7622: convert devices with RTL8367S switch to DSA - #24861
Conversation
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
7f190cc7"mediatek: mt7622: convert devices with RTL8367S switch to DSA" — the per-device bullet list omits the kernel-config change the commit also makes (CONFIG_RTL8367S_GSW=y→# CONFIG_RTL8367S_GSW is not setinmt7622/config-6.18). Also, "Remove unused gmac1" is inaccurate for the ELECOM and TOTOLINK boards:gmac1was the second CPU port in the swconfig setup (5u@eth1), so removing it is a bandwidth change, not dead-code cleanup. See the inline note onmt7622-elecom-wrc-2533gent.dts.
The driver removal in 071d6447 is clean — no dangling references to RTL8367S_GSW, rtk-gsw or files/drivers/net/phy/rtk remain in the tree, and no mt7622 device still pulls swconfig, so disabling CONFIG_SWCONFIG for that subtarget checks out.
The main functional concern is the 05_fix-compat-version change — see that inline comment; as written it will leave all three boards demanding sysupgrade -F on every future upgrade.
Generated by Claude Code
1b73fe1 to
21d8cab
Compare
|
Ping @blogic @981213 @musashino205 |
|
I have my totolink a8000ru deployed at a remote place and can't really help with testing unfortunately :( |
|
LGTM, I have none of the devices but do appreciate the effort to get rid of swconfig and make devices work with DSA ... had a quite glance at the latest push and does look sane to me. Thanks ! |
openwrt-ai
left a comment
There was a problem hiding this comment.
Re-reviewed the two commits since 071d6447. Everything raised last round is addressed:
05_fix-compat-versionnow bumpsbuffalo,wsr-2533dhp2to1.2and addselecom,wrc-2533gent/totolink,a8000ruat1.1, matching both05_compat-versionand theDEVICE_COMPAT_VERSIONvalues inmt7622.mk(1.2 / 1.1 / 1.1). Force-upgraded devices will now land on the right version.switch_mdio:/switch_ports:labels dropped,phy-connection-type→phy-mode,reg = <1>indentation, stray blank line in the TOTOLINK regulator block, and theDEVICE_COMPAT_MESSAGEwording — all fixed. The three DSA blocks are now a byte-for-byte structural match for the in-tree rtl8365mb referencemt7981b-mercusys-mr85x-common.dtsi.rgmii_via_gmac2removal checked against the other two consumers ofmt7622-buffalo-wsr.dtsi— safe, see inline.- Removing the three
ucidef_add_switchentries from02_networkis correct: the fall-through*)case emitslan1 lan2 lan3 lan4+wan, which is exactly the port labels the new switch nodes declare. CONFIG_SWCONFIG is not setfor mt7622 checks out — noswconfigremains in any mt7622DEVICE_PACKAGES, and mt7629 (the only other mediatek subtarget still shipping it) keeps its ownCONFIG_SWCONFIG=y.
Commit checks
21d8cabf"mediatek: mt7622: remove RTL8367S_GSW driver and disable swconfig" — the subject scopes the change tomt7622, but the commit also deletes the target-widefiles/drivers/net/phy/rtk/tree andpatches-6.18/500-gsw-rtl8367s-mt7622-support.patch, and drops the now-dead# CONFIG_RTL8367S_GSW is not setline fromfilogic/,mt7623/andmt7629/config-6.18. The content is right — removing the Kconfig symbol requires cleaning every subtarget config — butmediatek: remove RTL8367S_GSW driver and disable swconfig on mt7622would describe the blast radius more honestly.
71b5d5eb's message now matches its diff, including the kernel-config hunk and the per-board MAC layout notes.
Three inline notes, two of them nits.
Generated by Claude Code
878961b to
f9e8f98
Compare
|
@blogic Do you remember where you got the information to create the mt7622-elecom-wrc-2533gent.dts file, or do you have the manufacturer's GNU source code? I'm looking for confirmation that HSGMII mode will work on this router. |
|
I just pushed the commit, don't recall the name of the person that did all the elecom boards, sorry .. worste case just fire and forget, if there are active consumers they will complain about breakage and can serve as fixup testers ... |
|
TOTOLINK A8000RU tests (from https://forum.openwrt.org/t/reduce-number-of-drivers-for-rtl8367s/237681) dmesgifconfig |
|
I'll check this on my WSR-2533DHP2 later. BTW, ELECOM does not sell "WRC-2533GENT," at least not in Japan. When the commit adding support for that device was merged, I was very surprised; it was a device I was completely unfamiliar with, and there was no information about it anywhere on the ELECOM website. |
fcfdd46 to
c4b2a85
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed the changes since the last review (21d8cabf). The only content difference is in mt7622-buffalo-wsr.dtsi / mt7622-buffalo-wsr-2533dhp2.dts: phy-connection-type → phy-mode on the gmac0 node, plus a cosmetic blank line. This brings the Buffalo board in line with the ELECOM and TOTOLINK boards, which already use phy-mode. Commit messages still match their diffs. No new issues found.
Generated by Claude Code
|
@musashino205 I've also tried to find some information about this router online, but without success. If the radio certificate is genuine, the hardware is out there somewhere, but I wouldn't hold my breath waiting for a user to respond and confirm its functionality. I'd be inclined to treat it as a "curiosity" with a low probability of being confirmed in practice. |
|
Tested on my BUFFALO WSR-2533DHP2 and works without any issues. dmesg
|
c4b2a85 to
9373431
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
93734318"mediatek: remove RTL8367S_GSW driver and disable swconfig on mt7622" — still carriesSigned-off-by: Mieczyslaw Nalewaj <[email protected]>twice, byte-identical; the duplicate line should be dropped.FormalityCheck / Git & Commitspasses anyway because a valid S-o-b is present, so this will not be caught automatically.
Generated by Claude Code
|
Not an expert here, but keeping the link for this ELECOM device at 1G/SGMII is not possible? |
|
@jonasjelonek DSA drivers only support a single CPU port. Older drivers used RGMII + SGMII, while newer drivers use HSGMII, which is 2.5 times faster. If you ever find someone who has this router and checks the HSGMII operation and finds problems, we can always switch to single SGMII. |
|
Single CPU port, that is clear. But using simply: for the CPU port of the ELECOM devices does not work/is not supported? |
|
It will also work, but we will lose performance compared to HSGMII. |
|
I'm fine with both ways, if there are no obvious users of this device anymore, no-one will ever complain, or if there are, someone will complain about either low performance or total breakage. |
Migrate Buffalo WSR-2533DHP2, ELECOM WRC-2533GENT and TOTOLINK A8000RU from swconfig to DSA. These devices use an external Realtek RTL8367S switch handled by the rtl8365mb DSA driver. Per-device changes: - Drop the proprietary mediatek,rtk-gsw node - Add realtek,rtl8365mb DSA switch with ports lan1-lan4, wan and CPU - Move CPU port to gmac0 at 2500base-x (HSGMII) - Remove gmac1 (was 5u@eth1 in swconfig; DSA uses single CPU port) - Drop unused rgmii_via_gmac2 pin group - Replace swconfig with kmod-dsa-rtl8365mb - Bump DEVICE_COMPAT_VERSION (config migration not possible) - Remove swconfig board setup from 02_network - Disable CONFIG_RTL8367S_GSW in mt7622 kernel config CPU link / bandwidth notes: - Buffalo WSR-2533DHP2 and TOTOLINK A8000RU: already used 2500base-x on gmac0 before this change; aggregate bandwidth stays the same. - ELECOM WRC-2533GENT: gmac0 moves from SGMII (1G) to 2500base-x (HSGMII). The swconfig setup previously used two 1G CPU links (gmac0 + gmac1) for 2 Gbps aggregate; DSA collapses this to a single 2.5 Gbps link. MAC address assignment notes: - Buffalo WSR-2533DHP2: WAN uses base MAC + 1, gmac0/LAN uses base MAC (previously the WAN MAC existed on the implicit eth1/gmac1 interface) - ELECOM WRC-2533GENT: WAN inherits CPU MAC via DSA conduit (original gmac1 had no nvmem-cells assignment) - TOTOLINK A8000RU: WAN reuses macaddr_factory_24 (previously gmac1) Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
All mt7622 devices using the RTL8367S switch have been migrated to the generic rtl8365mb DSA driver. Remove the now-unused RTL8367S_GSW driver and disable swconfig in the mt7622 kernel config, since no device in this target needs it anymore. The driver and its Kconfig symbol are shared across the mediatek target, so this also drops the tree-wide files/drivers/net/phy/rtk/ sources and the now-dead "# CONFIG_RTL8367S_GSW is not set" line from the filogic, mt7623 and mt7629 kernel configs. Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
aba7d60 to
70c61a2
Compare
|
Thanks! Rebased on top of main and merged! |
Migrate Buffalo WSR-2533DHP2, ELECOM WRC-2533GENT and TOTOLINK A8000RU from swconfig to DSA. These devices use an external Realtek RTL8367S switch handled by the rtl8365mb DSA driver. Per-device changes: - Drop the proprietary mediatek,rtk-gsw node - Add realtek,rtl8365mb DSA switch with ports lan1-lan4, wan and CPU - Move CPU port to gmac0 at 2500base-x (HSGMII) - Remove gmac1 (was 5u@eth1 in swconfig; DSA uses single CPU port) - Drop unused rgmii_via_gmac2 pin group - Replace swconfig with kmod-dsa-rtl8365mb - Bump DEVICE_COMPAT_VERSION (config migration not possible) - Remove swconfig board setup from 02_network - Disable CONFIG_RTL8367S_GSW in mt7622 kernel config CPU link / bandwidth notes: - Buffalo WSR-2533DHP2 and TOTOLINK A8000RU: already used 2500base-x on gmac0 before this change; aggregate bandwidth stays the same. - ELECOM WRC-2533GENT: gmac0 moves from SGMII (1G) to 2500base-x (HSGMII). The swconfig setup previously used two 1G CPU links (gmac0 + gmac1) for 2 Gbps aggregate; DSA collapses this to a single 2.5 Gbps link. MAC address assignment notes: - Buffalo WSR-2533DHP2: WAN uses base MAC + 1, gmac0/LAN uses base MAC (previously the WAN MAC existed on the implicit eth1/gmac1 interface) - ELECOM WRC-2533GENT: WAN inherits CPU MAC via DSA conduit (original gmac1 had no nvmem-cells assignment) - TOTOLINK A8000RU: WAN reuses macaddr_factory_24 (previously gmac1) Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt/openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
All mt7622 devices using the RTL8367S switch have been migrated to the generic rtl8365mb DSA driver. Remove the now-unused RTL8367S_GSW driver and disable swconfig in the mt7622 kernel config, since no device in this target needs it anymore. The driver and its Kconfig symbol are shared across the mediatek target, so this also drops the tree-wide files/drivers/net/phy/rtk/ sources and the now-dead "# CONFIG_RTL8367S_GSW is not set" line from the filogic, mt7623 and mt7629 kernel configs. Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt/openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
|
Works fine -- but makes MediaTek flow offloading no longer kick in. However, MT7622 manages to forward 1Gbit/s half-duplex which is anyway the RGMII "router walking on a stick" bottlekneck of that device. ELECOM WRC-2533GENT bootlog after this change: |
|
The CPU↔switch trunk on this board is 2.5Gbps HSGMII now, not 1G RGMII — confirmed by both the DSA commit message and the boot log ( |
|
Even better 🥳 Only now seeing the switch is connected on the SerDes interface of MT7622 rather than the RGMII, and part of this PR is to have a switch driver which can setup the CPU port to run with 2500Base-X (ie. RealTek HSGMII without in-band auto-negotiation), while previous it was using SGMII with the old swconfig driver. |
Migrate Buffalo WSR-2533DHP2, ELECOM WRC-2533GENT and TOTOLINK A8000RU from swconfig to DSA. These devices use an external Realtek RTL8367S switch handled by the rtl8365mb DSA driver. Per-device changes: - Drop the proprietary mediatek,rtk-gsw node - Add realtek,rtl8365mb DSA switch with ports lan1-lan4, wan and CPU - Move CPU port to gmac0 at 2500base-x (HSGMII) - Remove gmac1 (was 5u@eth1 in swconfig; DSA uses single CPU port) - Drop unused rgmii_via_gmac2 pin group - Replace swconfig with kmod-dsa-rtl8365mb - Bump DEVICE_COMPAT_VERSION (config migration not possible) - Remove swconfig board setup from 02_network - Disable CONFIG_RTL8367S_GSW in mt7622 kernel config CPU link / bandwidth notes: - Buffalo WSR-2533DHP2 and TOTOLINK A8000RU: already used 2500base-x on gmac0 before this change; aggregate bandwidth stays the same. - ELECOM WRC-2533GENT: gmac0 moves from SGMII (1G) to 2500base-x (HSGMII). The swconfig setup previously used two 1G CPU links (gmac0 + gmac1) for 2 Gbps aggregate; DSA collapses this to a single 2.5 Gbps link. MAC address assignment notes: - Buffalo WSR-2533DHP2: WAN uses base MAC + 1, gmac0/LAN uses base MAC (previously the WAN MAC existed on the implicit eth1/gmac1 interface) - ELECOM WRC-2533GENT: WAN inherits CPU MAC via DSA conduit (original gmac1 had no nvmem-cells assignment) - TOTOLINK A8000RU: WAN reuses macaddr_factory_24 (previously gmac1) Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
All mt7622 devices using the RTL8367S switch have been migrated to the generic rtl8365mb DSA driver. Remove the now-unused RTL8367S_GSW driver and disable swconfig in the mt7622 kernel config, since no device in this target needs it anymore. The driver and its Kconfig symbol are shared across the mediatek target, so this also drops the tree-wide files/drivers/net/phy/rtk/ sources and the now-dead "# CONFIG_RTL8367S_GSW is not set" line from the filogic, mt7623 and mt7629 kernel configs. Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
Migrate Buffalo WSR-2533DHP2, ELECOM WRC-2533GENT and TOTOLINK A8000RU from swconfig to DSA. These devices use an external Realtek RTL8367S switch handled by the rtl8365mb DSA driver. Per-device changes: - Drop the proprietary mediatek,rtk-gsw node - Add realtek,rtl8365mb DSA switch with ports lan1-lan4, wan and CPU - Move CPU port to gmac0 at 2500base-x (HSGMII) - Remove gmac1 (was 5u@eth1 in swconfig; DSA uses single CPU port) - Drop unused rgmii_via_gmac2 pin group - Replace swconfig with kmod-dsa-rtl8365mb - Bump DEVICE_COMPAT_VERSION (config migration not possible) - Remove swconfig board setup from 02_network - Disable CONFIG_RTL8367S_GSW in mt7622 kernel config CPU link / bandwidth notes: - Buffalo WSR-2533DHP2 and TOTOLINK A8000RU: already used 2500base-x on gmac0 before this change; aggregate bandwidth stays the same. - ELECOM WRC-2533GENT: gmac0 moves from SGMII (1G) to 2500base-x (HSGMII). The swconfig setup previously used two 1G CPU links (gmac0 + gmac1) for 2 Gbps aggregate; DSA collapses this to a single 2.5 Gbps link. MAC address assignment notes: - Buffalo WSR-2533DHP2: WAN uses base MAC + 1, gmac0/LAN uses base MAC (previously the WAN MAC existed on the implicit eth1/gmac1 interface) - ELECOM WRC-2533GENT: WAN inherits CPU MAC via DSA conduit (original gmac1 had no nvmem-cells assignment) - TOTOLINK A8000RU: WAN reuses macaddr_factory_24 (previously gmac1) Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
All mt7622 devices using the RTL8367S switch have been migrated to the generic rtl8365mb DSA driver. Remove the now-unused RTL8367S_GSW driver and disable swconfig in the mt7622 kernel config, since no device in this target needs it anymore. The driver and its Kconfig symbol are shared across the mediatek target, so this also drops the tree-wide files/drivers/net/phy/rtk/ sources and the now-dead "# CONFIG_RTL8367S_GSW is not set" line from the filogic, mt7623 and mt7629 kernel configs. Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
Migrate Buffalo WSR-2533DHP2, ELECOM WRC-2533GENT and TOTOLINK A8000RU from swconfig to DSA. These devices use an external Realtek RTL8367S switch handled by the rtl8365mb DSA driver. Per-device changes: - Drop the proprietary mediatek,rtk-gsw node - Add realtek,rtl8365mb DSA switch with ports lan1-lan4, wan and CPU - Move CPU port to gmac0 at 2500base-x (HSGMII) - Remove gmac1 (was 5u@eth1 in swconfig; DSA uses single CPU port) - Drop unused rgmii_via_gmac2 pin group - Replace swconfig with kmod-dsa-rtl8365mb - Bump DEVICE_COMPAT_VERSION (config migration not possible) - Remove swconfig board setup from 02_network - Disable CONFIG_RTL8367S_GSW in mt7622 kernel config CPU link / bandwidth notes: - Buffalo WSR-2533DHP2 and TOTOLINK A8000RU: already used 2500base-x on gmac0 before this change; aggregate bandwidth stays the same. - ELECOM WRC-2533GENT: gmac0 moves from SGMII (1G) to 2500base-x (HSGMII). The swconfig setup previously used two 1G CPU links (gmac0 + gmac1) for 2 Gbps aggregate; DSA collapses this to a single 2.5 Gbps link. MAC address assignment notes: - Buffalo WSR-2533DHP2: WAN uses base MAC + 1, gmac0/LAN uses base MAC (previously the WAN MAC existed on the implicit eth1/gmac1 interface) - ELECOM WRC-2533GENT: WAN inherits CPU MAC via DSA conduit (original gmac1 had no nvmem-cells assignment) - TOTOLINK A8000RU: WAN reuses macaddr_factory_24 (previously gmac1) Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt/openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
All mt7622 devices using the RTL8367S switch have been migrated to the generic rtl8365mb DSA driver. Remove the now-unused RTL8367S_GSW driver and disable swconfig in the mt7622 kernel config, since no device in this target needs it anymore. The driver and its Kconfig symbol are shared across the mediatek target, so this also drops the tree-wide files/drivers/net/phy/rtk/ sources and the now-dead "# CONFIG_RTL8367S_GSW is not set" line from the filogic, mt7623 and mt7629 kernel configs. Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt/openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
Migrate Buffalo WSR-2533DHP2, ELECOM WRC-2533GENT and TOTOLINK A8000RU from swconfig to DSA. These devices use an external Realtek RTL8367S switch handled by the rtl8365mb DSA driver. Per-device changes: - Drop the proprietary mediatek,rtk-gsw node - Add realtek,rtl8365mb DSA switch with ports lan1-lan4, wan and CPU - Move CPU port to gmac0 at 2500base-x (HSGMII) - Remove gmac1 (was 5u@eth1 in swconfig; DSA uses single CPU port) - Drop unused rgmii_via_gmac2 pin group - Replace swconfig with kmod-dsa-rtl8365mb - Bump DEVICE_COMPAT_VERSION (config migration not possible) - Remove swconfig board setup from 02_network - Disable CONFIG_RTL8367S_GSW in mt7622 kernel config CPU link / bandwidth notes: - Buffalo WSR-2533DHP2 and TOTOLINK A8000RU: already used 2500base-x on gmac0 before this change; aggregate bandwidth stays the same. - ELECOM WRC-2533GENT: gmac0 moves from SGMII (1G) to 2500base-x (HSGMII). The swconfig setup previously used two 1G CPU links (gmac0 + gmac1) for 2 Gbps aggregate; DSA collapses this to a single 2.5 Gbps link. MAC address assignment notes: - Buffalo WSR-2533DHP2: WAN uses base MAC + 1, gmac0/LAN uses base MAC (previously the WAN MAC existed on the implicit eth1/gmac1 interface) - ELECOM WRC-2533GENT: WAN inherits CPU MAC via DSA conduit (original gmac1 had no nvmem-cells assignment) - TOTOLINK A8000RU: WAN reuses macaddr_factory_24 (previously gmac1) Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
All mt7622 devices using the RTL8367S switch have been migrated to the generic rtl8365mb DSA driver. Remove the now-unused RTL8367S_GSW driver and disable swconfig in the mt7622 kernel config, since no device in this target needs it anymore. The driver and its Kconfig symbol are shared across the mediatek target, so this also drops the tree-wide files/drivers/net/phy/rtk/ sources and the now-dead "# CONFIG_RTL8367S_GSW is not set" line from the filogic, mt7623 and mt7629 kernel configs. Signed-off-by: Mieczyslaw Nalewaj <[email protected]> Link: openwrt#24861 Signed-off-by: Jonas Jelonek <[email protected]>
Migrates selected MT7622 boards from the legacy RTL8367S/swconfig driver to the RTL8365MB DSA driver.
Changes:
Requires testing on real hardware.
Behavior change on ELECOM WRC-2533GENT: this board's SoC-side SerDes link moves from SGMII (1G) to HSGMII (2.5G) as part of the DSA conversion, unlike the Buffalo and TOTOLINK boards, which already ran their CPU-facing link at 2500base-x before this PR. The RTL8367S EXT0 <-> MT7622 gmac0 lane on this board has not been confirmed to train at HSGMII; if it does not, the board loses connectivity entirely instead of degrading to 1G. This board should be the first to receive hardware testing before merge.