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. Combined with simple stubs for custom T-Head PMU CSRs, the current implementation can successfully run OpenSBI and boot Linux v7.0 from an SD card to the Linux shell. --- 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 (6): 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 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 | 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 ++++ tests/qtest/meson.build | 3 +- tests/qtest/milkv-duo-test.c | 70 ++++++++ 18 files changed, 741 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.563.g4f69b47b94-goog
