soc/amd/picasso: Add MP2 I2C0 and I2C1 controller ACPI devices
This change is to allow AMD MP2 I2C OS driver to access I2C0/1 devices when MP2 firmware is loaded. Change-Id: Iaf25eb4dcf949e4b512ec0e86dbe5ccbc91c3d24 Signed-off-by: Ritul Guru <ritul.bits@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65673 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
106def9645
commit
c58f674411
|
@ -227,6 +227,80 @@ Device (FUR3) {
|
|||
AOAC_DEVICE(FCH_AOAC_DEV_UART3, 0)
|
||||
}
|
||||
|
||||
#if CONFIG(PSP_LOAD_MP2_FW)
|
||||
Device (I2C0) {
|
||||
Name (_HID, "AMDI0011")
|
||||
Name (_UID, 0x0)
|
||||
Method (_CRS, 0) {
|
||||
Local0 = ResourceTemplate() {
|
||||
Interrupt (
|
||||
ResourceConsumer,
|
||||
Edge,
|
||||
ActiveHigh,
|
||||
Exclusive, , , IRQR)
|
||||
{ 0 }
|
||||
Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000)
|
||||
}
|
||||
CreateDWordField (Local0, IRQR._INT, IRQN)
|
||||
If (PICM) {
|
||||
IRQN = II20
|
||||
} Else {
|
||||
IRQN = PI20
|
||||
}
|
||||
If (IRQN == 0x1f) {
|
||||
Return (ResourceTemplate() {
|
||||
Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000)
|
||||
})
|
||||
} Else {
|
||||
Return (Local0)
|
||||
}
|
||||
}
|
||||
|
||||
Method (_STA, 0x0, NotSerialized)
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
|
||||
AOAC_DEVICE(5, 0)
|
||||
}
|
||||
|
||||
Device (I2C1) {
|
||||
Name (_HID, "AMDI0011")
|
||||
Name (_UID, 0x1)
|
||||
Method (_CRS, 0) {
|
||||
Local0 = ResourceTemplate() {
|
||||
Interrupt (
|
||||
ResourceConsumer,
|
||||
Edge,
|
||||
ActiveHigh,
|
||||
Exclusive, , , IRQR)
|
||||
{ 0 }
|
||||
Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000)
|
||||
}
|
||||
CreateDWordField (Local0, IRQR._INT, IRQN)
|
||||
If (PICM) {
|
||||
IRQN = II21
|
||||
} Else {
|
||||
IRQN = PI21
|
||||
}
|
||||
If (IRQN == 0x1f) {
|
||||
Return (ResourceTemplate() {
|
||||
Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000)
|
||||
})
|
||||
} Else {
|
||||
Return (Local0)
|
||||
}
|
||||
}
|
||||
|
||||
Method (_STA, 0x0, NotSerialized)
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
|
||||
AOAC_DEVICE(6, 0)
|
||||
}
|
||||
#endif /* CONFIG(PSP_LOAD_MP2_FW) */
|
||||
|
||||
Device (I2C2) {
|
||||
Name (_HID, "AMDI0010")
|
||||
Name (_UID, 0x2)
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
#if ENV_X86
|
||||
|
||||
#define APU_I2C0_BASE 0xfedc2000
|
||||
#define APU_I2C1_BASE 0xfedc3000
|
||||
#define APU_I2C2_BASE 0xfedc4000
|
||||
#define APU_I2C3_BASE 0xfedc5000
|
||||
#define APU_I2C4_BASE 0xfedc6000
|
||||
|
|
Loading…
Reference in New Issue