Tips on porting a board from older u-boot versions

Peter Geis pgwipeout at gmail.com
Wed Feb 23 23:43:47 CET 2022


On Wed, Feb 23, 2022 at 5:13 PM Jayson Reis <santosdosreis at gmail.com> wrote:
>
> Hey there folks,

Good Evening,

> I just have at hands a board from Radxa, called Rock 3-A which has a rockchip RK3568, and they do provide a version of u-boot but rather old.
> As a fun side project, I am trying to port all things to the current master.
> I am still at really early stages, got a minimum .config that compiles for that board and using their provided TPL, I can load my compiled version of u-boot's SPL.
> After doing this, some questions came which I could not find on the docs or some other good resource for really beginners in all this embedded world.
> First, the initial SPL problem is because the DRAM is not configured, and I saw that there is a driver for that chip that uses dts for its configuration:
>
> drivers/ram/rockchip/sdram_rk3568.c
> static const struct udevice_id rk3568_dmc_ids[] = {
>         { .compatible = "rockchip,rk3568-dmc" },
>         { }
> };
>
> But searching the code, I could not find any dts that configures it that way, from where should I get this information? In some chips I found this configuration in .c, and .h files, ideally, where should they go?
> Also, about the dts, what is the right way to write them in the sense of, how do you find out the peripherals and their configuration? Is it from a data sheet or something like that?
> If you can point to any other documentation for beginners on how to port boards, it will be much appreciated.

rk356x support in mainline isn't currently viable, though it is close.

You may want to check out my gitlab, which maintains my currently out
of tree patches:
https://gitlab.com/pgwipeout/u-boot-quartz64

I recently submitted the first batch, which includes some fixes for
rk356x including ram detection (which is really broken currently).

Also, for building examples, check out my CI:
https://gitlab.com/pgwipeout/quartz64_ci

> Thank you in advance,
> Jayson

Very Respectfully,
Peter Geis


More information about the U-Boot mailing list