Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC
This patch adds a realtek-smi subdriver for the RTL8365MB-VC 4+1 port 10/100/1000M Ethernet switch controller. The driver has been developed based on a GPL-licensed OS-agnostic Realtek vendor driver known as rtl8367c found in the OpenWrt source tree. Despite the name, the RTL8365MB-VC has an entirely different register layout to the already-supported RTL8366RB ASIC. Notwithstanding this, the structure of the rtl8365mb subdriver is based on the rtl8366rb subdriver and makes use of the rtl8366 helper library for VLAN configuration. Like the 'rb, it establishes its own irqchip to handle cascaded PHY link status interrupts. The RTL8365MB-VC is a capable switch and provides a number of offload features that are not yet supported by this subdriver. However, the basic functionality should be the same as that the rtl8366rb, modulo LED support, Energy-Efficient Ethernet (EEE), and MTU configuration. Support for these features - and more - may follow. One more thing. Realtek's nomenclature for switches makes it hard to know exactly what other ASICs might be supported by this driver. The vendor driver goes by the name rtl8367c, but as far as I can tell, no chip actually exists under this name. As such, the subdriver is named rtl8365mb to emphasize the potentially limited support. But it is clear from the vendor sources that a number of other more advanced switches share a similar register layout, and further support should not be too hard to add given access to the relevant hardware. With this in mind, the subdriver has been written with as few assumptions about the particular chip as is reasonable. But the RTL8365MB-VC is the only hardware I have available, so some further work is surely needed. Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> Co-developed-by: Michael Rasmussen <mir@bang-olufsen.dk> Signed-off-by: Michael Rasmussen <mir@bang-olufsen.dk>
- Loading branch information