u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* Tips on porting a board from older u-boot versions
@ 2022-02-23 17:56 Jayson Reis
  2022-02-23 22:43 ` Peter Geis
  0 siblings, 1 reply; 2+ messages in thread
From: Jayson Reis @ 2022-02-23 17:56 UTC (permalink / raw)
  To: u-boot

Hey there folks,
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.
Thank you in advance,
Jayson

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tips on porting a board from older u-boot versions
  2022-02-23 17:56 Tips on porting a board from older u-boot versions Jayson Reis
@ 2022-02-23 22:43 ` Peter Geis
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Geis @ 2022-02-23 22:43 UTC (permalink / raw)
  To: Jayson Reis; +Cc: U-Boot Mailing List

On Wed, Feb 23, 2022 at 5:13 PM Jayson Reis <santosdosreis@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-23 22:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 17:56 Tips on porting a board from older u-boot versions Jayson Reis
2022-02-23 22:43 ` Peter Geis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).