Orange Pi Zero

Overview

Orange Pi Zero is an open-source single-board computer. It uses the AllWinner H2+/H3 SoC and comes with 256MB or 512MB of DDR3 SDRAM. The AllWinner H2+/H3 SoC is based on a quad-core ARM Cortex-A7 processor.

Hardware

Supported Features

The opi_zero 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.

opi_zero/sun8i_h3 target

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-A7 CPU4

arm,cortex-a7

Interrupt controller

on-chip

ARM Generic Interrupt Controller v21

arm,gic-v2

Serial controller

on-chip

ns16550 UART13

ns16550

SRAM

on-board

Generic on-chip SRAM1

mmio-sram

Timer

on-chip

per-core ARM architected timer1

arm,armv8-timer

Programming and Debugging

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

flash debug

The Allwinner H2+/H3 SoC needs to be initialized prior to running a Zephyr application. This can be achieved in a number of ways (e.g. Das U-Boot Secondary Program Loader (SPL), …).

The instructions here use the U-Boot SPL. For further details and instructions for using Das U-Boot with Allwinner H2+/H3 SoCs, see the following documentation:

Building Das U-Boot

Clone and build Das U-Boot for the Orange Pi Zero:

git clone -b v2024.01 https://source.denx.de/u-boot/u-boot.git
cd u-boot
make distclean
make orangepi_zero_defconfig
export PATH=/path/to/zephyr-sdk/arm-zephyr-eabi/bin/:$PATH
export CROSS_COMPILE=arm-zephyr-eabi-
make
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblkX bs=1024 seek=8

Building and Flashing

# From the root of the zephyr repository
west build -b opi_zero samples/hello_world

Copy the compiled zephyr.bin to the boot directory of the SD card and plug it into the board.

=> fatload mmc 0:1 0x40000000 /boot/zephyr.bin
=> go 0x40000000

You should see the following output on the serial console:

*** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx ***
Hello World! opi_zero/sun8i_h3