This patch series adds emulation support for the Allwinner H618 SoC and
the Xunlong Orange Pi Zero 2W single-board computer (SBC).
The Allwinner H618 is a quad-core 64-bit ARM Cortex-A53 SoC. This series
follows the incremental skeleton design established for Allwinner SoCs:
- Patch 1: Introduces the basic H618 SoC model with 4x Cortex-A53 cores,
GICv2, ARM Generic Timer PPIs, UART0/1, SRAM A1/A2, and stubbed unimp MMIO.
- Patch 2: Adds the Orange Pi Zero 2W machine with 1 GiB SDRAM and kernel loader.
- Patch 3: Separates the ALLWINNER_SID Kconfig symbol so other SoCs can reuse it.
- Patch 4: Extends the Allwinner SID eFuse controller to support configurable
capacity up to 512 bytes (AW_SID_SIZE_MAX), preserving backward compatibility.
- Patch 5: Connects the SID controller into the H618 SoC (256 bytes capacity)
and sets the default UID.
- Patch 6: Separates the ALLWINNER_SDHOST Kconfig symbol for independent reuse.
- Patch 7: Connects Allwinner SD/MMC host controller 0 (sun50i-a64 compatible)
at 0x04020000 into the H618 SoC.
- Patch 8: Wires up the SD card bus to Orange Pi Zero 2W machine and supports
loading bootloader firmware via -bios.
Changes since v1:
- hw/misc/allwinner-sid: Use extract32(s->control, 16, 9) to extract the
9-bit PRCTL offset and return 0 on out-of-bounds eFuse reads.
- hw/arm/allwinner-h618: Set SID size property to 256 bytes (0x100) to
match physical H618 eFuse capacity, consistent with Linux and Zephyr DTS.
- hw/sd/allwinner-sdhost: Separate CONFIG_ALLWINNER_SDHOST symbol from H3.
- hw/arm/allwinner-h618: Connect SD/MMC host controller 0.
- hw/arm/orangepi-zero2w: Wire up SD bus and support raw firmware loading
via -bios (e.g. for U-Boot SPL).
Verification:
- The series has been tested using Zephyr RTOS (v4.5) running on the
orangepi-zero2w target:
* UART0 console & kernel boot: PASS
* Multi-threading with ARM Generic Timer PPIs (k_msleep): PASS
* HWINFO UID reading from SID eFuse: PASS (16 bytes UID)
* SID OTP driver: PASS (Offset 0..15, Offset 240..255, and Offset 256
returning -EINVAL out-of-bounds error)
- Tested raw firmware loading (-bios) with U-Boot SPL.
- All patches pass ./scripts/checkpatch.pl with 0 errors and 0 warnings.
Khai Do (8):
hw/arm/allwinner-h618: Add Allwinner H618 SoC emulation
hw/arm/orangepi-zero2w: Add Orange Pi Zero 2W machine
hw/misc/allwinner-sid: Separate ALLWINNER_SID config symbol
hw/misc/allwinner-sid: Support configurable eFuse capacity up to 512
bytes
hw/arm/allwinner-h618: Connect Allwinner SID controller
hw/sd/allwinner-sdhost: Separate ALLWINNER_SDHOST config symbol
hw/arm/allwinner-h618: Connect Allwinner SD/MMC host controller 0
hw/arm/orangepi-zero2w: Wire up SD card and support firmware loading
MAINTAINERS | 8 ++
hw/arm/Kconfig | 11 ++
hw/arm/allwinner-h618.c | 247 ++++++++++++++++++++++++++++++++
hw/arm/meson.build | 1 +
hw/arm/orangepi-zero2w.c | 114 +++++++++++++++
hw/misc/Kconfig | 3 +
hw/misc/allwinner-sid.c | 12 +-
hw/misc/meson.build | 2 +-
hw/sd/Kconfig | 4 +
hw/sd/meson.build | 2 +-
include/hw/arm/allwinner-h618.h | 63 ++++++++
include/hw/misc/allwinner-sid.h | 8 ++
12 files changed, 471 insertions(+), 4 deletions(-)
create mode 100644 hw/arm/allwinner-h618.c
create mode 100644 hw/arm/orangepi-zero2w.c
create mode 100644 include/hw/arm/allwinner-h618.h
--
2.43.0