U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: Jonas Karlman <jonas@kwiboo.se>
Cc: kever.yang@rock-chips.com, sjg@chromium.org,
	philipp.tomsich@vrull.eu, trini@konsulko.com,
	arnaud.patard@collabora.com, quentin.schulz@cherry.de,
	naoki@radxa.com, u-boot@lists.denx.de, jonas@kwiboo.se
Subject: Re: [PATCH v2 0/4] Add support for RAM boot from maskrom mode
Date: Sat, 05 Apr 2025 18:02:37 +0200	[thread overview]
Message-ID: <8734emy4te.fsf@bloch.sibelius.xs4all.nl> (raw)
In-Reply-To: <20250405153832.1427549-1-jonas@kwiboo.se> (message from Jonas Karlman on Sat, 5 Apr 2025 15:38:20 +0000)

> From: Jonas Karlman <jonas@kwiboo.se>
> Date: Sat,  5 Apr 2025 15:38:20 +0000
> 
> The BootROM in Rockchip SoCs will enter maskrom mode when boot firmware
> cannot be found in nand/spi/mmc storage.
> 
> In maskrom mode the USB OTG port can accept one of two custom commands.
> 
> Initially a 0x471 command to load TPL into SRAM. After TPL has been
> executed and it has returned back-to-BROM, a 0x472 command to load SPL
> into start of DRAM.
> 
> This series adds two binman images that can be used to RAM boot from
> maskrom mode:
> - u-boot-rockchip-usb471.bin that contains TPL to init DRAM.
> - u-boot-rockchip-usb472.bin that contains SPL and the normal FIT
>   payload with i.e. U-Boot proper, TF-A and FDT.
> 
> These images can be used with rkbin tools/boot_merger to create a loader
> image to be used with rkdeveloptool or rockusb tools, e.g.:
> 
>   Create loader image:
>     $ ../rkbin/tools/boot_merger ./RK3588MINIALL.ini
> 
>   Boot from maskrom:
>     $ rkdeveloptool db u-boot-rockchip-rk3588-loader.bin
>    or
>     $ rockusb download-boot u-boot-rockchip-rk3588-loader.bin
> 
> Or directly with tools such as rkflashtool or rkusbboot:
> 
>   $ rkflashtool l < u-boot-rockchip-usb471.bin
>   $ rkflashtool L < u-boot-rockchip-usb472.bin
>  or
>   $ rkusbboot u-boot-rockchip-usb471.bin u-boot-rockchip-usb472.bin

Hi Jonas,

Would be great if you could document this, maybe in
doc/README.rockchup and/or doc/board/rockchip/rockchip.rst?

Thanks,

Mark

> Changes in v2:
> - Rebase on top of "rockchip: binman: Use a template for FIT and other
>   improvements" series
> - Add patch to fix booting into Linux on RK3588 board with 16+ GiB DRAM
> 
> This series depends on the "rockchip: ROCKCHIP_COMMON_STACK_ADDR
> improvements" series [1] and the "rockchip: binman: Use a template for
> FIT and other improvements" series [2]. See [3] for a branch including
> both depends.
> 
> [1] https://patchwork.ozlabs.org/cover/2050003/
> [2] https://patchwork.ozlabs.org/cover/2066701/
> [3] https://source.denx.de/u-boot/contributors/kwiboo/u-boot/-/commits/ramboot-v2
> 
> Jonas Karlman (4):
>   rockchip: Move TEXT_BASE to 8 MiB offset from start of DRAM
>   rockchip: Add support for RAM boot from maskrom mode
>   rockchip: Enable RAM boot using ROCKCHIP_MASKROM_IMAGE
>   rockchip: sdram: Add fallback that fixup DRAM gaps on RK3588
> 
>  arch/arm/dts/rockchip-u-boot.dtsi       | 33 +++++++++++++++++++++++++
>  arch/arm/mach-rockchip/Kconfig          | 19 +++++++++++---
>  arch/arm/mach-rockchip/rk3308/Kconfig   |  3 ---
>  arch/arm/mach-rockchip/rk3568/Kconfig   |  3 ---
>  arch/arm/mach-rockchip/rk3588/Kconfig   |  3 ---
>  arch/arm/mach-rockchip/rk3588/rk3588.c  | 27 ++++++++++++++++++++
>  arch/arm/mach-rockchip/sdram.c          |  7 +++++-
>  arch/arm/mach-rockchip/spl-boot-order.c | 15 ++++++++---
>  boot/Kconfig                            |  3 +++
>  9 files changed, 97 insertions(+), 16 deletions(-)
> 
> -- 
> 2.49.0
> 
> 

  parent reply	other threads:[~2025-04-05 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-05 15:38 [PATCH v2 0/4] Add support for RAM boot from maskrom mode Jonas Karlman
2025-04-05 15:38 ` [PATCH v2 1/4] rockchip: Move TEXT_BASE to 8 MiB offset from start of DRAM Jonas Karlman
2025-05-08  2:44   ` Kever Yang
2025-04-05 15:38 ` [PATCH v2 2/4] rockchip: Add support for RAM boot from maskrom mode Jonas Karlman
2025-05-08  3:06   ` Kever Yang
2025-05-08 23:23     ` FUKAUMI Naoki
2025-04-05 15:38 ` [PATCH v2 3/4] rockchip: Enable RAM boot using ROCKCHIP_MASKROM_IMAGE Jonas Karlman
2025-04-05 15:38 ` [PATCH v2 4/4] rockchip: sdram: Add fallback that fixup DRAM gaps on RK3588 Jonas Karlman
2025-04-05 16:02 ` Mark Kettenis [this message]
2025-04-06 22:48   ` [PATCH v2 0/4] Add support for RAM boot from maskrom mode Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734emy4te.fsf@bloch.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=arnaud.patard@collabora.com \
    --cc=jonas@kwiboo.se \
    --cc=kever.yang@rock-chips.com \
    --cc=naoki@radxa.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=quentin.schulz@cherry.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox