[PATCH 0/2] Command for entering mask rom USB download mode

Andre Przywara andre.przywara at arm.com
Mon Jul 4 00:22:51 CEST 2022


On Sun,  3 Jul 2022 21:20:20 +0200
Michal Suchanek <msuchanek at suse.de> wrote:

Hi,

> many ARM SoCs have a mask rom feature that provides interface for
> downloading firmware over USB.
> 
> Downstream rockchip u-boot has 'brom' or 'rbrom' command for this
> purpose, and downstream sunxi u-boot provides 'efex' command. p-boot has
> code for entering FEL on A64 SoC.

Thanks for bringing this up. We have discussed several options before,
including some true FEL reset commands, which do not depend on the SPL
doing the branch.
But I guess we can just start with this one and expand it from there.
 
> With this patch I am able to activate the USB downloader on a rk3399 but
> the rkflashtool fails to communicate with the device. On a H2+ I can get
> into the FEL mode and get flash parameters. YMMV
> 
> I don't have any great idea how to structure this so that the command
> does not need platform-specific code. Is there an example of a command
> that has platform-specific implementations?

I don't think that's a problem: there are already platform specific
commands, you just put them in a separate file and mark them as
"depends on ARCH_SUNXI" (or whatever) in cmd/Kconfig and be done. No
need to boil the ocean here in trying to be generic.
That's why I wouldn't put them in cmd/boot.c, especially since you
don't seem to share any code?

For more details see the reply to the actual (sunxi) patch.

Cheers,
Andre

> 
> Thanks
> 
> Michal
> 
> Andy Yan (1):
>   cmd: boot: add brom cmd to reboot to brom dnl mode
> 
> Michal Suchanek (1):
>   cmd: boot: add brom cmd to reboot to FEL mode
> 
>  .../arm/include/asm/arch-rockchip/boot_mode.h |  1 +
>  arch/arm/include/asm/arch-sunxi/cpu.h         | 11 ++++++
>  arch/arm/mach-sunxi/Kconfig                   | 18 ++++++++++
>  arch/arm/mach-sunxi/board.c                   | 24 +++++++++++++
>  cmd/boot.c                                    | 35 +++++++++++++++++++
>  5 files changed, 89 insertions(+)
> 



More information about the U-Boot mailing list