i2c: piix4: ignore ACPI resource conflict on X470 AORUS ULTRA GAMING
PATCH 1/1 i2c: piix4: ignore ACPI resource conflict on X470 AORUS ULTRA GAMING
The \GSA1 WMI device in the board's SSDT declares an OpRegion over the FCH SMBus registers (\GSA1.SMBI, 0xb00-0xb0f), so the driver refuses to bind and the board has no SMBus adapter: SPD EEPROMs can't be read.
The AML that touches the region is only reachable through the \GSA1.WMBB SMBus commands (0x5e-0x6d) and DIMM queries (0x130, 0x136) used by Gigabyte's Windows tools. On Linux only gigabyte-wmi calls WMBB, and it only issues board-info and temperature queries, so nothing races the driver for the controller. This was checked against BIOS F66d.
acpi_enforce_resources=lax would also work, but it drops the check for every driver on the system, not just this one region.
Skip acpi_check_region() via a DMI match on the board name (which the firmware reports as "X470 AORUS ULTRA GAMING-CF"), and only for the SMBus base the OpRegion covers. Other ports, such as the aux controller at 0xb20, keep the normal check.
--- drivers/i2c/busses/i2c-piix4.c | 43 +++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-)
drivers/i2c/busses/i2c-piix4.c +40 -3
@@ -126,6 +126,43 @@ static const struct dmi_system_id piix4_dmi_blacklist[] = { { } }; +/* +* Boards whose ACPI tables declare an OpRegion over the SMBus registers +* that only AML reachable from vendor WMI methods uses. On Gigabyte's +* X470 AORUS ULTRA GAMING, \GSA1.SMBI is only touched through the +* \GSA1.WMBB SMBus commands (0x5e-0x6d) used by Gigabyte's Windows +* tools, which nothing on Linux issues, so the conflict is nominal. +* +* driver_data holds the SMBus base the OpRegion covers; the ACPI check +* is only skipped for that port. +*/ +static const struct dmi_system_id piix4_dmi_acpi_ignore[] = { + { + .ident ="Gigabyte X470 AORUS ULTRA GAMING" , + .matches = { +DMI_EXACT_MATCH (DMI_BOARD_VENDOR , +"Gigabyte Technology Co., Ltd." ), +DMI_EXACT_MATCH (DMI_BOARD_NAME , +"X470 AORUS ULTRA GAMING-CF" ), + }, + .driver_data = (void *)0xb00 , + }, + { } +}; + +static int piix4_acpi_check_region (struct pci_dev *dev,unsigned short smba) +{ +const struct dmi_system_id *dmi =dmi_first_match (piix4_dmi_acpi_ignore); + +if (dmi && (uintptr_t )dmi->driver_data == smba) { +dev_info (&dev->dev, +"Ignoring ACPI resource conflict at 0x%x\n" , smba); +return 0 ; + } + +return acpi_check_region (smba,SMBIOSIZE , piix4_driver.name); +} +/* The IBM entry is in a separate table because we only check it on Intel-based systems */ static const struct dmi_system_id piix4_dmi_ibm[] = {
@@ -264,7 +301,7 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, } } -if (acpi_check_region (piix4_smba,SMBIOSIZE , piix4_driver.name)) +if (piix4_acpi_check_region (PIIX4_dev, piix4_smba))return -ENODEV ;if (!request_region (piix4_smba,SMBIOSIZE , piix4_driver.name)) {
@@ -403,7 +440,7 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,if (retval)return retval; -if (acpi_check_region (piix4_smba,SMBIOSIZE , piix4_driver.name)) +if (piix4_acpi_check_region (PIIX4_dev, piix4_smba))return -ENODEV ;if (!request_region (piix4_smba,SMBIOSIZE , piix4_driver.name)) {
@@ -502,7 +539,7 @@ static int piix4_setup_aux(struct pci_dev *PIIX4_dev,return -ENODEV ; } -if (acpi_check_region (piix4_smba,SMBIOSIZE , piix4_driver.name)) +if (piix4_acpi_check_region (PIIX4_dev, piix4_smba))return -ENODEV ;if (!request_region (piix4_smba,SMBIOSIZE , piix4_driver.name)) {
Signature · 1 line
2.56.1