Hi, On Thu, Aug 1, 2024 at 10:10 PM Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx> wrote: > You are correct, indeed driver miscalculates those timing parameters in > that case. > > However debugging point of view below is misleading since it doesn't > necessarily match with HW registers since they are not touched and have > values what bootloader has left there. > > i2c_designware i2c_designware.0: Standard Mode HCNT:LCNT = 0:0 Indeed. The debug prints show the incorrect info. Thanks for reminding this. > Would it work if patch just reads the dev->ss_hcnt, dev->ss_lcnt and so > on from HW registers in case they and ic_clk are not set in > i2c_dw_set_timings_master()? Then debug prints and HW values are in sync. That makes sense. The v2 version: https://lore.kernel.org/linux-i2c/20240802130143.26908-1-ahuang12@xxxxxxxxxx/T/#u Please kindly review. Thank you. -- Adrian