2

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

 1 year ago
source link: https://www.collabora.com/news-and-blog/blog/2023/05/18/radxa-rock-5b-pcie-rtl8125b-networking-uboot/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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

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 

Rock-5B-description.png
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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK