[PATCH v2 0/1] hw/i2c/dw: Add DesignWare I2C controller emulator

AlanoSong@163.com posted 1 patch 19 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260124131537.78942-1-AlanoSong@163.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>
hw/i2c/Kconfig          |   4 +
hw/i2c/dw_i2c.c         | 515 ++++++++++++++++++++++++++++++++++++++++
hw/i2c/meson.build      |   1 +
hw/i2c/trace-events     |   4 +
include/hw/i2c/dw_i2c.h | 131 ++++++++++
5 files changed, 655 insertions(+)
create mode 100644 hw/i2c/dw_i2c.c
create mode 100644 include/hw/i2c/dw_i2c.h
[PATCH v2 0/1] hw/i2c/dw: Add DesignWare I2C controller emulator
Posted by AlanoSong@163.com 19 hours ago
v1: Initial version:
    1) Add DesignWare I2C controller according to DesignWare
       I2C databook v2.01a.
    2) Confirmed under v6.18 kernel driver.
    3) The slave mode is not implemented, cause this feature
       is usually not used.
    4) The 10 bit slave address is not implemented, cause
       this feature is usually not used, and not supported
       by qemu I2C core bus currently.
v2: Refine according to review comments:
    1) Define registers by using registerfields.
    2) Use SPDX license.
    3) Confirmed under v6.18 kernel driver.

------

This patch seems to be a duplicate of Joel & Chris's work:
https://lore.kernel.org/qemu-devel/20260109123211.368869-1-joel@jms.id.au/

It's just a coincidence, :)
But it's okay even if it not been merged, I just want share it and hope
it can help others.

Signed-off-by: Alano Song <AlanoSong@163.com>

Alano Song (1):
  hw/i2c/dw: Add DesignWare I2C controller emulator

 hw/i2c/Kconfig          |   4 +
 hw/i2c/dw_i2c.c         | 515 ++++++++++++++++++++++++++++++++++++++++
 hw/i2c/meson.build      |   1 +
 hw/i2c/trace-events     |   4 +
 include/hw/i2c/dw_i2c.h | 131 ++++++++++
 5 files changed, 655 insertions(+)
 create mode 100644 hw/i2c/dw_i2c.c
 create mode 100644 include/hw/i2c/dw_i2c.h

-- 
2.43.0
Re: [PATCH v2 0/1] hw/i2c/dw: Add DesignWare I2C controller emulator
Posted by Peter Maydell 17 hours ago
On Sat, 24 Jan 2026 at 13:16, <AlanoSong@163.com> wrote:
>
> v1: Initial version:
>     1) Add DesignWare I2C controller according to DesignWare
>        I2C databook v2.01a.
>     2) Confirmed under v6.18 kernel driver.
>     3) The slave mode is not implemented, cause this feature
>        is usually not used.
>     4) The 10 bit slave address is not implemented, cause
>        this feature is usually not used, and not supported
>        by qemu I2C core bus currently.
> v2: Refine according to review comments:
>     1) Define registers by using registerfields.
>     2) Use SPDX license.
>     3) Confirmed under v6.18 kernel driver.
>
> ------
>
> This patch seems to be a duplicate of Joel & Chris's work:
> https://lore.kernel.org/qemu-devel/20260109123211.368869-1-joel@jms.id.au/
>
> It's just a coincidence, :)
> But it's okay even if it not been merged, I just want share it and hope
> it can help others.

Please can everybody who is interested in the designware i2c
model get together and figure out what they want to do as
a forward path for it?

I am not going to review any of these patches until you have
collectively determined which is the best base for doing it.

thanks
-- PMM