diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotFunction.c b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotFunction.c index 142d7387bf..24f88c0179 100644 --- a/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotFunction.c +++ b/Platform/Ampere/JadePkg/Drivers/SmbiosPlatformDxe/Type09/PlatformSystemSlotFunction.c @@ -38,9 +38,9 @@ // // CPU I2C Bus for IO Expander // -#define S0_RISER_I2C_BUS 0x02 -#define S0_OCP_I2C_BUS 0x02 -#define S1_RISER_I2C_BUS 0x03 +#define S0_RISER_I2C_BUS 0x06 +#define S0_OCP_I2C_BUS 0x06 +#define S1_RISER_I2C_BUS 0x0F // // I2C address of IO Expander devices diff --git a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063.h b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063.h index 6c27247c8e..d3b7bdf8f1 100644 --- a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063.h +++ b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063.h @@ -12,12 +12,13 @@ #include #include +#include #include // // I2C bus address that RTC connected to // -#define I2C_RTC_BUS_ADDRESS 1 +#define I2C_RTC_BUS_ADDRESS (FixedPcdGet8 (PcdRtcBusNumber)) // // I2C RTC bus speed diff --git a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.inf b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.inf index 6ba0049bbd..4a6abb23b7 100644 --- a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.inf +++ b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.inf @@ -35,6 +35,7 @@ GpioLib DxeServicesTableLib I2cLib + PcdLib TimeBaseLib TimerLib UefiLib @@ -44,3 +45,6 @@ [Guids] gEfiEventVirtualAddressChangeGuid + +[Pcd] + gAmpereTokenSpaceGuid.PcdRtcBusNumber diff --git a/Silicon/Ampere/AmpereAltraPkg/Include/Platform/Ac01.h b/Silicon/Ampere/AmpereAltraPkg/Include/Platform/Ac01.h index a115619dfc..633f2ad978 100644 --- a/Silicon/Ampere/AmpereAltraPkg/Include/Platform/Ac01.h +++ b/Silicon/Ampere/AmpereAltraPkg/Include/Platform/Ac01.h @@ -65,12 +65,29 @@ // // The maximum number of I2C bus // -#define AC01_I2C_MAX_BUS_NUM 4 +#define AC01_I2C_MAX_BUS_NUM 18 // // The base address of DW I2C // -#define AC01_I2C_BASE_ADDRESS_LIST 0x1000026B0000ULL, 0x100002750000ULL, 0x100002770000ULL, 0x500002770000ULL +#define AC01_I2C_BASE_ADDRESS_LIST 0x100002690000, /* Socket 0 IIC 2 */ \ + 0x1000026A0000, /* IIC 3 */ \ + 0x1000026B0000, /* IIC 4 */ \ + 0x1000026C0000, /* IIC 5 */ \ + 0x100002750000, /* IIC 6 */ \ + 0x100002760000, /* IIC 7 */ \ + 0x100002770000, /* IIC 8 */ \ + 0x100002780000, /* IIC 9 */ \ + 0x100002790000, /* IIC 10 */ \ + 0x500002690000, /* Socket 1 IIC 2 */ \ + 0x5000026A0000, /* IIC 3 */ \ + 0x5000026B0000, /* IIC 4 */ \ + 0x5000026C0000, /* IIC 5 */ \ + 0x500002750000, /* IIC 6 */ \ + 0x500002760000, /* IIC 7 */ \ + 0x500002770000, /* IIC 8 */ \ + 0x500002780000, /* IIC 9 */ \ + 0x500002790000 /* IIC 10 */ // // The Array of Soc Gpio Base Address diff --git a/Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec b/Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec index 6f312eb32a..831659db96 100644 --- a/Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec +++ b/Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec @@ -61,6 +61,11 @@ # gAmpereTokenSpaceGuid.PcdPlatformConfigUuid|"C416535D-970B-41B9-859A-3CAF0FAF198C"|VOID*|0x00000010 + # + # RTC + # + gAmpereTokenSpaceGuid.PcdRtcBusNumber|0x4|UINT8|0x00000011 + # # SMpro PMpro Pcds # @@ -78,7 +83,7 @@ # # I2C PCDs for SMBUS # - gAmpereTokenSpaceGuid.PcdSmbusI2cBusNumber|0x00|UINT8|0x00000007 + gAmpereTokenSpaceGuid.PcdSmbusI2cBusNumber|0x02|UINT8|0x00000007 gAmpereTokenSpaceGuid.PcdSmbusI2cBusSpeed|100000|UINT32|0x00000008 # Hz #