From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: pierrick.bouvier@oss.qualcomm.com, almer@dabbelt.com,
alistair.francis@wdc.com, pbonzini@redhat.com,
marcandre.lureau@redhat.com, farosas@suse.de, lvivier@redhat.com
Cc: liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com,
zhiwei_liu@linux.alibaba.com, chao.liu@processmission.com,
wxchen0913@gmail.com, jserv@ccns.ncku.edu.tw,
marscheng@google.com, eleanor15x@gmail.com,
qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: [PATCH v4 0/7] hw/riscv: Add support for Milk-V Duo board
Date: Sat, 22 Aug 2026 19:43:07 +0000 [thread overview]
Message-ID: <20260822194315.2550260-1-visitorckw@gmail.com> (raw)
Add initial support for the Milk-V Duo board.
The Sophgo CV1800B SoC features T-Head C906 processing, standard PLIC
and CLINT controllers, a dw8250 uart, and basic clock control. The
current implementation can successfully run OpenSBI and boot Linux v7.0
from an SD card to the Linux shell.
---
P.S. Apologies for the delay between v3 and v4. I'll keep the gap
between revisions tighter next time.
Changes in v4:
- dw8250: Fix memory access sizes, handle dynamic 'regshift', log
unimplemented writes, and propagate errors.
- cv1800b_clk: Replace magic numbers with macros and sizeof().
- cv1800b: Move static properties and child device initialization to
instance_init and propagate errp.
- milkv_duo: Use riscv_default_firmware_name(), riscv_load_fdt(), and
DEFINE_TYPES().
- docs: Add a doc for milk-v duo board.
- tests: Add an end to end boot test.
Changes in v3:
- Rebase on master branch.
- Drop custom T-Head PMU CSR patch to avoid duplication.
- Use REG_BYTE_WIDTH macro in clock controller.
Changes in v2:
- Added link for the custom T-Head PMU CSRs
- Added qtest to validate basic for the dw8250 and clock controller.
- Removed RFC tag.
Kuan-Wei Chiu (7):
hw/char: Add dw8250 UART
hw/misc: Add Sophgo CV1800B clock controller
hw/riscv: Add Sophgo CV1800B SoC support
hw/riscv: Add Milk-V Duo board support
tests/qtest: Add qtest for Milk-V Duo board
tests/functional/riscv64: Add boot test for Milk-V Duo board
docs/system/riscv: Add Milk-V Duo board documentation
MAINTAINERS | 14 ++
configs/devices/riscv64-softmmu/default.mak | 1 +
docs/system/riscv/milkv-duo.rst | 49 ++++++
docs/system/target-riscv.rst | 1 +
hw/char/Kconfig | 4 +
hw/char/dw8250.c | 131 +++++++++++++++
hw/char/meson.build | 1 +
hw/misc/Kconfig | 3 +
hw/misc/cv1800b_clk.c | 90 ++++++++++
hw/misc/meson.build | 1 +
hw/riscv/Kconfig | 14 ++
hw/riscv/cv1800b.c | 174 ++++++++++++++++++++
hw/riscv/meson.build | 3 +
hw/riscv/milkv_duo.c | 120 ++++++++++++++
include/hw/char/dw8250.h | 27 +++
include/hw/misc/cv1800b_clk.h | 26 +++
include/hw/riscv/cv1800b.h | 56 +++++++
tests/functional/riscv64/meson.build | 1 +
tests/functional/riscv64/test_milkv_duo.py | 50 ++++++
tests/qtest/meson.build | 3 +-
tests/qtest/milkv-duo-test.c | 70 ++++++++
21 files changed, 838 insertions(+), 1 deletion(-)
create mode 100644 docs/system/riscv/milkv-duo.rst
create mode 100644 hw/char/dw8250.c
create mode 100644 hw/misc/cv1800b_clk.c
create mode 100644 hw/riscv/cv1800b.c
create mode 100644 hw/riscv/milkv_duo.c
create mode 100644 include/hw/char/dw8250.h
create mode 100644 include/hw/misc/cv1800b_clk.h
create mode 100644 include/hw/riscv/cv1800b.h
create mode 100755 tests/functional/riscv64/test_milkv_duo.py
create mode 100644 tests/qtest/milkv-duo-test.c
--
2.55.0.766.g2966f0265a-goog
next reply other threads:[~2026-08-22 19:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-22 19:43 Kuan-Wei Chiu [this message]
2026-08-22 19:43 ` [PATCH v4 1/7] hw/char: Add dw8250 UART Kuan-Wei Chiu
2026-08-22 19:43 ` [PATCH v4 2/7] hw/misc: Add Sophgo CV1800B clock controller Kuan-Wei Chiu
2026-09-25 3:58 ` Alistair Francis
2026-08-22 19:43 ` [PATCH v4 3/7] hw/riscv: Add Sophgo CV1800B SoC support Kuan-Wei Chiu
2026-09-25 4:00 ` Alistair Francis
2026-08-22 19:43 ` [PATCH v4 4/7] hw/riscv: Add Milk-V Duo board support Kuan-Wei Chiu
2026-08-22 19:43 ` [PATCH v4 5/7] tests/qtest: Add qtest for Milk-V Duo board Kuan-Wei Chiu
2026-09-25 4:01 ` Alistair Francis
2026-08-22 19:43 ` [PATCH v4 6/7] tests/functional/riscv64: Add boot test " Kuan-Wei Chiu
2026-09-25 4:02 ` Alistair Francis
2026-09-27 18:32 ` Kuan-Wei Chiu
2026-08-22 19:43 ` [PATCH v4 7/7] docs/system/riscv: Add Milk-V Duo board documentation Kuan-Wei Chiu
2026-09-25 4:04 ` Alistair Francis
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=20260822194315.2550260-1-visitorckw@gmail.com \
--to=visitorckw@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=almer@dabbelt.com \
--cc=chao.liu@processmission.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=eleanor15x@gmail.com \
--cc=farosas@suse.de \
--cc=jserv@ccns.ncku.edu.tw \
--cc=liwei1518@gmail.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=marscheng@google.com \
--cc=pbonzini@redhat.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=wxchen0913@gmail.com \
--cc=zhiwei_liu@linux.alibaba.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.