From f1d0d87b248cf22eea5fef8470a16aa4f994ee44 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 19 Apr 2026 11:09:19 +0200 Subject: [PATCH] Add support for Raspberry Pi 5B Signed-off-by: Joachim Wiberg --- board/aarch64/raspberrypi-rpi64/README.md | 36 ++- board/aarch64/raspberrypi-rpi64/config.txt | 2 + board/aarch64/raspberrypi-rpi64/dts/Makefile | 3 +- .../dts/broadcom/bcm2712-rpi-5-b.dts | 2 + .../raspberrypi-rpi64/raspberrypi-rpi64.mk | 9 + .../etc/factory-config.cfg | 299 ++++++++++++++++++ doc/ChangeLog.md | 4 + 7 files changed, 348 insertions(+), 7 deletions(-) create mode 100644 board/aarch64/raspberrypi-rpi64/dts/broadcom/bcm2712-rpi-5-b.dts create mode 100644 board/aarch64/raspberrypi-rpi64/rootfs/usr/share/product/raspberrypi,5-model-b/etc/factory-config.cfg diff --git a/board/aarch64/raspberrypi-rpi64/README.md b/board/aarch64/raspberrypi-rpi64/README.md index 711bc2eb..3e29ffe8 100644 --- a/board/aarch64/raspberrypi-rpi64/README.md +++ b/board/aarch64/raspberrypi-rpi64/README.md @@ -1,4 +1,4 @@ -# Raspberry Pi 3B/4B/CM4 +# Raspberry Pi 3B/4B/400/CM4/5B ## Overview @@ -31,6 +31,18 @@ learning, prototyping, and lightweight network applications. - GPIO header (40-pin) - PoE support (with add-on HAT) +**Raspberry Pi 5B:** + +- Broadcom BCM2712 ARM Cortex-A76 quad-core processor @ 2.4 GHz +- 4 GB or 8 GB LPDDR4X RAM +- microSD card slot for storage (PCIe Gen 2 speed via RP1) +- 2x USB 3.0 + 2x USB 2.0 ports (via RP1 companion chip) +- Gigabit Ethernet (via RP1) +- Dual-band WiFi (2.4 GHz + 5 GHz) and Bluetooth 5.0 +- 2x micro-HDMI ports (up to 4K@60fps output) +- GPIO header (40-pin) +- PCIe Gen 2 x1 connector (FPC) + **Compute Module 4 (CM4):** - Same processor as Pi 4B @@ -53,6 +65,12 @@ Full support for base board networking and core functionality. GPIO extension boards (HATs) are not currently supported. Other Raspberry Pi boards of the same generation may work but may require additional testing. +> [!NOTE] +> The Raspberry Pi 5B uses the RP1 companion chip, which provides USB, Ethernet, +> and PCIe connectivity over an internal PCIe Gen 2 link. The mainline Linux +> `drm/vc4` driver handles HDMI display on the Pi 5 — no firmware overlay is +> required, unlike on the Pi 4. + ## Getting Started ### Quick Start with SD Card @@ -71,10 +89,10 @@ The easiest way to get started is using a microSD card: - Default login: `admin` / `admin` > [!NOTE] -> Raspberry Pi 3B and 4B boot with a factory configuration (`factory-config.cfg`) -> that enables DHCP client on the Ethernet port. This means you can access -> the device over the network without needing a serial console. Simply find -> the assigned IP address and SSH in! +> Raspberry Pi 3B/4B/5B boot with a dedicated `factory-config.cfg` that +> enables DHCP client on the Ethernet port. This means you can access the +> device over the network without needing a serial console. Simply find the +> assigned IP address using an mDNS scan and SSH in! > > **Compute Module 4 (CM4)** and some other variants do not have this factory > configuration, so you'll need to use a serial console for initial setup or @@ -176,6 +194,7 @@ admin@infix:/config/container/…/var/> leave Proper power supply is critical for stable operation: +- **Raspberry Pi 5B:** 5V/5A USB-C power supply (official 27W recommended) - **Raspberry Pi 4B:** 5V/3A USB-C power supply (official recommended) - **Raspberry Pi 3B:** 5V/2.5A micro-USB power supply - **Compute Module 4:** Power requirements depend on carrier board @@ -190,11 +209,16 @@ Inadequate power can cause: ### Serial Console Access (Optional) -A serial console is useful for debugging but not required for Pi 3B/4B, since +A serial console is useful for debugging but not required for Pi 3B/4B/5B, since the factory configuration enables network access via DHCP. For CM4 and other variants without factory configuration, serial console access is required for initial setup. +> [!NOTE] +> On the Raspberry Pi 5B the serial console is on `ttyAMA10` (GPIO pins 8/10), +> not `ttyAMA0` as on earlier models. Use the same wiring but connect to the +> correct UART in your terminal emulator. + To connect via serial: 1. Connect a USB-to-TTL serial adapter (3.3V) to GPIO pins: diff --git a/board/aarch64/raspberrypi-rpi64/config.txt b/board/aarch64/raspberrypi-rpi64/config.txt index 02c32def..c3bb4097 100644 --- a/board/aarch64/raspberrypi-rpi64/config.txt +++ b/board/aarch64/raspberrypi-rpi64/config.txt @@ -36,3 +36,5 @@ dtoverlay=vc4-kms-v3d-pi4 lcd_rotate=2 gpu_mem=256 + +[pi5] diff --git a/board/aarch64/raspberrypi-rpi64/dts/Makefile b/board/aarch64/raspberrypi-rpi64/dts/Makefile index 1ac998ed..c4abee13 100644 --- a/board/aarch64/raspberrypi-rpi64/dts/Makefile +++ b/board/aarch64/raspberrypi-rpi64/dts/Makefile @@ -1,4 +1,5 @@ dtb-y += broadcom/bcm2837-rpi-3-b.dtb broadcom/bcm2837-rpi-zero-2-w.dtb \ broadcom/bcm2711-rpi-4-b.dtb broadcom/bcm2711-rpi-4-b-dsi.dtb \ broadcom/bcm2711-rpi-400.dtb broadcom/bcm2711-rpi-cm4-io.dtb \ - broadcom/bcm2711-rpi-cm4.dtb + broadcom/bcm2711-rpi-cm4.dtb \ + broadcom/bcm2712-rpi-5-b.dtb diff --git a/board/aarch64/raspberrypi-rpi64/dts/broadcom/bcm2712-rpi-5-b.dts b/board/aarch64/raspberrypi-rpi64/dts/broadcom/bcm2712-rpi-5-b.dts new file mode 100644 index 00000000..f3c4f456 --- /dev/null +++ b/board/aarch64/raspberrypi-rpi64/dts/broadcom/bcm2712-rpi-5-b.dts @@ -0,0 +1,2 @@ +#include +#include "infix.dtsi" diff --git a/board/aarch64/raspberrypi-rpi64/raspberrypi-rpi64.mk b/board/aarch64/raspberrypi-rpi64/raspberrypi-rpi64.mk index 341407ad..ba0ef0d6 100644 --- a/board/aarch64/raspberrypi-rpi64/raspberrypi-rpi64.mk +++ b/board/aarch64/raspberrypi-rpi64/raspberrypi-rpi64.mk @@ -61,6 +61,15 @@ define RASPBERRYPI_RPI64_LINUX_CONFIG_FIXUPS $(call KCONFIG_SET_OPT,CONFIG_TOUCHSCREEN_EDT_FT5X06,m) $(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE) + + # RPi 5 (BCM2712): PCIe bus to RP1 companion chip and its sub-drivers. + # Must be built-in (=y) — no initramfs, root is on RP1 SDHCI via PCIe. + $(call KCONFIG_SET_OPT,CONFIG_PCIE_BRCMSTB,y) + $(call KCONFIG_SET_OPT,CONFIG_MISC_RP1,y) + $(call KCONFIG_SET_OPT,CONFIG_COMMON_CLK_RP1,y) + $(call KCONFIG_SET_OPT,CONFIG_PINCTRL_RP1,y) + $(call KCONFIG_SET_OPT,CONFIG_MMC_SDHCI_BRCMSTB,y) + $(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_BCM2712) endef $(eval $(ix-board)) diff --git a/board/aarch64/raspberrypi-rpi64/rootfs/usr/share/product/raspberrypi,5-model-b/etc/factory-config.cfg b/board/aarch64/raspberrypi-rpi64/rootfs/usr/share/product/raspberrypi,5-model-b/etc/factory-config.cfg new file mode 100644 index 00000000..49f3b94a --- /dev/null +++ b/board/aarch64/raspberrypi-rpi64/rootfs/usr/share/product/raspberrypi,5-model-b/etc/factory-config.cfg @@ -0,0 +1,299 @@ +{ + "ieee802-dot1ab-lldp:lldp": { + "infix-lldp:enabled": true + }, + "ietf-hardware:hardware": { + "component": [ + { + "name": "USB", + "class": "infix-hardware:usb", + "state": { + "admin-state": "unlocked" + } + }, + { + "name": "radio0", + "class": "infix-hardware:wifi", + "infix-hardware:wifi-radio": { + "country-code": "00" + } + } + ] + }, + "ietf-interfaces:interfaces": { + "interface": [ + { + "name": "lo", + "type": "infix-if-type:loopback", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "127.0.0.1", + "prefix-length": 8 + } + ] + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "::1", + "prefix-length": 128 + } + ] + } + }, + { + "name": "eth0", + "type": "infix-if-type:ethernet", + "ietf-ip:ipv6": {}, + "ietf-ip:ipv4": { + "infix-dhcp-client:dhcp": { + "option": [ + { + "id": "netmask" + }, + { + "id": "broadcast" + }, + { + "id": "router" + }, + { + "id": "domain" + }, + { + "id": "hostname", + "value": "auto" + }, + { + "id": "dns-server" + }, + { + "id": "ntp-server" + }, + { + "id": "vendor-class", + "value": "Raspberry Pi 5 Model B" + } + ] + } + } + }, + { + "name": "wifi0", + "type": "infix-if-type:wifi", + "infix-interfaces:wifi": { + "radio": "radio0" + } + } + ] + }, + "ietf-keystore:keystore": { + "asymmetric-keys": { + "asymmetric-key": [ + { + "name": "genkey", + "public-key-format": "infix-crypto-types:ssh-public-key-format", + "public-key": "", + "private-key-format": "infix-crypto-types:rsa-private-key-format", + "cleartext-private-key": "", + "certificates": {} + } + ] + } + }, + "ietf-netconf-acm:nacm": { + "enable-nacm": true, + "read-default": "permit", + "write-default": "permit", + "exec-default": "permit", + "groups": { + "group": [ + { + "name": "admin", + "user-name": [ + "admin" + ] + }, + { + "name": "operator", + "user-name": [] + }, + { + "name": "guest", + "user-name": [] + } + ] + }, + "rule-list": [ + { + "name": "admin-acl", + "group": [ + "admin" + ], + "rule": [ + { + "name": "permit-all", + "module-name": "*", + "access-operations": "*", + "action": "permit", + "comment": "Allow 'admin' group complete access to all operations and data." + } + ] + }, + { + "name": "operator-acl", + "group": [ + "operator" + ], + "rule": [ + { + "name": "permit-system-rpcs", + "module-name": "ietf-system", + "rpc-name": "*", + "access-operations": "exec", + "action": "permit", + "comment": "Operators can reboot, shutdown, and set system time." + } + ] + }, + { + "name": "guest-acl", + "group": [ + "guest" + ], + "rule": [ + { + "name": "deny-all-write+exec", + "module-name": "*", + "access-operations": "create update delete exec", + "action": "deny", + "comment": "Guests cannot change anything or exec rpcs." + } + ] + }, + { + "name": "default-deny-all", + "group": [ + "*" + ], + "rule": [ + { + "name": "deny-password-access", + "path": "/ietf-system:system/authentication/user/password", + "access-operations": "*", + "action": "deny", + "comment": "No user except admins can access password hashes." + }, + { + "name": "deny-keystore-access", + "module-name": "ietf-keystore", + "access-operations": "*", + "action": "deny", + "comment": "No user except admins can access cryptographic keys." + }, + { + "name": "deny-truststore-access", + "module-name": "ietf-truststore", + "access-operations": "*", + "action": "deny", + "comment": "No user except admins can access trust store." + } + ] + } + ] + }, + "ietf-netconf-server:netconf-server": { + "listen": { + "endpoints": { + "endpoint": [ + { + "name": "default-ssh", + "ssh": { + "tcp-server-parameters": { + "local-bind": [ + { + "local-address": "::" + } + ] + }, + "ssh-server-parameters": { + "server-identity": { + "host-key": [ + { + "name": "default-key", + "public-key": { + "central-keystore-reference": "genkey" + } + } + ] + } + } + } + } + ] + } + } + }, + "ietf-system:system": { + "hostname": "rpi-%m", + "ntp": { + "enabled": true, + "server": [ + { + "name": "ntp.org", + "udp": { + "address": "pool.ntp.org" + }, + "iburst": true + } + ] + }, + "authentication": { + "user": [ + { + "name": "admin", + "password": "$factory$", + "infix-system:shell": "bash" + } + ] + }, + "infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo=" + }, + "infix-meta:meta": { + "version": "1.7" + }, + "infix-services:mdns": { + "enabled": true + }, + "infix-services:web": { + "enabled": true, + "console": { + "enabled": true + }, + "netbrowse": { + "enabled": true + }, + "restconf": { + "enabled": true + } + }, + "infix-services:ssh": { + "enabled": true, + "hostkey": [ + "genkey" + ], + "listen": [ + { + "name": "ipv4", + "address": "0.0.0.0", + "port": 22 + }, + { + "name": "ipv6", + "address": "::", + "port": 22 + } + ] + } +} diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index cfc754c3..94ca0410 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -12,12 +12,16 @@ All notable changes to the project are documented in this file. - Add support for [Banana Pi BPI-R4][BPI-R4], quad-core Cortex-A73 router with 4x 2.5 GbE switching, dual 10 GbE SFP+. Variants BPI-R4-2g5 and BPI-R4P have one SFP+ replaced by a 2.5 GbE RJ45, with optional PoE on the R4P +- Add support for [Raspberry Pi 5 Model B][RPI-5], Broadcom BCM2712 Cortex-A76 + quad-core @ 2.4 GHz with Gigabit Ethernet, dual USB 3.0, dual HDMI, and WiFi + via the RP1 companion chip ### Fixes - N/A [BPI-R4]: https://docs.banana-pi.org/en/BPI-R4/BananaPi_BPI-R4 +[RPI-5]: https://www.raspberrypi.com/products/raspberry-pi-5/ [v26.03.0][] - 2026-03-31 -------------------------