edk2-rk3588
edk2-rk3588 copied to clipboard
Same I2C bus is shared between HYM8563 and FUSB302 on some platforms
This is going to be a problem when that I2C peripheral will be exposed to the OS in order to enable proper USB-C functionality.
The RTC hardware is accessed at runtime (GetTime/SetTime services) through the UEFI drivers, meaning nothing else (i.e. the OS drivers) shall touch I2C or there may be a race condition, besides the peripheral being configured differently.
It would pretty much require moving I2C functionality on that bus to EL3, which would then get invoked by both UEFI and OS I2C drivers through SMC, avoiding raw MMIO access and maintaining synchronization. This may affect performance however.
..or, maybe have some shared runtime memory that can be used to track locking state between drivers?