soc/amd/stoneyridge: Add I2C support
BUG=b:69416132
BRANCH=none
TEST=make
Change-Id: Id940af917c9525aba7bc25eea0821f5f36a36653
Signed-off-by: Chris Ching <chingcodes@chromium.org>
Reviewed-on: https://review.coreboot.org/22959
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
diff --git a/src/soc/amd/stoneyridge/lpc.c b/src/soc/amd/stoneyridge/lpc.c
index 1e03fea..10f4a4b 100644
--- a/src/soc/amd/stoneyridge/lpc.c
+++ b/src/soc/amd/stoneyridge/lpc.c
@@ -137,6 +137,12 @@
res->size = 0x00001000;
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
+ /* I2C devices (all 4 devices) */
+ res = new_resource(dev, 4);
+ res->base = I2C_BASE_ADDRESS;
+ res->size = I2C_DEVICE_SIZE * I2C_DEVICE_COUNT;
+ res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
+
compact_resources(dev);
/* Allocate ACPI NVS in CBMEM */