From 4c757088dcb708761efbd250d0faaddee7873e43 Mon Sep 17 00:00:00 2001 From: Timofey Titovets Date: Fri, 20 Sep 2024 22:37:26 +0200 Subject: [PATCH] stm32f0/i2c: define h7 timings Signed-off-by: Timofey Titovets --- src/stm32/stm32f0_i2c.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stm32/stm32f0_i2c.c b/src/stm32/stm32f0_i2c.c index d692c62412a8..2ad927e84438 100644 --- a/src/stm32/stm32f0_i2c.c +++ b/src/stm32/stm32f0_i2c.c @@ -145,6 +145,10 @@ static const struct timingr i2c_timings[3] = { {.presc = 0xB, .scll = 0x13, .sclh = 0xF, .sdadel = 0x2, .scldel = 0x4}, {.presc = 0x5, .scll = 0x9, .sclh = 0x3, .sdadel = 0x3, .scldel = 0x3}, {.presc = 0x5, .scll = 0x3, .sclh = 0x1, .sdadel = 0x0, .scldel = 0x1}, +#elif CONFIG_MACH_STM32H7 + {.presc = 0xD, .scll = 0x23, .sclh = 0x1F, .sdadel = 0x2, .scldel = 0x4}, + {.presc = 0x6, .scll = 0x10, .sclh = 0xB, .sdadel = 0x2, .scldel = 0x3}, + {.presc = 0x2, .scll = 0xA, .sclh = 0x7, .sdadel = 0x0, .scldel = 0x1}, #else {.presc = 0xB, .scll = 0x13, .sclh = 0xF, .sdadel = 0x2, .scldel = 0x4}, {.presc = 0xB, .scll = 0x13, .sclh = 0xF, .sdadel = 0x2, .scldel = 0x4},