All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khai Do <dovankhai97@gmail.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, pbonzini@redhat.com,
	strahinja.p.jankovic@gmail.com, Khai Do <dovankhai97@gmail.com>
Subject: [PATCH v2 0/8] hw/arm: Add Allwinner H618 SoC and Orange Pi Zero 2W machine
Date: Mon,  9 Nov 2026 18:35:28 +0700	[thread overview]
Message-ID: <20261109113545.18561-1-dovankhai97@gmail.com> (raw)

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



             reply	other threads:[~2026-11-09 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 11:35 Khai Do [this message]
2026-11-09 11:35 ` [PATCH v2 1/8] hw/arm/allwinner-h618: Add Allwinner H618 SoC emulation Khai Do
2026-11-09 11:35 ` [PATCH v2 2/8] hw/arm/orangepi-zero2w: Add Orange Pi Zero 2W machine Khai Do
2026-11-09 11:35 ` [PATCH v2 3/8] hw/misc/allwinner-sid: Separate ALLWINNER_SID config symbol Khai Do
2026-11-09 11:35 ` [PATCH v2 4/8] hw/misc/allwinner-sid: Support configurable eFuse capacity up to 512 bytes Khai Do
2026-11-09 11:35 ` [PATCH v2 5/8] hw/arm/allwinner-h618: Connect Allwinner SID controller Khai Do
2026-11-09 11:35 ` [PATCH v2 6/8] hw/sd/allwinner-sdhost: Separate ALLWINNER_SDHOST config symbol Khai Do
2026-11-09 11:35 ` [PATCH v2 7/8] hw/arm/allwinner-h618: Connect Allwinner SD/MMC host controller 0 Khai Do
2026-11-09 11:35 ` [PATCH v2 8/8] hw/arm/orangepi-zero2w: Wire up SD card and support firmware loading Khai Do

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261109113545.18561-1-dovankhai97@gmail.com \
    --to=dovankhai97@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=strahinja.p.jankovic@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.