hw/misc: add K230 PMU device model
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | hw/misc: add K230 PMU deviceMAINTAINERS hw/ hw/ +2 more | +320 | 0 replies | |
| 2/3 | hw/riscv: wire up K230 PMU in the SoChw/ hw/ include/ | +13 | 0 replies | |
| 3/3 | tests/qtest: add k230-pmu-testtests/ tests/ | +138 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] hw/misc: add K230 PMU device model
This series adds a device model for the K230 power management unit (PMU) and wires it into the K230 SoC.
The PMU (K230 TRM V0.3.1 chapter 14) controls the core power-on/off path through two PMIC output pads and reports six PAD inputs plus RTC interrupts to the CPU. This minimal model covers the APB register bank with TRM reset values and write masks, interrupt detection state (PAD64..PAD69 inputs setting PMU_INT_STATE, the interrupt line following PMU_INT_STATE & PMU_INT0_TO_CPU, W1C clear) and the PAD70/PAD71 outputs driven by PMU_SYSCTRL_REG. Long/short press timing, edge counting and debounce are intentionally left for a follow-up.
Patch 1 adds the device model, patch 2 wires it into the K230 SoC (MMIO 0x91000000, small-core PLIC source 81) and patch 3 adds qtest coverage. The k230 qtests pass under qtest-riscv64.
JunWei Li (3):
hw/misc: add K230 PMU device
hw/riscv: wire up K230 PMU in the SoC
tests/qtest: add k230-pmu-test
MAINTAINERS | 3 + hw/misc/Kconfig | 3 + hw/misc/k230_pmu.c | 242 ++++++++++++++++++++++++++++++++++++ hw/misc/meson.build | 1 + hw/riscv/Kconfig | 1 + hw/riscv/k230.c | 12 +- include/hw/misc/k230_pmu.h | 71 +++++++++++ include/hw/riscv/k230.h | 3 + tests/qtest/k230-pmu-test.c | 136 ++++++++++++++++++++ tests/qtest/meson.build | 3 +- 10 files changed, 471 insertions(+), 4 deletions(-) create mode 100644 hw/misc/k230_pmu.c create mode 100644 include/hw/misc/k230_pmu.h create mode 100644 tests/qtest/k230-pmu-test.c
Signature · 1 line
2.20.1