Re: [PATCH v5 1/2] dt-bindings: i2c: Add Synopsys DWC_i2c controller

From: Aniket Limaye

Date: Thu Nov 12 2026 - 13:42:23 EST




On 11/11/26 18:54, Mark Brown wrote:
On Wed, Nov 11, 2026 at 09:41:40AM +0100, Krzysztof Kozlowski wrote:
On Wed, Nov 11, 2026 at 12:05:15AM +0000, Mark Brown wrote:

I still think we should have a fallback compatible here, while we can't
discover the FIFO depths all the uses have a programmed trigger and we
know the minimum depth configurable in the IP so we can fall back to
using that. This would be useful for distro kernels, it's one less
thing that forces using a kernel with specific SoC support.

If the driver does not match on such generic compatible - and that's my
impression from commit msg - then it is pretty useless.

The driver can match on a generic compatible, it just doesn't right now.
It's getting the FIFO depth from the compatible but as I observe above
the minimum FIFO depth is known so we can just use that as the fallback,
we program the trigger points for the FIFO so it doesn't matter if there
is more space than we're using.

So if I understand it correctly,
1. you'd rather the driver have a generic compatible such that we can have distro kernels not requiring specific SOC support for this driver.
2. AND it is possible to have a *sane* fallback by using the IP's generic minimum fifo depth. The DWC_i2c manual specifies IC_TX_BUFFER_DEPTH and IC_RX_BUFFER_DEPTH as 2..1024, so using depth of 2 as a fallback would be functional on any integration, just slower.

Krzysztof,

What are your thoughts on having a generic *fallback* compatible "snps,dwc-adv-i2c" , used after a SoC-specific one, i.e.
compatible = "ti,tda54-i2c", "snps,dwc-adv-i2c";

The driver would match both. "ti,tda54-i2c" keeps its real 32/32 FIFO depths, and the fallback uses 2/2.

Thanks,
Aniket