Re: [PATCH 0/4] Kendryte K230 CMU register model

Bin Meng <[email protected]>
Newsgroups org.nongnu.qemu-devel,org.nongnu.qemu-riscv
Message-ID <CAEUhbmVQid5yboTQzDTANT-zMEzLiJkom0qLfKRV-nP3nq5uaw@mail.gmail.com>
Hello,

On Sun, Aug 9, 2026 at 7:47 PM Simon Law <[email protected]> wrote:
>
> The Kendryte K230 machine currently lacks the Clock Management Unit (CMU)
>   register interface required by the K230 SDK U-Boot and the Linux K230 clock
>   driver. As a result, software probing the PLL and sysclk providers cannot
>   observe the expected reset values or register update semantics.
>
>   This series adds a minimal, deterministic K230 CMU model.
>
>   The model covers:
>
>   - four PLL register blocks at 0x91102000..0x9110203f;
>   - the defined sysclk registers in the 0x91100000 window;
>   - the software-visible SPI2AXI_CLK_DIV register at sysclk offset 0x108;
>   - reset values and writable/reserved/read-only masks;
>   - PLL control write-enable semantics;
>   - write-one-to-trigger update behavior;
>   - deterministic PLL lock and initialization status;
>   - VMState for stable PLL and sysclk register state;
>   - qtest coverage for reset, masks, write-enable, W1T, status, sysclk
>     updates, unknown offsets, and system reset;
>   - K230 machine wiring and user-facing documentation.
>
>   The model intentionally does not propagate clock frequencies to QEMU devices or
>   change CPU execution speed. Peripheral reset, power control, and the
>   guest-initiated K230 reboot backend remain outside the scope of this series.
>   Those functions require separate reset/power models and a matching OpenSBI
>   backend.
>
>   The implementation is based only on the existing K230 machine and does not
>   depend on unmerged RMU, Timer, SPI, or SDHCI device series.
>
>   Testing:
>   - QTEST_QEMU_BINARY=/workspace/qemu/build/qemu-system-riscv64
>     /workspace/qemu/build/tests/qtest/k230-cmu-test
>     (10/10 subtests passed)
>   - QTEST_QEMU_BINARY=/workspace/qemu/build/qemu-system-riscv64
>     /workspace/qemu/build/tests/qtest/k230-wdt-test
>     (7/7 subtests passed)
>   - K230 direct Linux boot and K230 U-Boot boot
>   - Linux K230 clock probe and clk_summary validation
>   - CMU source/destination migration smoke
>
> Signed-off-by: Simon Law <[email protected]>

Is this clock modeling a must-have to make U-Boot or Linux boot on the
QEMU k230 machine?

Is an unimplemented region enough to make the software happy?

Regards,
Bin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.