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/[email protected]/
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 <[email protected]>
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