From f2d9c137e6c65d8e0a4eb52f9b535355e47430d5 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 25 Jan 2026 20:49:26 -0600 Subject: [PATCH] soc/intel: Use chipset.cb for HDA device ops linking Move HDA 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 hda.c for these SoCs; keep DID matching only for SoCs without chipset.cb files. Add 'Select SOC_INTEL_COMMON_BLOCK_HDA` to Apollolake/Geminilake so those platforms can make use of the common driver. Since no APL/GLK boards currently select `SOC_INTEL_COMMON_BLOCK_HDA_VERB` the addition is a no-op. This standardizes the approach across Intel SoCs and makes the HDA controller configuration explicit in devicetree, and prevents the endless proliferation of DIDs in the common HDA driver code. Change-Id: I0b3af4c2a441d4897341ee6c2cc5d75d70a6ebc4 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/90919 Reviewed-by: Jakub "Kuba" Czapiga Tested-by: build bot (Jenkins) --- src/soc/intel/alderlake/chipset.cb | 2 +- src/soc/intel/alderlake/chipset_pch_s.cb | 2 +- src/soc/intel/apollolake/Kconfig | 1 + 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/hda/hda.c | 68 ----------------------- 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 +- 14 files changed, 13 insertions(+), 80 deletions(-) diff --git a/src/soc/intel/alderlake/chipset.cb b/src/soc/intel/alderlake/chipset.cb index c8b4b4283e..b942157c4d 100644 --- a/src/soc/intel/alderlake/chipset.cb +++ b/src/soc/intel/alderlake/chipset.cb @@ -267,7 +267,7 @@ chip soc/intel/alderlake device pci 1f.0 alias pch_espi on end 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.3 alias hda off ops hda_ops 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 diff --git a/src/soc/intel/alderlake/chipset_pch_s.cb b/src/soc/intel/alderlake/chipset_pch_s.cb index fc575bc583..36ca14755d 100644 --- a/src/soc/intel/alderlake/chipset_pch_s.cb +++ b/src/soc/intel/alderlake/chipset_pch_s.cb @@ -412,7 +412,7 @@ chip soc/intel/alderlake device pci 1f.0 alias pch_espi on end 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.3 alias hda off ops hda_ops 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 diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig index be87a8c10d..18e8466cff 100644 --- a/src/soc/intel/apollolake/Kconfig +++ b/src/soc/intel/apollolake/Kconfig @@ -61,6 +61,7 @@ config SOC_INTEL_APOLLOLAKE select SOC_INTEL_COMMON_BLOCK_GPIO_DUAL_ROUTE_SUPPORT select SOC_INTEL_COMMON_BLOCK_GPIO_MULTI_ACPI_DEVICES select SOC_INTEL_COMMON_BLOCK_GPIO_IOSTANDBY + select SOC_INTEL_COMMON_BLOCK_HDA select SOC_INTEL_COMMON_BLOCK_HECI1_DISABLE_USING_PCR select SOC_INTEL_COMMON_PCH_CLIENT select SOC_INTEL_COMMON_BLOCK_PMC_DISCOVERABLE diff --git a/src/soc/intel/apollolake/chipset_apl.cb b/src/soc/intel/apollolake/chipset_apl.cb index 8ec70cc8a1..5784265855 100644 --- a/src/soc/intel/apollolake/chipset_apl.cb +++ b/src/soc/intel/apollolake/chipset_apl.cb @@ -10,7 +10,7 @@ chip soc/intel/apollolake device pci 0d.1 alias pmc off end # PMC device pci 0d.2 alias fast_spi off end # SPI device pci 0d.3 alias sram off end # Shared SRAM - device pci 0e.0 alias hda off end # HDA + device pci 0e.0 alias hda off ops hda_ops end # HDA device pci 0f.0 alias heci1 off end # HECI1 device pci 0f.1 alias heci2 off end # HECI2 device pci 0f.2 alias heci3 off end # HECI3 diff --git a/src/soc/intel/apollolake/chipset_glk.cb b/src/soc/intel/apollolake/chipset_glk.cb index 688197a49b..2a4defe7c7 100644 --- a/src/soc/intel/apollolake/chipset_glk.cb +++ b/src/soc/intel/apollolake/chipset_glk.cb @@ -11,7 +11,7 @@ chip soc/intel/apollolake device pci 0d.1 alias pmc off end # PMC device pci 0d.2 alias fast_spi off end # SPI device pci 0d.3 alias sram off end # Shared SRAM - device pci 0e.0 alias hda off end # HDA + device pci 0e.0 alias hda off ops hda_ops end # HDA device pci 0f.0 alias heci1 off end # HECI1 device pci 0f.1 alias heci2 off end # HECI2 device pci 0f.2 alias heci3 off end # HECI3 diff --git a/src/soc/intel/cannonlake/chipset.cb b/src/soc/intel/cannonlake/chipset.cb index 12a93eee3b..e0f20ae8a8 100644 --- a/src/soc/intel/cannonlake/chipset.cb +++ b/src/soc/intel/cannonlake/chipset.cb @@ -120,7 +120,7 @@ chip soc/intel/cannonlake device pci 1f.0 alias lpc_espi on end # LPC Interface 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.3 alias hda off ops hda_ops end # Intel HDA 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 diff --git a/src/soc/intel/cannonlake/chipset_pch_h.cb b/src/soc/intel/cannonlake/chipset_pch_h.cb index 17944a472f..240054d3bf 100644 --- a/src/soc/intel/cannonlake/chipset_pch_h.cb +++ b/src/soc/intel/cannonlake/chipset_pch_h.cb @@ -154,7 +154,7 @@ chip soc/intel/cannonlake device pci 1f.0 alias lpc_espi on end # LPC Interface 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.3 alias hda off ops hda_ops end # Intel HDA 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 diff --git a/src/soc/intel/common/block/hda/hda.c b/src/soc/intel/common/block/hda/hda.c index e779dee312..66ad97dd12 100644 --- a/src/soc/intel/common/block/hda/hda.c +++ b/src/soc/intel/common/block/hda/hda.c @@ -38,30 +38,6 @@ static const unsigned short pci_device_ids[] = { PCI_DID_INTEL_NVL_AUDIO_6, PCI_DID_INTEL_NVL_AUDIO_7, PCI_DID_INTEL_NVL_AUDIO_8, - PCI_DID_INTEL_WCL_AUDIO_1, - PCI_DID_INTEL_WCL_AUDIO_2, - PCI_DID_INTEL_WCL_AUDIO_3, - PCI_DID_INTEL_WCL_AUDIO_4, - PCI_DID_INTEL_WCL_AUDIO_5, - PCI_DID_INTEL_WCL_AUDIO_6, - PCI_DID_INTEL_WCL_AUDIO_7, - PCI_DID_INTEL_WCL_AUDIO_8, - PCI_DID_INTEL_PTL_H_AUDIO_1, - PCI_DID_INTEL_PTL_H_AUDIO_2, - PCI_DID_INTEL_PTL_H_AUDIO_3, - PCI_DID_INTEL_PTL_H_AUDIO_4, - PCI_DID_INTEL_PTL_H_AUDIO_5, - PCI_DID_INTEL_PTL_H_AUDIO_6, - PCI_DID_INTEL_PTL_H_AUDIO_7, - PCI_DID_INTEL_PTL_H_AUDIO_8, - PCI_DID_INTEL_PTL_U_H_AUDIO_1, - PCI_DID_INTEL_PTL_U_H_AUDIO_2, - PCI_DID_INTEL_PTL_U_H_AUDIO_3, - PCI_DID_INTEL_PTL_U_H_AUDIO_4, - PCI_DID_INTEL_PTL_U_H_AUDIO_5, - PCI_DID_INTEL_PTL_U_H_AUDIO_6, - PCI_DID_INTEL_PTL_U_H_AUDIO_7, - PCI_DID_INTEL_PTL_U_H_AUDIO_8, PCI_DID_INTEL_LNL_AUDIO_1, PCI_DID_INTEL_LNL_AUDIO_2, PCI_DID_INTEL_LNL_AUDIO_3, @@ -70,54 +46,10 @@ static const unsigned short pci_device_ids[] = { PCI_DID_INTEL_LNL_AUDIO_6, PCI_DID_INTEL_LNL_AUDIO_7, PCI_DID_INTEL_LNL_AUDIO_8, - PCI_DID_INTEL_MTL_AUDIO_1, - PCI_DID_INTEL_MTL_AUDIO_2, - PCI_DID_INTEL_MTL_AUDIO_3, - PCI_DID_INTEL_MTL_AUDIO_4, - PCI_DID_INTEL_MTL_AUDIO_5, - PCI_DID_INTEL_MTL_AUDIO_6, - PCI_DID_INTEL_MTL_AUDIO_7, - PCI_DID_INTEL_MTL_AUDIO_8, - PCI_DID_INTEL_ARL_AUDIO, - PCI_DID_INTEL_ARP_S_AUDIO, - PCI_DID_INTEL_RPP_P_AUDIO, - PCI_DID_INTEL_RPP_S_AUDIO_1, - PCI_DID_INTEL_RPP_S_AUDIO_2, - PCI_DID_INTEL_RPP_S_AUDIO_3, - PCI_DID_INTEL_RPP_S_AUDIO_4, - PCI_DID_INTEL_RPP_S_AUDIO_5, - PCI_DID_INTEL_RPP_S_AUDIO_6, - PCI_DID_INTEL_RPP_S_AUDIO_7, - PCI_DID_INTEL_RPP_S_AUDIO_8, - PCI_DID_INTEL_APL_AUDIO, - PCI_DID_INTEL_GLK_AUDIO, PCI_DID_INTEL_LWB_AUDIO, PCI_DID_INTEL_LWB_AUDIO_SUPER, - PCI_DID_INTEL_CNL_AUDIO, - PCI_DID_INTEL_CNP_H_AUDIO, - PCI_DID_INTEL_CMP_AUDIO, - PCI_DID_INTEL_CMP_H_AUDIO, PCI_DID_INTEL_BSW_AUDIO, - PCI_DID_INTEL_TGL_AUDIO, - PCI_DID_INTEL_TGL_H_AUDIO, PCI_DID_INTEL_MCC_AUDIO, - PCI_DID_INTEL_JSP_AUDIO, - PCI_DID_INTEL_ADP_P_AUDIO, - PCI_DID_INTEL_ADP_S_AUDIO_1, - PCI_DID_INTEL_ADP_S_AUDIO_2, - PCI_DID_INTEL_ADP_S_AUDIO_3, - PCI_DID_INTEL_ADP_S_AUDIO_4, - PCI_DID_INTEL_ADP_S_AUDIO_5, - PCI_DID_INTEL_ADP_S_AUDIO_6, - PCI_DID_INTEL_ADP_S_AUDIO_7, - PCI_DID_INTEL_ADP_S_AUDIO_8, - PCI_DID_INTEL_ADP_M_N_AUDIO_1, - PCI_DID_INTEL_ADP_M_N_AUDIO_2, - PCI_DID_INTEL_ADP_M_N_AUDIO_3, - PCI_DID_INTEL_ADP_M_N_AUDIO_4, - PCI_DID_INTEL_ADP_M_N_AUDIO_5, - PCI_DID_INTEL_ADP_M_N_AUDIO_6, - PCI_DID_INTEL_ADP_M_N_AUDIO_7, 0 }; diff --git a/src/soc/intel/jasperlake/chipset.cb b/src/soc/intel/jasperlake/chipset.cb index 83dda97454..ca18683d8b 100644 --- a/src/soc/intel/jasperlake/chipset.cb +++ b/src/soc/intel/jasperlake/chipset.cb @@ -92,7 +92,7 @@ chip soc/intel/jasperlake device pci 1f.0 alias pch_espi on end 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.3 alias hda off ops hda_ops 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 diff --git a/src/soc/intel/meteorlake/chipset.cb b/src/soc/intel/meteorlake/chipset.cb index d1ca7e0781..a1b995c5c9 100644 --- a/src/soc/intel/meteorlake/chipset.cb +++ b/src/soc/intel/meteorlake/chipset.cb @@ -186,7 +186,7 @@ chip soc/intel/meteorlake device pci 1f.0 alias soc_espi on end 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.3 alias hda off ops hda_ops 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 diff --git a/src/soc/intel/pantherlake/chipset_ptl.cb b/src/soc/intel/pantherlake/chipset_ptl.cb index 5de54b59f5..e2277d319c 100644 --- a/src/soc/intel/pantherlake/chipset_ptl.cb +++ b/src/soc/intel/pantherlake/chipset_ptl.cb @@ -244,7 +244,7 @@ chip soc/intel/pantherlake device pci 1f.0 alias soc_espi on end 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.3 alias hda off ops hda_ops 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 diff --git a/src/soc/intel/pantherlake/chipset_wcl.cb b/src/soc/intel/pantherlake/chipset_wcl.cb index fbe7420005..0cb6e6634e 100644 --- a/src/soc/intel/pantherlake/chipset_wcl.cb +++ b/src/soc/intel/pantherlake/chipset_wcl.cb @@ -127,7 +127,7 @@ chip soc/intel/pantherlake device pci 1f.0 alias soc_espi on end 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.3 alias hda off ops hda_ops 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 diff --git a/src/soc/intel/tigerlake/chipset.cb b/src/soc/intel/tigerlake/chipset.cb index 67fe7fbeb5..40932489da 100644 --- a/src/soc/intel/tigerlake/chipset.cb +++ b/src/soc/intel/tigerlake/chipset.cb @@ -148,7 +148,7 @@ chip soc/intel/tigerlake device pci 1f.0 alias pch_espi on end 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.3 alias hda off ops hda_ops 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 diff --git a/src/soc/intel/tigerlake/chipset_pch_h.cb b/src/soc/intel/tigerlake/chipset_pch_h.cb index 9271488015..3761527edb 100644 --- a/src/soc/intel/tigerlake/chipset_pch_h.cb +++ b/src/soc/intel/tigerlake/chipset_pch_h.cb @@ -182,7 +182,7 @@ chip soc/intel/tigerlake device pci 1f.0 alias pch_espi on end 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.3 alias hda off ops hda_ops 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