Raspberry Pi Zero 2 W

Overview

The Raspberry Pi Zero 2 W [1] is a small single-board computer built around the Broadcom BCM2710A1 SoC, the same silicon as the original Raspberry Pi 3, packaged in an RP3A0-AU SiP together with 512 MB of LPDDR2 SDRAM.

Zephyr runs the BCM2710A1 in single-core mode, using the BCM2836 ARM-local interrupt controller (QA7 ARM Quad-A7 Core [4]) and the BCM2835 ARMC peripheral interrupt controller (BCM2837 ARM Peripherals [3]) natively, as this SoC has no GIC. The mini-UART on GPIO 14/15 is the default console.

Hardware

  • 1GHz quad-core 64-bit Arm Cortex-A53 CPU

  • 512MB SDRAM

  • 2.4GHz 802.11 b/g/n wireless LAN

  • Bluetooth 4.2, Bluetooth Low Energy (BLE), onboard antenna

  • Mini HDMI port and micro USB On-The-Go (OTG) port

  • microSD card slot

  • CSI-2 camera connector

  • HAT-compatible 40-pin header footprint (unpopulated)

  • H.264, MPEG-4 decode (1080p30); H.264 encode (1080p30)

  • OpenGL ES 1.1, 2.0 graphics

  • Micro USB power

  • Composite video and reset pins via solder test points

Supported Features

The rpi_zero_2w board supports the hardware features listed below.

on-chip / on-board
Feature integrated in the SoC / present on the board.
2 / 2
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files.
vnd,foo
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.

rpi_zero_2w/bcm2710 target

On-target memory for this board target: 256 MiB of RAM, N/A of Flash.

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-A53 CPU1

arm,cortex-a53

Clock control

on-chip

Generic fixed-rate clock provider2

fixed-clock

GPIO & Headers

on-chip

BCM2711 GPIO11

brcm,bcm2711-gpio

I2C

on-chip

Broadcom BCM2711 I2C controller3

brcm,bcm2711-i2c

Interrupt controller

on-chip

BCM2836 / BCM2710 ARM-local interrupt controller (Pi 2 / Pi 3 / Pi Zero 2 W)1

brcm,bcm2836-l1-intc

on-chip

BCM2835 ARMC peripheral interrupt controller – the “GPU IRQ” side of the BCM283x family (Pi 1 / Pi 2 / Pi 3 / Pi Zero family)1

brcm,bcm2835-armctrl-ic

Pin control

on-chip

Broadcom BCM2711 pin controller1

brcm,bcm2711-pinctrl

Serial controller

on-chip

ARM PL011 UART1

arm,pl011

on-chip

Broadcom BCM283x Auxiliary UART1

brcm,bcm283x-aux-uart

SRAM

on-board

Generic on-chip SRAM1

mmio-sram

Timer

on-chip

per-core ARM architected timer1

arm,armv8-timer

Programming and Debugging

The rpi_zero_2w board supports the runners and associated west commands listed below.

flash debug

microSD card

Flash a Raspberry Pi OS Lite (64-bit) image to a microSD card with Raspberry Pi Imager. This creates the FAT boot partition holding the firmware blobs (bootcode.bin, fixup.dat, start.elf) that the BCM2710A1 needs in order to bring up the ARM cores.

In the root directory of that boot partition:

  1. Copy build/zephyr/zephyr.bin

  2. Replace config.txt with:

    arm_64bit=1
    enable_uart=1
    core_freq=250
    kernel_address=0x200000
    kernel=zephyr.bin
    

arm_64bit=1 is required whenever the kernel filename does not start with kernel8. enable_uart=1 routes the mini-UART to GPIO 14/15, which the Bluetooth radio would otherwise use. core_freq=250 locks the VPU clock so the mini-UART baud-rate divisor stays valid; enable_uart=1 is supposed to imply this but does not always (see raspberrypi/linux issue #4123 [2]). kernel_address must match the DRAM base in the board devicetree. See the config.txt reference [5] for the full set of firmware options.

Eject the card and boot the Pi. The console comes up on the mini-UART at 115200 8N1, no flow control:

*** Booting Zephyr OS build v4.x.x-... ***
Hello World! rpi_zero_2w

Console connection

Wire a 3.3 V USB-UART adapter to the GPIO header:

Adapter

Pi header pin

Pi GPIO / function

GND

6 (or 9, 14)

GND

RX

8

GPIO 14 / mini-UART TX

TX

10

GPIO 15 / mini-UART RX

References