There are a number of Dallas 1307 based RTC HATs available for the RPi that don't follow the HAT ID protocol but are simple, inexpensive and widely available. Lets add an I2C driver and then allow the user to enable them in the advanced menu. Once enabled and detected we then dynamically swap them in to provide UEFI runtime RTC.
Its this latter bit of logic which seems to be unique to this platform and probably should be closely reviewed. Jeremy Linton (6): Silicon/Bcm283x: Document the I2C registers Silicon/Bcm283x: Add core I2C drivers Platform/RasberryPi: Create I2C driver bound to RTC Silicon/Maxim: Fix runtime issues Platform/RasberryPi: Add I2C1 to uefi runtime memory map Platform/RaspberryPi: Add menu and build options for HW RTC .../Drivers/BcmI2CPlatform/BcmI2CPlatform.c | 127 +++++++ .../Drivers/BcmI2CPlatform/BcmI2CPlatform.inf | 54 +++ .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 30 ++ .../Drivers/ConfigDxe/ConfigDxe.inf | 1 + .../Drivers/ConfigDxe/ConfigDxeHii.uni | 6 + .../Drivers/ConfigDxe/ConfigDxeHii.vfr | 16 + Platform/RaspberryPi/Include/ConfigVars.h | 4 + Platform/RaspberryPi/RPi3/RPi3.dsc | 7 + Platform/RaspberryPi/RPi4/RPi4.dsc | 30 ++ Platform/RaspberryPi/RPi4/RPi4.fdf | 19 ++ Platform/RaspberryPi/RaspberryPi.dec | 2 + .../Include/IndustryStandard/Bcm2836.h | 34 ++ .../Broadcom/Drivers/I2cDxe/ComponentName.c | 181 ++++++++++ .../Broadcom/Drivers/I2cDxe/DriverBinding.c | 237 ++++++++++++++ Silicon/Broadcom/Drivers/I2cDxe/I2cDxe.c | 309 ++++++++++++++++++ Silicon/Broadcom/Drivers/I2cDxe/I2cDxe.h | 55 ++++ Silicon/Broadcom/Drivers/I2cDxe/I2cDxe.inf | 56 ++++ .../Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c | 36 +- .../Library/Ds1307RtcLib/Ds1307RtcLib.inf | 7 +- 19 files changed, 1208 insertions(+), 3 deletions(-) create mode 100644 Platform/RaspberryPi/Drivers/BcmI2CPlatform/BcmI2CPlatform.c create mode 100644 Platform/RaspberryPi/Drivers/BcmI2CPlatform/BcmI2CPlatform.inf create mode 100644 Silicon/Broadcom/Drivers/I2cDxe/ComponentName.c create mode 100644 Silicon/Broadcom/Drivers/I2cDxe/DriverBinding.c create mode 100644 Silicon/Broadcom/Drivers/I2cDxe/I2cDxe.c create mode 100644 Silicon/Broadcom/Drivers/I2cDxe/I2cDxe.h create mode 100644 Silicon/Broadcom/Drivers/I2cDxe/I2cDxe.inf -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113557): https://edk2.groups.io/g/devel/message/113557 Mute This Topic: https://groups.io/mt/103653096/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-