Re: [PATCH] i2c: stm32f7: fix timing computation ignoring i2c-analog-filter
From: Andi Shyti
Date: Mon Jun 08 2026 - 14:40:11 EST
Hi Guillermo,
On Tue, May 26, 2026 at 11:12:09AM +0200, Guillermo Rodríguez wrote:
> stm32f7_i2c_compute_timing() uses i2c_dev->analog_filter to pick
> the analog filter delay, but i2c_dev->analog_filter is parsed from
> the "i2c-analog-filter" DT property only after the compute_timing
> loop in stm32f7_i2c_setup_timing(), so in practice the timing
> calculations always ignore the analog filter. On an STM32MP1 board
> with clock-frequency = <400000> and i2c-analog-filter set, measured
> SCL frequency was ~382 kHz.
>
> This also affects (widens) the computed SDADEL range. At high bus
> clock speeds, this can select an SDADEL value that violates tVD;DAT
> (data valid time).
>
> Fix by parsing "i2c-analog-filter" before the compute_timing loop.
>
> Fixes: 83c3408f7b9c ("i2c: stm32f7: support DT binding i2c-analog-filter")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Guillermo Rodríguez <guille.rodriguez@xxxxxxxxx>
merged to i2c/i2c-host-fixes.
Thanks,
Andi