diff --git a/edk2-platforms/Platform/OrangePi/OrangePi5/Library/RockchipPlatformLib/RockchipPlatformLib.c b/edk2-platforms/Platform/OrangePi/OrangePi5/Library/RockchipPlatformLib/RockchipPlatformLib.c index 8d87d275..b25d2bd7 100644 --- a/edk2-platforms/Platform/OrangePi/OrangePi5/Library/RockchipPlatformLib/RockchipPlatformLib.c +++ b/edk2-platforms/Platform/OrangePi/OrangePi5/Library/RockchipPlatformLib/RockchipPlatformLib.c @@ -190,6 +190,9 @@ I2cGetBase ( switch (id) { case 0: Base = 0xFD880000; + /* io mux M2 */ + PMU2_IOC->GPIO0D_IOMUX_SEL_L = (0x0F00UL << 16) | 0x0300; + PMU2_IOC->GPIO0D_IOMUX_SEL_L = (0x00F0UL << 16) | 0x0030; break; case 1: Base = 0xFEA90000; diff --git a/edk2-platforms/Platform/OrangePi/OrangePi5/OrangePi5.dsc b/edk2-platforms/Platform/OrangePi/OrangePi5/OrangePi5.dsc index 070e0c89..fb7dd45f 100644 --- a/edk2-platforms/Platform/OrangePi/OrangePi5/OrangePi5.dsc +++ b/edk2-platforms/Platform/OrangePi/OrangePi5/OrangePi5.dsc @@ -147,14 +147,18 @@ gRockchipTokenSpaceGuid.PcdMemoryVendorName|"TBD" # I2C - gRockchipTokenSpaceGuid.PcdI2cSlaveAddresses|{ 0x51 } - gRockchipTokenSpaceGuid.PcdI2cSlaveBuses|{ 0x2 } - gRockchipTokenSpaceGuid.PcdI2cControllersEnabled|{ 0x2 } + gRockchipTokenSpaceGuid.PcdI2cSlaveAddresses|{ 0x42, 0x43 } + gRockchipTokenSpaceGuid.PcdI2cSlaveBuses|{ 0x0, 0x0 } + gRockchipTokenSpaceGuid.PcdI2cControllersEnabled|{ 0x0 } gRockchipTokenSpaceGuid.PcdI2cClockFrequency|198000000 gRockchipTokenSpaceGuid.PcdI2cBaudRate|100000 gRockchipTokenSpaceGuid.PcdI2cBusCount|1 gRockchipTokenSpaceGuid.PcdI2cDemoAddresses|{ 0x51 } #/* RTCYM8563TS 0x51@bus2 */ gRockchipTokenSpaceGuid.PcdI2cDemoBuses|{ 0x2 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorAddresses|{ 0x42, 0x43 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorBuses|{ 0x0, 0x0 } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorMinVoltages|{ UINT32(550000), UINT32(550000) } + gRockchipTokenSpaceGuid.PcdRk860xRegulatorMaxVoltages|{ UINT32(1050000), UINT32(1050000) } ## UART2 - Serial Terminal DEFINE SERIAL_BASE = 0xFEB50000 # UART2 @@ -420,6 +424,7 @@ MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf Silicon/Rockchip/Drivers/I2c/I2cDemoDxe/I2cDemoDxe.inf Silicon/Rockchip/Applications/I2cDemoTest/I2cDemoTest.inf + Silicon/Rockchip/Drivers/I2c/Rk860xRegulatorDxe/Rk860xRegulatorDxe.inf # # MMC/SD diff --git a/edk2-platforms/Platform/OrangePi/OrangePi5/OrangePi5.fdf b/edk2-platforms/Platform/OrangePi/OrangePi5/OrangePi5.fdf index 5203822a..b0efc4b1 100644 --- a/edk2-platforms/Platform/OrangePi/OrangePi5/OrangePi5.fdf +++ b/edk2-platforms/Platform/OrangePi/OrangePi5/OrangePi5.fdf @@ -153,6 +153,7 @@ READ_LOCK_STATUS = TRUE INF Silicon/Rockchip/Drivers/I2c/I2cDxe/I2cDxe.inf INF MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf # INF Silicon/Rockchip/Drivers/I2c/I2cDemoDxe/I2cDemoDxe.inf + INF Silicon/Rockchip/Drivers/I2c/Rk860xRegulatorDxe/Rk860xRegulatorDxe.inf # # Virtual Keyboard