Re: [net-next PATCH 06/10] net: dsa: realtek: rtl8365mb: add VLAN support
From: Gabor Juhos
Date: Tue Apr 28 2026 - 06:07:08 EST
Hi Luiz, Linus,
Sorry for the late reply.
>
>>> 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.
I wrote the rtl8367 driver for the RTL8367R and RTL8367M switches. I have
no datasheet for those chips, but there are some basic information about
their features [1].
The driver was based on various code found in GPL sources of the TP-Link
TL-WR2543ND and ASUS RT-N56U devices. Those sources were using the RTL8370
specific API for these chips.
It was not clear that the two models really belongs to the RTL8370 family
or simply the vendors were using the RTL8370 specific code as a base, so
I have used RTL8367 prefix in the swconfig driver. Probably, it would have
been better to keep the RTL8370 prefix to avoid confusion.
>
> 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?
I have no documentation, but the RTL8370 API source can be found at various
places [2], [3].
To be honest, I don't remember all the details, but I hope that this helps.
Regards,
Gabor
[1] http://semitron.co.kr/product/product.php?lcate=001&mcate=005&scate=004&uid=47&PHPSESSID=ec195486d91ed175f698567462571180
[2] https://github.com/cgoder/openwrt_rtk/tree/master/rtk_openwrt_sdk/target/linux/rtkmipsel/files/drivers/net/rtl819x/RTL8370_RTL8367_API
[3] https://github.com/andy-padavan/rt-n56u/tree/master/uboot/mips/uboot-5.x.x.x/drivers/rtl8367/api_8370