From: Jack Wang <163wangjack@gmail.com>
To: qemu-devel@nongnu.org
Cc: Chao Liu <chao.liu.zevorn@gmail.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Alistair Francis <alistair.francis@wdc.com>,
Jack Wang <163wangjack@gmail.com>
Subject: [PATCH v2 0/2] hw/riscv/k230: add the K230 Reset Management Unit
Date: Mon, 20 Jul 2026 02:02:45 +0800 [thread overview]
Message-ID: <20260719180247.8660-1-163wangjack@gmail.com> (raw)
In-Reply-To: <20260709031237.21284-1-163wangjack@gmail.com> <20260717101101.1288002-1-caojunze424@gmail.com> <8b4f4583-63b0-4d0f-b349-a0177ff19318@oss.qualcomm.com>
References: <20260709031237.21284-1-163wangjack@gmail.com>
This v2 patch reply on review of
This series models the Kendryte K230 Reset Management Unit (RMU), a bank of
reset-control registers at 0x91101000, and wires it into the K230 SoC. It
replaces the create_unimplemented_device("rmu") stub so guest reset drivers
(drivers/reset/reset-k230.c) work against a real model.
Patch 1 adds the standalone device model; patch 2 wires it into the SoC and
adds the qtest. The qtest is deliberately placed in patch 2 accorinding to
suggestion from Daniel: it drives "-machine k230", which only
exists once the device is wired up.
Register semantics, reset values and reserved-bit masks are taken from the
K230 TRM chapter 2.1 "Reset" (V0.3.1) and cross-checked against the mainline
Linux driver.
Changes since v1:
- Switched to the Resettable API (phases.hold instead of the legacy
device_class_set_legacy_reset()), per Daniel's review.
- Model real reset propagation: the RMU now cold-resets the two linked
watchdogs via "wdt0"/"wdt1" QOM links when their PERI0 reset bits are
written (Cao review).
- CPU1 reset request is now a two-step assert/deassert (not self-clearing),
matching the hardware (Cao review ).
- Filled in the documented per-register reset values and reserved-bit
(writable) masks from the TRM; the *_rst_done status bits reset to 0, so
they follow the per-bit "Reset" column rather than the summarised total.
- Added the reset-time-control (*_RST_TIM) registers as plain storage with
their documented reset values.
- Fixed the storage mask so the upper half of non-write-enable registers is
writable (surfaced by the new TIM registers).
- New qtests: reset values, TIM storage, reserved-bit read-only, CPU1
two-step, and real watchdog reset propagation.
- Moved the qtest from patch 1 to patch 2 for bisectability; added the
MAINTAINERS entries.
Jack Wang (2):
hw/misc/k230_rmu: add Kendryte K230 Reset Management Unit model
hw/riscv/k230: wire up the RMU device
MAINTAINERS | 3 +
docs/system/riscv/k230.rst | 1 +
hw/misc/Kconfig | 3 +
hw/misc/k230_rmu.c | 425 ++++++++++++++++++++++++++++++++++++
hw/misc/meson.build | 1 +
hw/misc/trace-events | 7 +
hw/riscv/Kconfig | 1 +
hw/riscv/k230.c | 15 +-
include/hw/misc/k230_rmu.h | 126 +++++++++++
include/hw/riscv/k230.h | 2 +
tests/qtest/k230-rmu-test.c | 225 +++++++++++++++++++
tests/qtest/meson.build | 3 +-
12 files changed, 808 insertions(+), 4 deletions(-)
create mode 100644 hw/misc/k230_rmu.c
create mode 100644 include/hw/misc/k230_rmu.h
create mode 100644 tests/qtest/k230-rmu-test.c
--
2.53.0
next prev parent reply other threads:[~2026-07-19 18:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 3:12 [RFC PATCH 0/2] *** Add k230 reset management unit support *** jack wang
2026-07-09 3:12 ` [RFC PATCH 1/2] hw/misc/k230_rmu: add Kendryte K230 Reset Management Unit model jack wang
2026-07-16 17:48 ` Daniel Henrique Barboza
2026-07-19 18:02 ` Jack Wang [this message]
2026-07-19 18:02 ` [PATCH v2 " Jack Wang
2026-07-19 18:02 ` [PATCH v2 2/2] hw/riscv/k230: wire up the RMU device Jack Wang
2026-07-17 10:11 ` [RFC PATCH 1/2] hw/misc/k230_rmu: add Kendryte K230 Reset Management Unit model Junze Cao
2026-07-09 3:12 ` [RFC PATCH 2/2] hw/riscv/k230: wire up the RMU device jack wang
2026-07-16 17:56 ` Daniel Henrique Barboza
2026-07-17 13:41 ` Chao Liu
2026-07-17 13:56 ` Daniel Henrique Barboza
2026-07-17 14:04 ` Chao Liu
2026-07-15 11:56 ` [RFC PATCH 0/2] *** Add k230 reset management unit support *** Jack wang
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=20260719180247.8660-1-163wangjack@gmail.com \
--to=163wangjack@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=chao.liu.zevorn@gmail.com \
--cc=dbarboza@ventanamicro.com \
--cc=qemu-devel@nongnu.org \
/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.