Hi Piotr,
Then, you have two options:
-based on STM32Cube HAL, develop a generic STM32 driver that will benefit to all STM32 based boards.
-develop a Zephyr "native" STM32F4 I2C API that will benefit to STM32F4 family devices (similar to stm32lx.c driver)
Either ways, note that you could use STM32Cube SDK (ext/hal/st/stm32cube/stm32f4xx/soc/stm32f411xe.h) to benefit from
useful structures, macros and defines that provide abstraction capability so you don't have to deal with subtle differences between
similar SoCs (such as stm32f401re and stm32f411re).
Good luck with your project
Erwan