summaryrefslogtreecommitdiff
path: root/board/raspberrypi
AgeCommit message (Collapse)Author
2026-03-26rpi: Update the naming for bcm2712 SoC RevD namingPeter Robinson
The downstream Raspberry Pi uses two namings for the revD SoC device trees, both bcm2712d0-rpi-5-b and bcm2712-d-rpi-5-b but it seems upstream has settled on just the later, so lets use that as it's the name that maps both upstream and downstream. Fixes: c15a7919725 ("board/raspberrypi: add bcm2712d0-rpi-5-b for Raspberry Pi 5") Signed-off-by: Peter Robinson <[email protected]> Reviewed-by: Matthias Brugger <[email protected]>
2026-03-12board/raspberrypi: add bcm2712d0-rpi-5-b for Raspberry Pi 5Filip Kokosiński
This commit adds an FDT entry for the d0 stepping of the BCM2712 SoC. This entry is used by the v1.1 revision of the board (revision & 0x0f == 1). Signed-off-by: Filip Kokosiński <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Tested-by: Peter Robinson <[email protected]>
2026-03-12board/raspberrypi: add multi-FDT supportFilip Kokosiński
This patch adds support for multiple FDT files per board model. This is done by adding the FDTFILES macro, which initializes two rpi_model struct members: fdtfiles and fdtcount. The new-style revision codes designate LSB bits as board revision; this value is used to choose between provided FDTs. The first element of the fdtfiles list is used should no revision match. Signed-off-by: Filip Kokosiński <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Tested-by: Peter Robinson <[email protected]>
2026-03-12rpi: pass the Video Core logs DT parameter throughPeter Robinson
Pass the VC logs DT parameter through to the kernel device tree. This is used by the vclog tool and is a useful debugging tool. Signed-off-by: Peter Robinson <[email protected]> Acked-by: Matthias Brugger <[email protected]>
2025-11-28rpi: Fix DRAM size reporting to show total RAMAnders Roxell
The VideoCore mailbox GET_ARM_MEMORY only reports the size of the first accessible memory region (~947 MiB on RPi4 with 8GB), not the total RAM. This causes U-Boot to display "DRAM: 947 MiB (total 7.9 GiB)" instead of "DRAM: 7.9 GiB". On Raspberry Pi 4 with 8GB RAM, the memory is split across multiple non-contiguous banks. The dram_init() function only sets gd->ram_size to the first bank size reported by the VideoCore firmware, while fdtdec_setup_memory_banksize() correctly populates all memory banks from the device tree. Fix this by updating gd->ram_size after dram_init_banksize() has populated all memory banks, so it reflects the actual total RAM across all banks. Signed-off-by: Anders Roxell <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2025-11-25rpi: Use the U-Boot control FDT for fdt_addrSimon Glass
The fdt_addr variable is used in extlinux as a fallback devicetree if none is provided by the boot command. Otherwise the only use in U-Boot seems to me efi_install_fdt() when the internal FDT is required. The existing mechanism uses the devicetree provided to U-Boot, but in its original, unrelocated position. In my testing on an rpi_4, this ends up at 2b35ef00 which is not a convenient place in memory, if the ramdisk is large. U-Boot already deals with this sort of problem by relocating the FDT to a safe address. So use the control-FDT address instead. Remove the existing comment, which is confusing, since the FDT is not actually passed unmodified to the kernel: U-Boot adds various things using its FDT-fixup mechanism. Note that board_get_usable_ram_top() reduces the RAM top for boards with less RAM. This behaviour is left unchanged as there is no other mechanism for U-Boot to handle this. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Christopher Obbard <[email protected]> Tested-by: Christopher Obbard <[email protected]> # CM4 1G
2025-11-25rpi: Fix compilation with larger configsIlias Apalodimas
Tom reports that adding more Kconfig options fails with board/raspberrypi/rpi/lowlevel_init.o: in function `save_boot_params': board/raspberrypi/rpi/lowlevel_init.S:20:(.text+0x0): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against symbol `fw_dtb_pointer' defined in .data section in board/raspberrypi/rpi/rpi.o make: *** [Makefile:2029: u-boot] Error 1 Since fw_dtb_pointer lives in .data it might end up above the +-1MB that adr can reach. So switch over to adrp+add which has a +-4gb reach. Reported-by: Tom Rini <[email protected]> Closes: https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2 Signed-off-by: Ilias Apalodimas <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2025-04-16rpi: Update environment to support booti and large initrdSimon Glass
The existing values don't provide for decompressing an arm64 boot-image. Add those values and move things apart a bit so that a 50MB kernel can be accommodated. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Christopher Obbard <[email protected]> Tested-by: Christopher Obbard <[email protected]> # CM4 1G Reviewed-by: Christopher Obbard <[email protected]> Tested-by: Christopher Obbard <[email protected]> # CM4 1G
2025-04-16rpi: Drop fdt_high and initrd_highSimon Glass
These are not needed now since there is a bootm_size setting to keep things within the lower part of memory. Drop them. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]> Suggested-by: Tom Rini <[email protected]> Reviewed-by: Christopher Obbard <[email protected]> Tested-by: Christopher Obbard <[email protected]> # CM4 1G Reviewed-by: Christopher Obbard <[email protected]> Tested-by: Christopher Obbard <[email protected]> # CM4 1G
2025-04-16rpi: Set bootm_size to 512MBSimon Glass
Set this option so that all boot images stay within the bottom 512MB of memory. This should allow us to drop the fdt_high and initrd_high options. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]> Suggested-by: Tom Rini <[email protected]> Reviewed-by: Christopher Obbard <[email protected]> Tested-by: Christopher Obbard <[email protected]> # CM4 1G
2025-04-16rpi: always set fdt_addr with firmware-provided FDT addressMauro Salvini
Raspberry firmware prepares the FDT blob in memory at an address that depends on both the memory size and the blob size [1]. After commit ade243a211d6 ("rpi: passthrough of the firmware provided FDT blob") this FDT is passed to kernel through fdt_addr environment variable, handled in set_fdt_addr() function in board file. When u-boot environment is persistently saved, if a change happens in loaded FDT (e.g. for a new overlay applied), firmware produces a FDT address different from the saved one, but u-boot still use the saved one because set_fdt_addr() function does not overwrite the fdt_addr variable. So, for example, if there is a script that uses fdt commands for e.g. manipulate the bootargs, boot hangs with error libfdt fdt_check_header(): FDT_ERR_BADMAGIC Removing the fdt_addr variable in saved environment allows to boot. With this patch set_fdt_addr() function always overwrite fdt_addr value. [1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&t=134018 Signed-off-by: Mauro Salvini <[email protected]> Cc: Cédric Schieli <[email protected]> Cc: Matthias Brugger <[email protected]>
2025-04-16rpi: copy over uart clock-frequency in DTBruno Leite
rpi5 firmware sets uart_clk clock-frequency in the firmware and patches it to the DT, copy it over when loading a new DT. Signed-off-by: Bruno Leite <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Tested-by: Peter Robinson <[email protected]>
2025-04-08arm: simplify updating ACPI table header checksumHeinrich Schuchardt
Use acpi_update_checksum() to update table header. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Matthias Brugger <[email protected]>
2025-03-13Raspberry Pi: Copy Bluetooth device address in DTFiona Klute
The firmware sets local-bd-address, copy it when loading a new DT. Signed-off-by: Fiona Klute <[email protected]> Signed-off-by: Peter Robinson <[email protected]>
2025-03-13Raspberry Pi: Keep warnings from firmware in DT, if anyFiona Klute
The /chosen/user-warnings property is created by the RPi firmware if there are warnings to report, keep it to make debugging easier. For example, if the firmware config.txt contains "dtoverlay=error-example" and that example references an undefined symbol "&nosuchdev" the warning can be read after boot: $ cat /proc/device-tree/chosen/user-warnings dterror: can't find symbol 'nosuchdev' Failed to resolve overlay 'error-example' Signed-off-by: Fiona Klute <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Signed-off-by: Peter Robinson <[email protected]>
2025-03-13rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is setMartin Stolpe
The functions fdt_simplefb_add_node and fdt_simplefb_enable_and_mem_rsv are only available if CONFIG_FDT_SIMPLEFB is enabled. Signed-off-by: Martin Stolpe <[email protected]> Acked-by: Matthias Brugger <[email protected]> Signed-off-by: Peter Robinson <[email protected]>
2025-03-13rpi: Add identifiers for the new RPi 5 seriesPeter Robinson
The Raspberry Pi foundation have released the Raspberry Pi 500, CM5 an CM5 lite devices so add the assoicated revision identifers so we can detect them. Signed-off-by: Peter Robinson <[email protected]> Acked-by: Matthias Brugger <[email protected]>
2024-12-25Merge tag 'v2025.01-rc5' into nextTom Rini
Prepare v2025.01-rc5
2024-12-18fdt: Swap the signature for board_fdt_blob_setup()Simon Glass
This returns a devicetree and updates a parameter with an error code. Swap it, since this fits better with the way U-Boot normally works. It also (more easily) allows leaving the existing pointer unchanged. No yaks were harmed in this change, but there is a very small code-size reduction. For sifive, the OF_BOARD option must be set for the function to be called, so there is no point in checking it again. Also OF_SEPARATE is defined always. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Reviewed-by: Patrice Chotard <[email protected]> [trini: Update total_compute] Signed-off-by: Tom Rini <[email protected]>
2024-12-11board: rpi: Enable capsule updatesIlias Apalodimas
Since RPI works well using EFI and has no size limitations with regards to U-Boot, add the needed structures to support capsule updates. While at it update the most commonly used defconfigs and include capsule support and U-Boot commands needed by EFI Tested-by: Sughosh Ganu <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
2024-12-11board: rpi: Pass CMA through from firmware DTPeter Robinson
For a lot of usecases, such as display, camera, media the Raspberry Pi needs a lot more CMA than distros configure as default so we should pass this parameter through so things work as expected. Fix a spelling mistake while we're at it. Signed-off-by: Peter Robinson <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Matthias Brugger <[email protected]>
2024-10-27board: raspberrypi: Add ASL files from tianocoreSimon Glass
Add the necessary DSDT files copied from tianocore to boot the RPi4. In addition generate a board specific SSDT to dynamically enable/disable ACPI devices based on FDT. This is required to support the various variants and boot options. It also allows to test the code on QEMU 9.0 without modifications, since it doesn't emulate PCIe yet. Signed-off-by: Simon Glass <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Simon Glass <[email protected]> Cc: Simon Glass <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Peter Robinson <[email protected]>
2024-07-12Merge tag 'rpi-2024.10-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi Updates for RPi for 2024.10: - board: rpi: remove leftover CONFIG_HW_WATCHDOG block - arm: bcm283x: remove unused empty hw_watchdog_disable - board: raspberrypi: Fix format specifier for printing rev_scheme - Revert "arm: dts: bcm283x: Add minimal smbios information"
2024-07-12board: rpi: remove leftover CONFIG_HW_WATCHDOG blockRasmus Villemoes
This was added in commit 45a6d231b2f (bcm2835_wdt: support for the BCM2835/2836 watchdog), which did do 'select HW_WATCHDOG'. That incarnation of the watchdog driver later got removed in c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x watchdog driver and its references), but this block was left behind. Another rpi watchdog driver has since been added, but that does not select HW_WATCHDOG, so this remains dead and unused. Remove it. Reviewed-by: Stefan Roese <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2024-07-12board: raspberrypi: Fix format specifier for printing rev_schemeFrancois Berder
rev_scheme is an unsigned integer and must not be printed as a signed integer. Signed-off-by: Francois Berder <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-07board: raspberrypi: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-01-30rpi5: Use devicetree to retrieve board revisionIvan T. Ivanov
Firmware on RPi5 return error on board revision query through firmware interface, but on the other hand it fills "linux,revision" in "system" node, so use it to detect board revision. system { linux,revision = <0xc04170>; linux,serial = <0x6cf44e80 0x3c533ede>; }; Reviewed-by: Matthias Brugger <[email protected]> Tested-by: Jens Maus <[email protected]> Tested-by: Darko Alavanja <[email protected]> Signed-off-by: Ivan T. Ivanov <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2023-09-03arm: rpi: Switch to a text environmentSimon Glass
Use the new environment format so we can drop most of the config.h file. Signed-off-by: Simon Glass <[email protected]>
2023-08-15common: return type board_get_usable_ram_topHeinrich Schuchardt
board_get_usable_ram_top() returns a physical address that is stored in gd->ram_top. The return type of the function should be phys_addr_t like the current type of gd->ram_top. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-08-13rpi: set the correct parameter for simple framebuffer nodeMeng Li
When raspberrpi-4b platform boots up, there are 2 sets of same bootup log displayed on HDMI monitor screen, it looks like the screen is split into 2 parts. The root cause is that video format of u-boot is different from kernel. The fixing "a8r8g8b8" video format is used in u-boot, but "r5g6b5" video format from framebuffer node is used in kernel image. In order to avoid weird display status on screen, it needs to set the correct parameter for simple framebuffer node even if it has existed. Signed-off-by: Meng Li <[email protected]>
2023-03-14rpi: Update the RPi Zero 2W DT filenamePeter Robinson
Update the Raspberry Pi Zero 2W device tree file name to match what landed upstream. Signed-off-by: Peter Robinson <[email protected]>
2023-03-14rpi: Copy eth PHY address from fw DT to loaded DTAntoine Mazeas
Some Raspberry Pi 400 boards, specifically rev 1.1, have a different address for the ethernet PHY device than what is provided by the kernel DTB. The correct address is provided by the firmware, so we should carry it over into the loaded device tree so that ethernet works on such boards. Signed-off-by: Antoine Mazeas <[email protected]> Signed-off-by: Peter Robinson <[email protected]>
2023-03-14rpi: Copy properties from firmware dtb to the loaded dtbAntoine Mazeas
The RPI firmware adjusts several property values in the dtb it passes to u-boot depending on the board/SoC revision. Inherit some of these when u-boot loads a dtb itself. Specificaly copy: * /model: The firmware provides a more specific string * /memreserve: The firmware defines a reserved range, better keep it * emmc2bus and pcie0 dma-ranges: The C0T revision of the bcm2711 Soc (as present on rpi 400 and some rpi 4B boards) has different values for these then the B0T revision. So these need to be adjusted to boot on these boards * blconfig: The firmware defines the memory area where the blconfig stored. Copy those over so it can be enabled. * /chosen/kaslr-seed: The firmware generates a kaslr seed, take advantage of that. Signed-off-by: Sjoerd Simons <[email protected]> Signed-off-by: Antoine Mazeas <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Peter Robinson <[email protected]>
2022-12-02MAINTAINERS: add RaspberryPi co-maintainerMatthias Brugger
Peter accpeted to step up as a co-maintainer for the RPis. Reflect that in the corresponding MAINTAINERS files. Signed-off-by: Matthias Brugger <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2022-10-30video: Drop use of the lcd header fileSimon Glass
This file is being removed so drop remaining references to it. Signed-off-by: Simon Glass <[email protected]>
2022-09-23board_f: Fix types for board_get_usable_ram_top()Pali Rohár
Commit 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t") changed type of ram_top member from ulong to phys_addr_t but did not changed types in board_get_usable_ram_top() function which returns value for ram_top. So change ulong to phys_addr_t type also in board_get_usable_ram_top() signature and implementations. Fixes: 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t") Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-12-20Merge tag 'v2022.01-rc4' into nextTom Rini
Prepare v2022.01-rc4
2021-11-30common: rename functions lcd_dt_simplefb to fdt_simplefbPatrick Delaunay
Rename the function named lcd_dt_simplefb* to fdt_simplefb* to be aligned with the associated file name fdt_simplefb.h/fdt_simplefb.c Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Matthias Brugger <[email protected]>
2021-11-30rpi: Add identifier for the new RPi Zero 2 WPeter Robinson
The Raspberry Pi Foundation released the new Zero 2 W which we want to detect, so we can detect the correct device tree file name. Signed-off-by: Peter Robinson <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2021-11-30rpi: Update the Raspberry Pi doucmentation URLPeter Robinson
The Raspberry Pi Foundation has updated their documentation so update the URL to the latest place to find the HW device revision codes. Signed-off-by: Peter Robinson <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2021-10-27sandbox: Remove OF_HOSTFILEIlias Apalodimas
OF_HOSTFILE is used on sandbox configs only. Although it's pretty unique and not causing any confusions, we are better of having simpler config options for the DTB. So let's replace that with the existing OF_BOARD. U-Boot would then have only three config options for the DTB origin. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary(should not be used in production Signed-off-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-09-27Merge tag 'v2021.10-rc5' into nextTom Rini
Prepare v2021.10-rc5
2021-09-15rpi: Conditionally add simple-framebuffer nodeIvan T. Ivanov
It appears that RPi firmware has already added framebuffer node under /chosen, at least on RPi 2 versions. So check for this and don't add duplicate node. Signed-off-by: Ivan T. Ivanov <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2021-09-07arm: Disable ATAGs supportTom Rini
With the exceptions of ds109, ds414, icnova-a20-swac, nokia_rx51 and stemmy, disable ATAG support. A large number of platforms had enabled support but never supported a kernel so old as to require it. Further, some platforms are old enough to support both, but are well supported by devicetree booting, and have been for a number of years. This is because some of the ATAGs related functions have been re-used to provide the same kind of information, but for devicetree or just generally to inform the user. When needed still, rename these functions to get_board_revision() instead, to avoid conflicts. In other cases, these functions were simply unused, so drop them. Cc: Andre Przywara <[email protected]> Cc: Jagan Teki <[email protected]> Cc: Phil Sutter <[email protected]> Cc: Stefan Bosch <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2021-02-18rpi: Add identifier for the new CM4Nicolas Saenz Julienne
The Raspberry Pi Foundation released the new Compute Module 4 which we want to detect, so we can enable Ethernet on it and know the correct device tree file name. Note that this sets the Ethernet option to true since the official CM4 IO board has an Ethernet port. But that might not be the case when using custom ones. Signed-off-by: Nicolas Saenz Julienne <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Tested-by: Peter Robinson <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2021-02-18rpi: Add identifier for the new RPi400Nicolas Saenz Julienne
The Raspberry Pi Foundation released the new RPi400 which we want to detect, so we can enable Ethernet on it and know the correct device tree file name. Signed-off-by: Nicolas Saenz Julienne <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Tested-by: Peter Robinson <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2021-02-18rpi: limit size of the RAM to the multiple of the MMU_SECTION_SIZEMarek Szyprowski
When RPi4 is booted from USB Mass Storage, the firmware reports 947MiB of the ARM memory (948 in case of the standard SD-card boot). This value is not MMU_SECTION_SIZE aligned, so the dram_bank_mmu_setup() skips mapping of the last 1MiB. This later causes u-boot in ARM 32bit mode to freeze, because it relocated itself into that unmapped memory and fails to execute. Fix this by limiting the size of the first bank to the multiple of MMU_SECTION_SIZE. Signed-off-by: Marek Szyprowski <[email protected]> Reviewed-by: Nicolas Saenz Julienne <[email protected]> Tested-by: Jaehoon Chung <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <[email protected]>