Support for RTL838x based managed switches

@svanheule please let me know what I can do to assist.

Interesting, I actually like the datasheet of the RTL931X more than the RTL930X. Did brainslayer find a manufacture, or what brand / model has the RTL931X? Also I looked on DD-WRT's website, but didn't find any mention of this. I actually though that DD-WRT merged with OpenWRT? Is DD-WRT a competing OS to Open-WRT?

A datasheet documenting the I2C interface of these PSE chips would be the preferred option by far.

Otherwise you have to start looking at decompiled code, and capture I2C traces with a logic analyser. Then you just have a big box of puzzle pieces, and it takes a long time to put everything together into something consistent.

There are a couple of such devices known. For example the Zyxel XS1930-10 (8x10GBit + 2 SFP+), also the EdgeCore ECS4125-10P (8x2.5GBit + 2 SFP+). The issue is that the price tags are quite serious. The 10P devices are at about 400-600 Euros and the big switches with up to 52 ports cost several thousand Euros. There are also considerable issues with availability. The NETGEAR MS510TXP which has PoE and is < 400 Euros with an interesting mix of multi-gig ports seems to be not available in Europe since over a year. Compare that to the ridiculous price of the Zyxel XS1930-12HP of nearly 1000Euros, nearly 600 Euros just for PoE.

@anon13997276 Thanks for the information. Sounds like the RTL931X is too expensive and hard to find for my needs. The RTL930X seems to be the sweet spot for me.

At $200-225 for this switch with 24 POE ports and 4 10G uplinks, it seems hard to beat.

However, what other RTL9301 24 or 48 port switches have been tested, that do have the proper PSE / POE chipset? Is only the Broadcom PoE chipset currently supported, or TI or any others?

Maybe a bit of a background on the different SoCs:

1st Generation of Chips with very limited offloading capabilities:
RTL8380: Up to 24 GigPorts + 4SFP Ports
RTL8390: Same technology as RTL8380, but up to 48 Gig Ports + 4 SFP Ports

2nd Generation Chips with L3 offloading and multi-gig capabilities:
RTL9300: Up to 24 Multi-GBit ports (or 48 1Gbit ports) + 4 SFP+ ports
RTL9310: Up to 48 Multi-GBit ports + 4 SFP+ ports, dual core Mips Interaptive

You can find an (incomplete?) overview of these chips here:
https://www.realtek.com/en/products/communications-network-ics/category/managed-switch-controller
L2 manged: RTL83xx, L3 managed: RTL93xx
The total available bandwidth for the Ethernet ports on the 93xx is not clear to me, there does not appear to be e.g. an RTL931x 48x10Gbit configuration, but some chips seem to be missing from the overview.

2 Likes

DD-Wrt is a different router firmware project, they use old(er) kernel versions and use proprietary driver from hardware vendor (usually Broadcomm), and have a different web interface.

Just wondering, but looking at the chipsets on this page: https://wikidevi.wi-cat.ru/Realtek/SoC

Wondering if any of the realtek chips under the Unmanaged GbE (10/100/1000 Mbps) section are also supported. Example: RTL8370N. Basically the RTL836X and RTL837X

Most the chips we have been talking about are under the Switch SoC section, and have integrated CPUs.

afaik unmanaged switches are just the switching microcontrollers (think of an Arduino-like microprocessor dedicated to move packets) without a big CPU to run Linux.

They might be controllable over some i2C or SPI or whatever interface by something else (another microcontroller or a CPU running Linux) to do VLANs and other smart switch things, see this for example, that is designed to be soldered on a board and connected to a SoC that will control it https://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=96743

Some of those are integrated in consumer devices like a wifi router, but more and more devices have switching electronics integrated in the SoC with the main CPU now.

If they are used to make an "unmanaged switch" standalone device, there is no CPU or controller on their board.

These unmanaged Chips cannot run software from a flash, there is no DRAM interface. On reset they read configuration values from an EEPROM and off they go. And yes, they can be steered via SPI. There is even an API and SDK that was leaked. In principle the drivers we have could be used if one replaces the writing to the registers to writing to a remote register via SPI. One can even dedicate one Switch port as a CPU-Port.

Take a Raspeberry-Pi, connect it via SPI and to that CPU-Port and you can make a managed Switch out of an unmanaged one. You can basically make a managed switch for half the price with considerably more CPU-Power even. Or think big and put one of the RTL9300 unmanaged devices together with an x86 board into a desktop and you end up with a switch that does Multi-Gig CPU-based Routing and firewalling. I think I saw a project from someone doing that for an older RTL-chip (6502 CPU inside) with an Arduino.

The devil is in the details of course, like you need to solder to traces on the board for that SPI (I looked into that for a small 8-port switch), so I guess the user-community will be limited...

4 Likes

A question, I searched this thread about support for bonding (link aggregation or LAG) or VXLAN.
I think these features are supported in OpenWrt on everything at least in software (on CPU).
I wanted to know if in these devices the switch controller or some other hardware acceleration takes the load or is this done by CPU (and therefore the performance will not be good)?

I see that LAG at least seem to be OK on RTL931x Support for RTL838x based managed switches - #701 by kobi

The original LAG support was actually never tested until recently and there were a couple of bugs found. However, improved LAG support with many additional features has been implemented by brainslayer on top of this:

(see the pie branches).
The work probably needs my current PR for new features as it is built on top of it.

2 Likes

@RaylynnKnight If biot's wiki is correct, you'd own a DGS-1210-10P F1? Another IRC user has an R1 and he believes, going by pictures of both, that GPIO arrangement would be almost identical so a split DTS might be useful for both. Would you mind pinging him on IRC (his nick is PaulFertser) or e-mailing him? See this mailing list post for his e-mail address.

Saw the post. Very busy in day job so haven't had time to respond. I believe from his description the DGS-1210-10P F1 is likely identical to the TRENDnet TPE-082WS which I previously identified as similar to the DGS-1210-10P with 256MB of RAM instead of 128MB. The TRENDnet uses different firmware but the boards are clearly from the same supplier. I should have time this coming weekend to try Paul's patches.

1 Like

I have an ODM that has a RTL9301 model switch. How would one go about having them test if openwrt will load and run on the switch? I have used the openwrt build system before, but this make and model hasn't been defined. Would I just select generic, or what option?

The first thing you should do is to have command line access via a serial console. So far all support for these devices requires that (but so far also all had externally accessible UART/RS232 headers) and then you should post the output of the "show tech-support" command in the original command interface. A photo of the innards is also helpful. This will give an idea how the hardware looks like. You also need to be able to get access to the u-boot bootloader, i.e. interrupt the automatic boot, which sometimes was not easy for the 93xx devices. If you have that we could suggest an initial .dts or maybe an existing image.

Hi all,
Could you pls help me?
Can I use OpenWrt firmware on the POE version of Netgear?

Thank you!

You're linking to the OpenWrt wiki entry for the GS308T. That's a different beast. Do you have access to the specifications of your model?

Yes, I know, I just wanted to provide the link to the existing, supported, similar product. :slight_smile:
This is what I've found:

you very likely cannot. Looking into their firmware download gives:

~/Downloads$ strings GS308EPP_V1.0.0.7.bin|grep -i rtl 
RTL8367N
RTL8367N

The RTL8367N has a different architecture from the RTL83xx/93xx Chips which are supported on OpenWRT. I have seen no datasheets for this particular SoC, but similar ones and they do not mention a MIPS CPU.
However, the GS316EPP could be very interesting:

~/Downloads$ unzip GS316EP_GS316EPP_V1.0.2.4.zip 
Archive:  GS316EP_GS316EPP_V1.0.2.4.zip
  inflating: GS316-V1.0.2.4-runtime.image  
  inflating: GS316EP_V1.0.2.4_Release_Notes.html  
~/Downloads$ binwalk -e GS316-V1.0.2.4-runtime.image

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             uImage header, header size: 64 bytes, header CRC: 0x8BE6E776, created: 2021-05-31 08:30:01, image size: 8677182 bytes, Data Address: 0x80000000, Entry Point: 0x80270DF0, data CRC: 0xCD340460, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: gzip, image name: "GS316EP"
64            0x40            gzip compressed data, maximum compression, has original file name: "vmlinux.bin", from Unix, last modified: 2021-05-31 08:30:01
5121522       0x4E25F2        MySQL ISAM index file Version 8
~/Downloads$ cd _GS316-V1.0.2.4-runtime.image.extracted/
~/Downloads/_GS316-V1.0.2.4-runtime.image.extracted$ strings vmlinux.bin|grep -i rtl
rtl9310_auto_probe_memsize
rtl9300_auto_probe_memsize
RTL839xM
RTL835xM
RTL838xM
RTL833xM
RTL9300
RTL9310
RTL9300 ICTL
RTL9310 ICTL
RTL8390 ICTL
RTL8380 ICTL

For this we could develop support unless the device has a protection against flashing our own system.

1 Like