[PATCH RFC 0/5] hw/riscv: Add support for Milk-V Duo board

Kuan-Wei Chiu posted 5 patches 2 weeks, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260512094614.3464388-1-visitorckw@gmail.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Kuan-Wei Chiu <visitorckw@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu.zevorn@gmail.com>, Christoph Muellner <christoph.muellner@vrull.eu>
There is a newer version of this series
MAINTAINERS                                 |  11 ++
configs/devices/riscv64-softmmu/default.mak |   1 +
hw/char/Kconfig                             |   4 +
hw/char/dw8250.c                            | 118 ++++++++++++++
hw/char/meson.build                         |   1 +
hw/misc/Kconfig                             |   3 +
hw/misc/cv1800b_clk.c                       |  89 +++++++++++
hw/misc/meson.build                         |   1 +
hw/riscv/Kconfig                            |  14 ++
hw/riscv/cv1800b.c                          | 168 ++++++++++++++++++++
hw/riscv/meson.build                        |   3 +
hw/riscv/milkv_duo.c                        | 122 ++++++++++++++
include/hw/char/dw8250.h                    |  27 ++++
include/hw/misc/cv1800b_clk.h               |  24 +++
include/hw/riscv/cv1800b.h                  |  52 ++++++
target/riscv/th_csr.c                       |  30 ++++
16 files changed, 668 insertions(+)
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
[PATCH RFC 0/5] hw/riscv: Add support for Milk-V Duo board
Posted by Kuan-Wei Chiu 2 weeks, 4 days ago
Add initial support for the Milk-V Duo board.

This is something I've been playing around with in my local branch, and
I've reached a point where the implementation is enough to boot OpenSBI
and reach a Linux shell using an SD card image.

I am sending this as an RFC to get early feedback to understand the gap
between this minimal implementation and what is required for a upstream
merge. I plan to continue implementing missing blocks (like gpio and
clk/rst) in future.

Kuan-Wei Chiu (5):
  target/riscv: Add stubs for T-Head PMU CSRs
  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

 MAINTAINERS                                 |  11 ++
 configs/devices/riscv64-softmmu/default.mak |   1 +
 hw/char/Kconfig                             |   4 +
 hw/char/dw8250.c                            | 118 ++++++++++++++
 hw/char/meson.build                         |   1 +
 hw/misc/Kconfig                             |   3 +
 hw/misc/cv1800b_clk.c                       |  89 +++++++++++
 hw/misc/meson.build                         |   1 +
 hw/riscv/Kconfig                            |  14 ++
 hw/riscv/cv1800b.c                          | 168 ++++++++++++++++++++
 hw/riscv/meson.build                        |   3 +
 hw/riscv/milkv_duo.c                        | 122 ++++++++++++++
 include/hw/char/dw8250.h                    |  27 ++++
 include/hw/misc/cv1800b_clk.h               |  24 +++
 include/hw/riscv/cv1800b.h                  |  52 ++++++
 target/riscv/th_csr.c                       |  30 ++++
 16 files changed, 668 insertions(+)
 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

-- 
2.54.0.563.g4f69b47b94-goog
Re: [PATCH RFC 0/5] hw/riscv: Add support for Milk-V Duo board
Posted by Alistair Francis 2 weeks, 3 days ago
On Tue, May 12, 2026 at 7:47 PM Kuan-Wei Chiu <visitorckw@gmail.com> wrote:
>
> Add initial support for the Milk-V Duo board.
>
> This is something I've been playing around with in my local branch, and
> I've reached a point where the implementation is enough to boot OpenSBI
> and reach a Linux shell using an SD card image.

Great job!

>
> I am sending this as an RFC to get early feedback to understand the gap
> between this minimal implementation and what is required for a upstream
> merge. I plan to continue implementing missing blocks (like gpio and
> clk/rst) in future.

Overall this looks good and is going in the right direction. Being
able to boot Linux is a great start and a good achievement.

This could be submitted now, there is no requirement to add extra
functionality to upstream it. It would be great if you could add some
unit tests as well, so then we can test this as part of the QEMU CI.

Alistair
Re: [PATCH RFC 0/5] hw/riscv: Add support for Milk-V Duo board
Posted by Kuan-Wei Chiu 2 weeks, 3 days ago
Hi Alistair,

On Wed, May 13, 2026 at 12:27:37PM +1000, Alistair Francis wrote:
> On Tue, May 12, 2026 at 7:47 PM Kuan-Wei Chiu <visitorckw@gmail.com> wrote:
> >
> > Add initial support for the Milk-V Duo board.
> >
> > This is something I've been playing around with in my local branch, and
> > I've reached a point where the implementation is enough to boot OpenSBI
> > and reach a Linux shell using an SD card image.
> 
> Great job!
> 
> >
> > I am sending this as an RFC to get early feedback to understand the gap
> > between this minimal implementation and what is required for a upstream
> > merge. I plan to continue implementing missing blocks (like gpio and
> > clk/rst) in future.
> 
> Overall this looks good and is going in the right direction. Being
> able to boot Linux is a great start and a good achievement.
> 
> This could be submitted now, there is no requirement to add extra
> functionality to upstream it. It would be great if you could add some
> unit tests as well, so then we can test this as part of the QEMU CI.
> 
Thanks for the prompt response and the review!
I'll try to add some tests and send out as v2.

Regards,
Kuan-Wei