From 038829feb36b351013a119769c05e2ef996911bc Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 25 Jan 2026 20:11:20 -0600 Subject: [PATCH] soc/intel: Use chipset.cb for SMBUS device ops linking Move SMBUS device operations linking from PCI Device ID matching to chipset.cb files for all Intel SoCs that have them, matching the approach used by Skylake. Remove corresponding DIDs from smbus.c for these SoCs; keep DID matching only for SoCs without chipset.cb files. This standardizes the approach across Intel SoCs and makes the SMBUS controller configuration explicit in devicetree, and prevents the endless proliferation of DIDs in the common driver code. Change-Id: I1c742836d923eb8f521bdbd7fa8260c82c1156ac Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/90918 Tested-by: build bot (Jenkins) Reviewed-by: Jakub "Kuba" Czapiga --- src/soc/intel/alderlake/chipset.cb | 2 +- src/soc/intel/alderlake/chipset_pch_s.cb | 2 +- src/soc/intel/apollolake/chipset_apl.cb | 2 +- src/soc/intel/apollolake/chipset_glk.cb | 2 +- src/soc/intel/cannonlake/chipset.cb | 2 +- src/soc/intel/cannonlake/chipset_pch_h.cb | 2 +- src/soc/intel/common/block/smbus/smbus.c | 21 --------------------- src/soc/intel/jasperlake/chipset.cb | 2 +- src/soc/intel/meteorlake/chipset.cb | 2 +- src/soc/intel/pantherlake/chipset_ptl.cb | 2 +- src/soc/intel/pantherlake/chipset_wcl.cb | 2 +- src/soc/intel/tigerlake/chipset.cb | 2 +- src/soc/intel/tigerlake/chipset_pch_h.cb | 2 +- 13 files changed, 12 insertions(+), 33 deletions(-) diff --git a/src/soc/intel/alderlake/chipset.cb b/src/soc/intel/alderlake/chipset.cb index 36685783a2..c8b4b4283e 100644 --- a/src/soc/intel/alderlake/chipset.cb +++ b/src/soc/intel/alderlake/chipset.cb @@ -268,7 +268,7 @@ chip soc/intel/alderlake device pci 1f.1 alias p2sb hidden end device pci 1f.2 alias pmc hidden end device pci 1f.3 alias hda off end - device pci 1f.4 alias smbus off end + device pci 1f.4 alias smbus off ops smbus_ops end device pci 1f.5 alias fast_spi on end device pci 1f.6 alias gbe off end device pci 1f.7 alias south_tracehub off end diff --git a/src/soc/intel/alderlake/chipset_pch_s.cb b/src/soc/intel/alderlake/chipset_pch_s.cb index a7f2b64399..fc575bc583 100644 --- a/src/soc/intel/alderlake/chipset_pch_s.cb +++ b/src/soc/intel/alderlake/chipset_pch_s.cb @@ -413,7 +413,7 @@ chip soc/intel/alderlake device pci 1f.1 alias p2sb hidden end device pci 1f.2 alias pmc hidden end device pci 1f.3 alias hda off end - device pci 1f.4 alias smbus off end + device pci 1f.4 alias smbus off ops smbus_ops end device pci 1f.5 alias fast_spi on end device pci 1f.6 alias gbe off end device pci 1f.7 alias south_tracehub off end diff --git a/src/soc/intel/apollolake/chipset_apl.cb b/src/soc/intel/apollolake/chipset_apl.cb index 2766ef8d16..8ec70cc8a1 100644 --- a/src/soc/intel/apollolake/chipset_apl.cb +++ b/src/soc/intel/apollolake/chipset_apl.cb @@ -44,6 +44,6 @@ chip soc/intel/apollolake device pci 1c.0 alias emmc off end # eMMC device pci 1e.0 alias sdio off end # SDIO device pci 1f.0 alias lpc_espi on end # LPC - device pci 1f.1 alias smbus off end # SMBUS + device pci 1f.1 alias smbus off ops smbus_ops end # SMBUS end end diff --git a/src/soc/intel/apollolake/chipset_glk.cb b/src/soc/intel/apollolake/chipset_glk.cb index 3255407abb..688197a49b 100644 --- a/src/soc/intel/apollolake/chipset_glk.cb +++ b/src/soc/intel/apollolake/chipset_glk.cb @@ -45,6 +45,6 @@ chip soc/intel/apollolake device pci 1d.0 alias ufs off end # UFS device pci 1e.0 alias sdio off end # SDIO device pci 1f.0 alias lpc_espi on end # LPC - device pci 1f.1 alias smbus on end # SMBUS + device pci 1f.1 alias smbus on ops smbus_ops end # SMBUS end end diff --git a/src/soc/intel/cannonlake/chipset.cb b/src/soc/intel/cannonlake/chipset.cb index 2fd801051a..12a93eee3b 100644 --- a/src/soc/intel/cannonlake/chipset.cb +++ b/src/soc/intel/cannonlake/chipset.cb @@ -121,7 +121,7 @@ chip soc/intel/cannonlake device pci 1f.1 alias p2sb hidden end # P2SB device pci 1f.2 alias pmc hidden end # Power Management Controller device pci 1f.3 alias hda off end # Intel HDA - device pci 1f.4 alias smbus off end # SMBus + device pci 1f.4 alias smbus off ops smbus_ops end # SMBus device pci 1f.5 alias fast_spi on end # PCH SPI device pci 1f.6 alias gbe off end # GbE device pci 1f.7 alias tracehub off end # TraceHub diff --git a/src/soc/intel/cannonlake/chipset_pch_h.cb b/src/soc/intel/cannonlake/chipset_pch_h.cb index b00e556a2e..17944a472f 100644 --- a/src/soc/intel/cannonlake/chipset_pch_h.cb +++ b/src/soc/intel/cannonlake/chipset_pch_h.cb @@ -155,7 +155,7 @@ chip soc/intel/cannonlake device pci 1f.1 alias p2sb hidden end # P2SB device pci 1f.2 alias pmc hidden end # Power Management Controller device pci 1f.3 alias hda off end # Intel HDA - device pci 1f.4 alias smbus off end # SMBus + device pci 1f.4 alias smbus off ops smbus_ops end # SMBus device pci 1f.5 alias fast_spi on end # PCH SPI device pci 1f.6 alias gbe off end # GbE device pci 1f.7 alias tracehub off end # TraceHub diff --git a/src/soc/intel/common/block/smbus/smbus.c b/src/soc/intel/common/block/smbus/smbus.c index ebaf655499..573aea5b8e 100644 --- a/src/soc/intel/common/block/smbus/smbus.c +++ b/src/soc/intel/common/block/smbus/smbus.c @@ -49,32 +49,11 @@ struct device_operations smbus_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DID_INTEL_WCL_SMBUS, - PCI_DID_INTEL_PTL_H_SMBUS, - PCI_DID_INTEL_PTL_U_H_SMBUS, PCI_DID_INTEL_LNL_SMBUS, - PCI_DID_INTEL_MTL_SMBUS, - PCI_DID_INTEL_ARL_SMBUS, - PCI_DID_INTEL_ARL_S_SMBUS, - PCI_DID_INTEL_ARP_S_SMBUS, - PCI_DID_INTEL_RPP_P_SMBUS, - PCI_DID_INTEL_RPP_S_SMBUS, - PCI_DID_INTEL_APL_SMBUS, - PCI_DID_INTEL_GLK_SMBUS, - PCI_DID_INTEL_CNL_SMBUS, - PCI_DID_INTEL_CNP_H_SMBUS, PCI_DID_INTEL_EBG_SMBUS, PCI_DID_INTEL_LWB_SMBUS_SUPER, PCI_DID_INTEL_LWB_SMBUS, - PCI_DID_INTEL_CMP_SMBUS, - PCI_DID_INTEL_CMP_H_SMBUS, - PCI_DID_INTEL_TGP_LP_SMBUS, - PCI_DID_INTEL_TGP_H_SMBUS, PCI_DID_INTEL_MCC_SMBUS, - PCI_DID_INTEL_JSP_SMBUS, - PCI_DID_INTEL_ADP_P_SMBUS, - PCI_DID_INTEL_ADP_S_SMBUS, - PCI_DID_INTEL_ADP_M_N_SMBUS, PCI_DID_INTEL_DNV_SMBUS_LEGACY, 0 }; diff --git a/src/soc/intel/jasperlake/chipset.cb b/src/soc/intel/jasperlake/chipset.cb index 6d50296019..83dda97454 100644 --- a/src/soc/intel/jasperlake/chipset.cb +++ b/src/soc/intel/jasperlake/chipset.cb @@ -93,7 +93,7 @@ chip soc/intel/jasperlake device pci 1f.1 alias p2sb hidden end device pci 1f.2 alias pmc hidden end device pci 1f.3 alias hda off end - device pci 1f.4 alias smbus off end + device pci 1f.4 alias smbus off ops smbus_ops end device pci 1f.5 alias fast_spi on end device pci 1f.7 alias south_tracehub off end end diff --git a/src/soc/intel/meteorlake/chipset.cb b/src/soc/intel/meteorlake/chipset.cb index 1efa776ec0..d1ca7e0781 100644 --- a/src/soc/intel/meteorlake/chipset.cb +++ b/src/soc/intel/meteorlake/chipset.cb @@ -187,7 +187,7 @@ chip soc/intel/meteorlake device pci 1f.1 alias p2sb hidden end device pci 1f.2 alias pmc hidden end device pci 1f.3 alias hda off end - device pci 1f.4 alias smbus off end + device pci 1f.4 alias smbus off ops smbus_ops end device pci 1f.5 alias fast_spi on end device pci 1f.6 alias gbe off end device pci 1f.7 alias npk off end diff --git a/src/soc/intel/pantherlake/chipset_ptl.cb b/src/soc/intel/pantherlake/chipset_ptl.cb index 99962c56b0..5de54b59f5 100644 --- a/src/soc/intel/pantherlake/chipset_ptl.cb +++ b/src/soc/intel/pantherlake/chipset_ptl.cb @@ -245,7 +245,7 @@ chip soc/intel/pantherlake device pci 1f.1 alias p2sb hidden end device pci 1f.2 alias pmc hidden end device pci 1f.3 alias hda off end - device pci 1f.4 alias smbus off end + device pci 1f.4 alias smbus off ops smbus_ops end device pci 1f.5 alias fast_spi on end device pci 1f.6 alias gbe off end device pci 1f.7 alias npk off end diff --git a/src/soc/intel/pantherlake/chipset_wcl.cb b/src/soc/intel/pantherlake/chipset_wcl.cb index cdd57f5a88..fbe7420005 100644 --- a/src/soc/intel/pantherlake/chipset_wcl.cb +++ b/src/soc/intel/pantherlake/chipset_wcl.cb @@ -128,7 +128,7 @@ chip soc/intel/pantherlake device pci 1f.1 alias p2sb hidden end device pci 1f.2 alias pmc hidden end device pci 1f.3 alias hda off end - device pci 1f.4 alias smbus off end + device pci 1f.4 alias smbus off ops smbus_ops end device pci 1f.5 alias fast_spi on end device pci 1f.6 alias gbe off end device pci 1f.7 alias npk off end diff --git a/src/soc/intel/tigerlake/chipset.cb b/src/soc/intel/tigerlake/chipset.cb index abecd82f61..67fe7fbeb5 100644 --- a/src/soc/intel/tigerlake/chipset.cb +++ b/src/soc/intel/tigerlake/chipset.cb @@ -149,7 +149,7 @@ chip soc/intel/tigerlake device pci 1f.1 alias p2sb off end device pci 1f.2 alias pmc hidden end device pci 1f.3 alias hda off end - device pci 1f.4 alias smbus off end + device pci 1f.4 alias smbus off ops smbus_ops end device pci 1f.5 alias fast_spi on end device pci 1f.6 alias gbe off end device pci 1f.7 alias tracehub off end diff --git a/src/soc/intel/tigerlake/chipset_pch_h.cb b/src/soc/intel/tigerlake/chipset_pch_h.cb index d0a3df588e..9271488015 100644 --- a/src/soc/intel/tigerlake/chipset_pch_h.cb +++ b/src/soc/intel/tigerlake/chipset_pch_h.cb @@ -183,7 +183,7 @@ chip soc/intel/tigerlake device pci 1f.1 alias p2sb off end device pci 1f.2 alias pmc hidden end device pci 1f.3 alias hda off end - device pci 1f.4 alias smbus off end + device pci 1f.4 alias smbus off ops smbus_ops end device pci 1f.5 alias fast_spi on end device pci 1f.6 alias gbe off end device pci 1f.7 alias thermal off end