[PATCH 0/3] i2c: designware: Add DWC_i2c support
From: Aniket Limaye
Date: Sat Sep 19 2026 - 05:07:09 EST
Add new compatible and update driver to support Synopsys Advanced I2C
Controller (DWC_i2c [0]). This is needed since this controller differs
from the existing designware i2c (DW_apb_i2c [1]) in its register
offsets and some register definitions.
[0]: DWC_i2c_reference.pdf
[1]: DW_apb_i2c_databook.pdf
The new register offsets are handled by first refactoring the driver to
use a map of register IDs to their offsets, and then match the
compatible to the respective offset-map. Similarly, also update the
driver to use an updated CON-register definition.
The new compatible also updates driver logic due to changes in register
definitions:
- Interrupts are acknowledged by writing a bitmask to a single CLR_INTR
register instead of reading N dedicated CLR_* registers;
i2c_dw_ack_intr() picks the right method based on dev->flags.
- One HCNT/LCNT register pair is shared between standard and fast speed
instead of having one pair each; i2c_dw_write_timings() writes
whichever value set matches the configured speed.
- No COMP_PARAM_1 register, so FIFO depth and high-speed-mode support
can't be autodetected: FIFO depth now comes from the required
snps,tx-fifo-depth/snps,rx-fifo-depth DT properties, and the
high-speed capability check is skipped.
- No defined CON.RESTART_EN bit; treat it as always set.
The register offsets used for the new DWC_i2c are those present on TI
TDA54 SoC.
Signed-off-by: Aniket Limaye <a-limaye@xxxxxx>
---
Aniket Limaye (3):
dt-bindings: i2c: dw: Add DWC_i2c compatible
i2c: designware: Introduce per-variant register offset and bit-layout tables
i2c: designware: Add snps,dwc-i2c support and new compatible
.../bindings/i2c/snps,designware-i2c.yaml | 33 +++
drivers/i2c/busses/i2c-designware-amdisp.c | 1 +
drivers/i2c/busses/i2c-designware-common.c | 281 ++++++++++++++++++---
drivers/i2c/busses/i2c-designware-core.h | 130 +++++++++-
drivers/i2c/busses/i2c-designware-master.c | 147 ++++++-----
drivers/i2c/busses/i2c-designware-pcidrv.c | 2 +
drivers/i2c/busses/i2c-designware-platdrv.c | 3 +
drivers/i2c/busses/i2c-designware-slave.c | 42 +--
8 files changed, 507 insertions(+), 132 deletions(-)
---
base-commit: 587858367581b9c55c3690f4e63382ad622719d4
change-id: 20260919-tda54-upstream-i2c-d0c67f16b4fc
Best regards,
--
Aniket Limaye <a-limaye@xxxxxx>