We're hiring!
*

Radxa Rock-5B PCIe and RTL8125B networking in U-boot

Eugen Hristev avatar

Eugen Hristev
May 18, 2023

Share this post:

Reading time:

The Radxa Rock-5B board uses an external network controller, a RealTek 8125B 2.5 Gbps controller, which is connected to the RK3588 SoC via PCI Express.

The built-in network controller inside the RK3588 is not used on this board. In the U-boot bootloader, currently there is no support for PCI Express for this board, nor for the RealTek 8125B whatsoever.

The goal is to get networking working in U-boot, such that the Linux kernel can be loaded via TFTP or some other network protocol.

For this purpose, support for PCIe 2.0 has now been added: https://marc.info/?l=u-boot&m=168258091432022&w=2 

Hardware description of the Radxa Rock-5B board.
Source: https://wiki.radxa.com/Rock5/hardware/5b

 

This way the PCIe bus is started and devices on the bus are enumerated.

The RTL8169 driver had to be adapted to support the 8125B variant: https://marc.info/?l=u-boot&m=168242860627356&w=2

And now, the networking on the board works at 100 Mbps, which is very good progress, even if the gigabit does not work yet. The important goal is achieved: the network boot works!

And because this is Open Source, implementing the changes into RTl8169 was not so difficult. Reusing the code from the Linux driver, which already supports the 8125B controller, saved a lot of time and effort.

Publishing code as Open Source can benefit many different other projects, such as getting boards and devices up to speed, and allows anyone to benefit. If and when someone is interested in creating a project based on this board, or on this SoC, for a real-world application, a head start is already in place.

 

Comments (4)

  1. Serhii N.:
    Aug 24, 2023 at 10:24 PM

    Hello, are you planning add support for Orange Pi 5 Plus. I have checked schematics of this two boards (Rock Pi5B and Orange Pi 5 Plus) and looks like it almost the same (difference only with PCI-E which used by second network instead, all other things looks the same if I correctly understand)

    For example I just built upstream U-Boot for RockPi 5B and it properly run Debian 12 with Linux 6.4 from eMMC on Orange Pi 5 Plus.

    Reply to this comment

    Reply to this comment

    1. Eugen Hristev:
      Aug 25, 2023 at 01:17 PM

      Hi,

      At the moment I do not have this board available.
      Are you interested in this board on a personal level or you have more in mind ?
      If someone could send me a board, I could definitely have a look at some point if I have some time available.
      Eugen

      Reply to this comment

      Reply to this comment

      1. Serhii N.:
        Aug 27, 2023 at 07:19 PM

        I interested in this board on a personal level. I can not send it (quiet expensive to send it from Ukraine to Europe). I can test it basically or even adapt some parts of your solution (from device tree) from Rock 5B for Orange Pi 5 Plus (but I not sure that I can do it with all parts).
        I have tested upstream U-Boot for Rock 5B on OPI 5 Plush and it works and load upstream kernel 6.4 from Debian. Also found some strange problem with U-Boot, it can not load correctly from SPI (it try to load from e/MMC only).

        Reply to this comment

        Reply to this comment

        1. Eugen Hristev:
          Aug 28, 2023 at 04:07 PM

          If you managed to get your U-boot to work, you can try to send your changes as a patch and add the board yourself.
          If you just hacked around the code and are unable to send something, you will have to wait until someone with the board can do it.
          Regarding the bug which you found, you can send an e-mail to u-boot mailing list and ask the question, maybe someone can figure out if you are doing something wrong, or it's really a bug, in which case someone can try to reproduce and see if it can be fixed

          Reply to this comment

          Reply to this comment


Add a Comment






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


Search the newsroom

Latest Blog Posts

Re-converging control flow on NVIDIA GPUs - What went wrong, and how we fixed it

25/04/2024

While I managed to land support for two extensions, implementing control flow re-convergence in NVK did not go as planned. This is the story…

Automatic regression handling and reporting for the Linux Kernel

14/03/2024

In continuation with our series about Kernel Integration we'll go into more detail about how regression detection, processing, and tracking…

Almost a fully open-source boot chain for Rockchip's RK3588!

21/02/2024

Now included in our Debian images & available via our GitLab, you can build a complete, working BL31 (Boot Loader stage 3.1), and replace…

What's the latest with WirePlumber?

19/02/2024

Back in 2022, after a series of issues were found in its design, I made the call to rework some of WirePlumber's fundamentals in order to…

DRM-CI: A GitLab-CI pipeline for Linux kernel testing

08/02/2024

Continuing our Kernel Integration series, we're excited to introduce DRM-CI, a groundbreaking solution that enables developers to test their…

Persian Rug, Part 4 - The limitations of proxies

23/01/2024

This is the fourth and final part in a series on persian-rug, a Rust crate for interconnected objects. We've touched on the two big limitations:…

Open Since 2005 logo

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

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