Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/60174 )
Change subject: drivers/i2c/generic: Print error when using _CRS and PowerResource ......................................................................
drivers/i2c/generic: Print error when using _CRS and PowerResource
Exposing the GPIOs via an ACPI PowerResource and the _CRS results in the OS driver and ACPI thinking they own the GPIO. This can cause timing problems because it's not clear which system should be controlling the GPIO. I'm making this an error because we should really clean these up.
BUG=b: TEST=Boot guybrush and see error:
I2C: 02:5d: ERROR: Exposing GPIOs in Power Resource and _CRS _SB.I2C1.H05D: Goodix Touchscreen at I2C: 02:5d
Signed-off-by: Raul E Rangel rrangel@chromium.org Change-Id: Ifcc42ed81fff295fb168a0b343e96b3a650b1c84 --- M src/drivers/i2c/generic/generic.c 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/60174/1
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 656b9e6..a993fe0 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -65,6 +65,16 @@ return; }
+ if (config->has_power_resource && !config->disable_gpio_export_in_crs) { + /* + * This case will most likely cause timing problems. The OS driver might be + * controlling the GPIOs, but the ACPI Power Resource will also be controlling + * them. This will result in the two fighting and stomping on each other. + */ + printk(BIOS_ERR, "%s: ERROR: Exposing GPIOs in Power Resource and _CRS\n", + dev_path(dev)); + } + /* Device */ acpigen_write_scope(scope); acpigen_write_device(acpi_device_name(dev));