So it’s currently not looking at the I2C peripheral speed at all. Which means all the mcu setups would already need to set the I2C peripheral clock up identically. Which is unlikely.
It’d probably be better to calculate the appropriate PRESC for a given peripheral clock. But I suspect a number of MCUs don’t have accurate logic to identify the peripheral clock speed… so that would be tricky.