Re: [PATCH v3 1/2] hw/gpio: add K230 GPIO controller model
Bin Meng <[email protected]>
| Newsgroups | org.nongnu.qemu-devel,org.nongnu.qemu-riscv |
|---|---|
| Message-ID | <CAEUhbmXMKug9v2x9PaJTXiwnF+o0HqQsiY+PtCL6eYtGZ8_ViA@mail.gmail.com> |
Hi Junze, On Fri, Aug 14, 2026 at 5:21 PM Junze Cao <[email protected]> wrote: > > On 2026-08-14 15:26:41+08:00, Bin Meng wrote: > > On Mon, Aug 10, 2026 at 4:02 AM guochun wang <[email protected]> wrote: > > > > > Implement a K230 SoC APB GPIO controller model for QEMU, derived from > > > the Synopsys DesignWare APB GPIO (the Linux gpio-k230 driver is based > > > on gpio-dwapb.c and shares the same register layout), with a > > > Canaan-specific compatible ("canaan,k230-apb-gpio") and hardlock > > > integration. The model is capable of running the Linux gpio-k230 driver > > > and driving external input/output lines. Behaviour follows the K230 > > > Technical Reference Manual v0.3.1. > > > > Please split the k230_gpio model into 2 separate models: > > > > - One is generic Synopsys DesignWare GPIO IP model > > - Optional Canann K230 specific wrapper glue model to the dw-gpio IP > > (if the generic Synopsys DesignWare GPIO IP model, or plus some unimp > > region, is good enough to make the software happy, no need to create > > this one) > > Hi Bin Meng, > > Thanks for the detailed review. > Regarding the suggestion to abstract this into a generic Synopsys DesignWare APB GPIO model, I have a question: do you know of any other QEMU SoCs that use this IP and would benefit from a shared model? > If there is no immediate second user, I wonder whether it might be premature to generalize now, especially while we still need to complete the K230-specific behavior. > There is no other immediate second user as far as I know. But Synopsys DesignWare IP is not like others, and it's commonly seen on many SoCs. For RISC-V, I can see Eswin EIC7700, Sophgo CV1800B (Milk-V Duo), Sophgo SG2042 / SG2044 and T-Head TH1520 (Lichee Pi 4A) all use the same Synopsys GPIO IP, and they are all good candidate of QEMU models in the future. What K230-specific behavior are you concerned about? Regards, Bin