Re: [net-next PATCH 06/10] net: dsa: realtek: rtl8365mb: add VLAN support
From: Luiz Angelo Daros de Luca
Date: Mon Apr 27 2026 - 14:12:17 EST
Hi Linus,
> > I haven't yet wrapped my head around if the RTL8367 (no extra letters)
> > is more RTL8366RB-ish or more RTL8365MB-ish... take a look at the
> > old code if you can figure it out from register maps etc:
> > https://github.com/openwrt/openwrt/tree/main/target/linux/generic/files/drivers/net/phy
> > (maybe Gabor knows, put him on cc)
Regarding the RTL8367 (no extra letters), the RTL8367R is indeed a
member of that original family, rather than the "B" family as I
previously suggested. It uses Port 9 for the CPU, which is absent in
RTL8367B. Architecturally, it is definitely more RTL8365MB-ish.
The main challenge with the base RTL8367 is the lack of a public API.
Most vendors support it via binary managers (ASUS) or proprietary
kernel modules (TP-Link). The only available references I’ve found are
the OpenWrt swconfig driver you mentioned and some U-Boot
initialization code. I do have the rtl8367{b,c,d} APIs. While the
rtl8367b seems close to the original RTL8367, it has fewer ports. Does
anyone happen to have access to the original RTL8367 API
documentation?
In any case, I’ve successfully reverse-engineered the table access
functions and format, which are similar to the rtl8367b, to the point
where I have the rtl8365mb driver running on an RTL8367R. I also
managed to enable CPU tagging, and it is currently functional using
the rtl8_4 tag. The code still needs some cleanup, support for
additional features (like LEDs) and a lot of tests, but it’s looking
promising. Adding support for the RTL8367 variant should make adding
RTL8367B or RTL8367D support much easier in the future.
Regards,
Luiz