Current status
Kernel support
The platform is available upstream as a `MIPS_GENERIC` based MIPS architecture. This allows leveraging existing MIPS, DT,… kernel frameworks. Only some basic CPU peripherals are supported.
OpenWrt
In OpenWrt, the platform is still a custom MIPS architecture. More features are supported, but most code needs to be cleaned up or reworked before it can be submitted upstream. Discussion at https://forum.openwrt.org/t/support-for-rtl838x-based-managed-switches/57875/.
Bugs can be reported on the OpenWrt GitHub
Merged upstream
REALTEK_RTL / Realtek Otto
- base system: merged for 5.12-rc1
- IRQ driver: merged for 5.12-rc1
- IRQ fixes in 5.17-rc2, 5.16.5, 5.15.19: map control data to virq, fix off-by-one in routing
- IRQ handling improvement in 5.17-rc2, 5.16.7, 5.15.24: clear all pending interrupts
- SPI driver: merged for 5.12-rc1
- built-in GPIO driver: merged for 5.13 start of series
- RTL930x and RTL931x merged for 5.19, starting at 06a6a774f6b8
- I/O fixes merged for 6.0 and 5.19.8
Generic upstream changes
Under review
- RTL8231 GPIO driver (stalled): RFC, MFD v1, v2, v3, v4, MFD v5 MDIO regmap interface merged for 5.14
Work-in-progress
- SOC/chipid driver (svanheule)
- sys-led driver (svanheule)
- port led driver (svanheule)
Help needed
- Reset driver
- Reset bits for various subsystems in the SoCs are available, in different places per series. Instead of drivers toggling these common registers, Linux reset subsystem driver would make sense.
-
- Should probably be implemented as an MFD, with the MFD core driver unlocking the protected registers.
- Need MDIO, DSA, phy driver etc.
- Probably best to port bit by bit from OpenWrt to staging, to get extra exposure. After things mature enough, drivers can be moved to the relevant subsystems.
Note, that a lot of merged drivers need some love and some refactoring, both upstream and in the openwrt repositories …
Kernel development setup
- Get buildroot from https://buildroot.org
- Clone a kernel git repo from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
- Get devconfig.tgz, and move the config files there to `.config` in the two directories above. In the Linux
.config
file, change `CONFIG_INITRAMFS_SOURCE` to the appropriate path for your buildroot. Drop the `build` script in your Linux directory. - Do a
make
in your buildroot directory, and./build
in your Linux directory. It drops the resulting image in/tftp/img
, adjust as needed.
Helpful links
- Some datasheets are here
OpenWrt
RTL838x: complete
RX/TX by the Ethernet driver works, including QoS and prioritization queues, all L2 functionality is implemented, all PHYs are supported, complete support for SFP cages and LEDs available
RTL839x: mostly complete
RX/TX by the Ethernet driver works, including QoS and prioritization queues, all L2 functionality is implemented. Support for the 10Gig SFP+ modules of the 8396 is not available, LEDs only work when configured by u-boot. Some PHYs not supported (e.g.RTL8214QF is not supported, but GPL-dump is available).
RTL930x: mostly complete
RX/TX by the Ethernet driver works, all L2 functionality is implemented. QoS and Rate control is missing, there is no support for the SFP+ cages. PHY support: RTL8218D works and RTL8266 2.5-gig PHY. The Aquantia multi-gig phys are unsupported (upcoming Zyxel XGS1250-10), but GPL code available. GPIOs and LEDs are supported.
RTL931x: initial support only
The Zyxel XS 1930 boots, but GIC irq is not working, only internal timer IRQs, TX/RX code ported but not tested, some L2 code ported, Aquantia PHYs are unsupported, but GPL code available