We're hiring!
*

Upstream support for Rockchip's RK3588: Progress and future plans

Sebastian Reichel avatar

Sebastian Reichel
December 20, 2024

Share this post:

Reading time:

The Rockchip RK3588 upstream support has progressed a lot over the last few years. As 2024 comes to a close, it is a great time to have a look at the recent changes, work in progress, and the current state in general. Note that open source software is a community effort and not all work has been done by Collabora. This blog post will cover everyone's work just like in our RK3588 upstream status matrix.

At the start of this year the 6.7 kernel was released. This version finally had the necessary bits to have network support on the Radxa ROCK 5B. Apparently Ethernet support for the Rockchip RK3588 had been merged much earlier, but some boards - including the ROCK 5B - decided to ignore the chip's Ethernet functionality and instead went for a PCIe-based network card to get 2.5 Gigabit Ethernet (native Ethernet only supports 1 Gigabit). Even though the RK3588 uses a DesignWare-based PCIe controller, which has been well supported by the mainline kernel for many years, enabling PCIe took some time. PCIe requires interrupt messages from devices to be translated into proper interrupts, and the RK3588 has a Generic Interrupt Controller (GIC), which supports doing this operation, but its platform integration requires some quirks, and discussing them with all involved parties took time.

Later on the 6.8 kernel release happened. In this version we managed to enable the first of three USB3 controllers. The specific instance could be enabled first because it uses the same PHY as some of the PCIe controllers. Apart from that, Andy Yan from Rockchip was active and enabled basic support for the display controller VOP (video output controller), which is needed for any display-related support such as HDMI, DisplayPort, or DSI. At this point Cristian Ciocaltea was already busy cleaning up the HDMI output driver and getting it ready for upstream.

In the 6.9 kernel release, the first bits of Cristian's work landed upstream: The HDMI PHY is handled in a separate driver and got initial basic support. For actually supporting HDMI displays, that just leaves the HDMI controller itself. Unfortunately that is a lot more complex than the PHY and it has not yet landed.

Following that in 6.10 - still without display support - the chip's GPU got support, allowing 3D accelerated graphics. A whole team at Collabora lead by Erik Faye-Lund and Boris Brezillon worked on the driver for the Mali G610, which is the embedded GPU in the RK3588. Details about the kernel driver can be found in a prior blog post about Panthor; their XDC talk also covers the userspace side. Apart from that, Sebastian Reichel finished upstreaming the USBDP PHY, which is used by the other two USB3 controllers. Thus with 6.10, all USB ports can be used. Aside from USB, the PHY can also handle DisplayPort (mostly intended for USB-C AltMode), but the necessary infrastructure for that has not yet been upstreamed. Also, it's worth mentioning that support for the Rock 5B's USB-C port was not enabled in 6.10 because of the complicated USB-PD setup involved.

Finally in 6.11, CPU frequency scaling arrived for Rockchip's flagship. Alexey Charkov used the Thermal ADC support we upstreamed last year and combined it with the generic cpufreq driver from the Linux kernel and restructured the devicetrees to introduce support for RK3588J, which uses different operating point data than the normal RK3588. It's worth mentioning, that the downstream Kernel from Rockchip is using a more advanced frequency scaling method involving data like the silicon quality. This will be needed to get maximum CPU performance without sacrificing system stability and is something left for the future.

Last but not least, in 6.12 support for a few more accelerators landed: first, the RGA2 block was enabled for usage via Video for Linux 2 by Jianfeng Liu. RGA2 can be used for accelerated 2D graphics operations like scaling, rotation, or alpha blending. Sebastian Reichel finished the work from Emmanuel Gil Peyrot and Jianfeng Liu to enable one of the VEPU121 blocks for JPEG encoding and the VDPU121, which allows hardware-accelerated decoding of VP8, MPEG2, and H264.

What's ahead

While the release will only happen in 2025, the big thing for 6.13 will be HDMI display support. Cristian finally managed to land support for the HDMI controller, which was the last missing piece of the puzzle. For now it's quite limited in its functionality. Work is ongoing to provide more features. The next step is support for more clock rates, which allows more display modes. Right now many display resolutions might not work properly. Afterward, we also plan to provide upstream support for audio and CEC.

Apart from HDMI output, we are also working on the hardware's HDMI capture feature. Shreeya Patel and Dmitrii Osipenko are busy getting a V4L2 driver for it upstream and being fully compliant according to the v4l2-compliance checks. We expect this to land sometime in 2025.

Since the beginning of the year, Heiko Stübner has also been working on a series enabling MIPI DSI support and just recently sent the first versions out for review to the mailing lists.

Last but not least, Detlev Casanova is working on VDPU381 H264 support when he is not busy with the RK3576. That work is currently blocked, requiring analysis of how the IOMMU should be handled. Apart from that, the work is currently missing multi-core support. The hardware has two cores, which can be used to have more bandwidth. The problem is that the scheduling should happen in the kernel and that is missing a scheduler for V4L2 codecs.

One of the big surprises in 2024 was Tomeu Vizoso sending an initial fully open source kernel and Mesa driver based on reverse engineered information for the neural processor unit included in the RK3588. Hopefully this will also land next year.

Not only was the Linux kernel further developed, some things also happened in the earlier steps of the boot process. In U-Boot most of the SoC support already landed last year. One missing bit was support for the USB-PD handling. Some Rockchip boards require early USB-PD handling, and thus the U-Boot version from Rockchip contains some code to handle it. After a heavy rework from Sebastian Reichel, this also landed in the U-Boot master branch but will only arrive in the 2025.01 release.

Other than that, Rockchip provided an open source version for the Trusted Firmware-A (TF-A), which got merged and should become part of the v2.12 release. On the boot side that just leaves the DDR memory training a closed source binary.

All in all this was a great year for improving the RK3588 upstream support and the outlook looks even better!

 

Comments (1)

  1. Heiko Stuebner:
    Dec 20, 2024 at 08:40 PM

    Just two additions :-)

    For DSI support I'm hopefully this will land in 6.14 and for the broader landscape, RK3588 support in OP-TEE was merge some days ago (https://github.com/OP-TEE/optee_os/pull/7059)

    Reply to this comment

    Reply to this comment


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


 

Search the newsroom

Latest News & Events

Upstream support for Rockchip's RK3588: Progress and future plans

20/12/2024

The Rockchip RK3588 upstream support has progressed a lot over the last few years. As 2024 comes to a close, it is a great time to have…

Academically inclining at NeurIPS 2024

09/12/2024

Collabora will be at NeurIPs this week to dive into the latest academic findings in machine learning and research advancements that are…

Apertis v2024: the new Bookworm-based release for industrial embedded devices

05/12/2024

Now based on Debian Bookworm, Apertis is a collaborative OS platform that includes an operating system, but also tools and cloud services…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2024. All rights reserved. Privacy Notice. Sitemap.