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

Kuan-Wei Chiu posted 5 patches 2 days, 8 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260616190147.1286316-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>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
MAINTAINERS                                 |  12 ++
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                       |  90 +++++++++++
hw/misc/meson.build                         |   1 +
hw/riscv/Kconfig                            |  14 ++
hw/riscv/cv1800b.c                          | 168 ++++++++++++++++++++
hw/riscv/meson.build                        |   3 +
hw/riscv/milkv_duo.c                        | 124 +++++++++++++++
include/hw/char/dw8250.h                    |  27 ++++
include/hw/misc/cv1800b_clk.h               |  24 +++
include/hw/riscv/cv1800b.h                  |  52 ++++++
tests/qtest/meson.build                     |   3 +-
tests/qtest/milkv-duo-test.c                |  70 ++++++++
17 files changed, 714 insertions(+), 1 deletion(-)
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 100644 tests/qtest/milkv-duo-test.c
[PATCH v3 0/5] hw/riscv: Add support for Milk-V Duo board
Posted by Kuan-Wei Chiu 2 days, 8 hours ago
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.
---
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 (5):
  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

 MAINTAINERS                                 |  12 ++
 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                       |  90 +++++++++++
 hw/misc/meson.build                         |   1 +
 hw/riscv/Kconfig                            |  14 ++
 hw/riscv/cv1800b.c                          | 168 ++++++++++++++++++++
 hw/riscv/meson.build                        |   3 +
 hw/riscv/milkv_duo.c                        | 124 +++++++++++++++
 include/hw/char/dw8250.h                    |  27 ++++
 include/hw/misc/cv1800b_clk.h               |  24 +++
 include/hw/riscv/cv1800b.h                  |  52 ++++++
 tests/qtest/meson.build                     |   3 +-
 tests/qtest/milkv-duo-test.c                |  70 ++++++++
 17 files changed, 714 insertions(+), 1 deletion(-)
 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 100644 tests/qtest/milkv-duo-test.c

-- 
2.54.0.1136.gdb2ca164c4-goog
Re: [PATCH v3 0/5] hw/riscv: Add support for Milk-V Duo board
Posted by Chao Liu 1 day, 21 hours ago
On Tue, Jun 16, 2026 at 07:01:42PM +0800, Kuan-Wei Chiu wrote:
Hi Kuan-Wei,

> 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.
Can you add a document for the Milk-V Duo board?

Thanks,
Chao
> ---
> 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 (5):
>   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
> 
>  MAINTAINERS                                 |  12 ++
>  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                       |  90 +++++++++++
>  hw/misc/meson.build                         |   1 +
>  hw/riscv/Kconfig                            |  14 ++
>  hw/riscv/cv1800b.c                          | 168 ++++++++++++++++++++
>  hw/riscv/meson.build                        |   3 +
>  hw/riscv/milkv_duo.c                        | 124 +++++++++++++++
>  include/hw/char/dw8250.h                    |  27 ++++
>  include/hw/misc/cv1800b_clk.h               |  24 +++
>  include/hw/riscv/cv1800b.h                  |  52 ++++++
>  tests/qtest/meson.build                     |   3 +-
>  tests/qtest/milkv-duo-test.c                |  70 ++++++++
>  17 files changed, 714 insertions(+), 1 deletion(-)
>  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 100644 tests/qtest/milkv-duo-test.c
> 
> -- 
> 2.54.0.1136.gdb2ca164c4-goog
>