From 59e97b6378694d1807895c573624b7a2532bebfd Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Thu, 15 Aug 2019 17:49:11 -0600 Subject: soc/amd/picasso: Adjust I2C ASL Clarify names as I2C2, etc. Use iomap.h defines for base addresses. Update IRQs. Change-Id: I3800592e4b0bcb681d0dcf24f69e269f845be025 Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/c/coreboot/+/34915 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/amd/picasso/acpi/sb_fch.asl | 38 +++++++++++-------------------------- src/soc/amd/picasso/i2c.c | 6 +++--- 2 files changed, 14 insertions(+), 30 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/picasso/acpi/sb_fch.asl b/src/soc/amd/picasso/acpi/sb_fch.asl index 13b9025970..680f496611 100644 --- a/src/soc/amd/picasso/acpi/sb_fch.asl +++ b/src/soc/amd/picasso/acpi/sb_fch.asl @@ -113,13 +113,13 @@ Device (FUR3) { } } -Device (I2CA) { +Device (I2C2) { Name (_HID, "AMD0010") - Name (_UID, 0x0) + Name (_UID, 0x2) Name (_CRS, ResourceTemplate() { - IRQ (Edge, ActiveHigh, Exclusive) { 3 } - Memory32Fixed (ReadWrite, 0xFEDC2000, 0x1000) + IRQ (Edge, ActiveHigh, Exclusive) { 4 } + Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000) }) Method (_STA, 0x0, NotSerialized) @@ -128,43 +128,27 @@ Device (I2CA) { } } -Device (I2CB) +Device (I2C3) { Name (_HID, "AMD0010") - Name (_UID, 0x1) - Name (_CRS, ResourceTemplate() - { - IRQ (Edge, ActiveHigh, Exclusive) { 15 } - Memory32Fixed (ReadWrite, 0xFEDC3000, 0x1000) - }) - Method (_STA, 0x0, NotSerialized) - { - Return (0x0F) - } -} - -Device (I2CC) { - Name (_HID, "AMD0010") - Name (_UID, 0x2) - Name (_CRS, ResourceTemplate() - { + Name (_UID, 0x3) + Name (_CRS, ResourceTemplate() { IRQ (Edge, ActiveHigh, Exclusive) { 6 } - Memory32Fixed (ReadWrite, 0xFEDC4000, 0x1000) + Memory32Fixed(ReadWrite, APU_I2C3_BASE, 0x1000) }) - Method (_STA, 0x0, NotSerialized) { Return (0x0F) } } -Device (I2CD) +Device (I2C4) { Name (_HID, "AMD0010") - Name (_UID, 0x3) + Name (_UID, 0x4) Name (_CRS, ResourceTemplate() { IRQ (Edge, ActiveHigh, Exclusive) { 14 } - Memory32Fixed(ReadWrite, 0xFEDC5000, 0x1000) + Memory32Fixed(ReadWrite, APU_I2C4_BASE, 0x1000) }) Method (_STA, 0x0, NotSerialized) { diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index 87866433d1..bcdf3850a8 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -73,11 +73,11 @@ const char *i2c_acpi_name(const struct device *dev) { switch (dev->path.mmio.addr) { case APU_I2C2_BASE: - return "I2CC"; + return "I2C2"; case APU_I2C3_BASE: - return "I2CD"; + return "I2C3"; case APU_I2C4_BASE: - return "I2CE"; + return "I2C4"; default: return NULL; } -- cgit v1.2.3