[PATCH v2 0/3] rpi5: initial support

Peter Robinson pbrobinson at gmail.com
Wed Nov 22 20:51:36 CET 2023


Hi Dmitry,

> These patches bring initial boot support for RPI5. Without it the

I've given these a cursory look over, I have a system to test and will
give them a whirl in the next few days, I was planning to start
playing over the weekend so you've provided a great start :)

> latest master fails with the message:
> > DRAM:  mbox: Timeout waiting for response
> > bcm2835: Could not query ARM memory size
>
> With those patches and rpi_arm64_defconfig (with disabled
> CONFIG_VIDEO_BCM2835) I'm able to get a working u-boot prompt (over
> serial). FDT comes from firmware (EEPROM).
>
> > U-Boot 2024.01-rc3-00003
> >
> > DRAM:  1016 MiB (effective 8 GiB)
> > mbox: Header response code invalid
> > bcm2835: Could not query board revision
> > FDT model : Raspberry Pi 5 Model B Rev 1.0
> > Core:  14 devices, 7 uclasses, devicetree: board
> > MMC:
> > Loading Environment from FAT... ** Bad device specification mmc 0 **
> > In:    serial,usbkbd
> > Out:   serial,vidconsole
> > Err:   serial,vidconsole
> > Net:   No ethernet found.
> > starting USB...
> > No working controllers found
> > Hit any key to stop autoboot:  0
> > No working controllers found
> > No ethernet found.
> > No ethernet found.
> > U-Boot>
>
> These patches are based on v2024.01-rc3 and tested with RPI5 8GB.
>
> Known issues:
> * CONFIG_VIDEO_BCM2835 doesn't work.

When you say it doesn't work, does it just not output display or does
the device lock up and you need to disable it?

For the rpi4 it was as simple as adding a new compatible [1] for the
rev6 of the IP block as for the bits that we use in U-Boot nothing
changed, but the kernel changes for the rev7 that's in the RPi5 needed
updating registers [2] so I'm not sure if we're going to need to do
more for this or not.

> * MBOX get board revision (0x10002) doesn't work (the response status
> is 0x8000_0001). Looks like a number of tags doesn't work anymore
> (board/serial/MAC) but could be fetched from FW FDT.

Might be worth looking to see if there's changes in the kernel for
this. In an initial look I didn't see any changes to their kernel
here.

We probably need a patch to the identifier too similar to the following:
https://source.denx.de/u-boot/u-boot/-/commit/5e7e6619c85c090f6b62685a9d90f748f1729d12

Also probably worth adding a note about reviewing support in bcmstb_sdhci.c

Regards,
Peter

> v2:
>   explicitly set .data section for rpi_bcm283x_mbox_addr due to relocation issue
>   update memory map with VPU range
>   add a patch to get human readable model from FW FDT
>
> Dmitry Malkin (3):
>   rpi5: add initial memory map for bcm2712
>   rpi5: add alternative way to get MBOX address via FDT node
>   rpi5: get_board is no longer works. Print model name from FW FDT
>
>  arch/arm/mach-bcm283x/include/mach/base.h |  1 +
>  arch/arm/mach-bcm283x/include/mach/mbox.h |  4 +--
>  arch/arm/mach-bcm283x/init.c              | 40 ++++++++++++++++++++++-
>  board/raspberrypi/rpi/rpi.c               |  6 ++++
>  4 files changed, 48 insertions(+), 3 deletions(-)

[1] https://source.denx.de/u-boot/u-boot/-/commit/0059ef0be903a1f0a9afe5259fb2e0874f78a8ac
[2] https://lists.freedesktop.org/archives/dri-devel/2023-October/428453.html


More information about the U-Boot mailing list