[PATCH] platform/x86/intel/pmc: Fix the register map on 100 and 200 series PCHs

From: Daniel Betz

Date: Sat Dec 05 2026 - 08:54:28 EST


spt_core_init() tells Kaby Lake from Coffee Lake, which has the same
CPU model but a Cannon Lake PCH, by looking for the Sunrise Point PMC.
It looks only for the Sunrise Point-LP PMC (0x9d21), so systems with a
Sunrise Point-H PCH (PMC 0xa121, the 100 series and C230 chipsets) or
a Union Point PCH (PMC 0xa2a1, the 200 series chipsets, which the
Z370, H310C and B365 boards also use with Coffee Lake CPUs) get the
Cannon Lake register map. The Sunrise Point PMC reads all-ones at the
Cannon Lake offsets: pch_ip_power_gating_status shows every IP as
"Off", ltr_show shows 0xffffffff for every IP, and
slp_s0_residency_usec shows all-ones times the counter step. On
suspend the driver writes its LTR ignore mask to 0x1b0c, which this
PMC does not decode, and not to LTR_IGNORE at 0x30c.

Add both PMCs to the IDs that select the Sunrise Point map. The 200
series datasheet (335193-006) lists the same PMC memory mapped
registers as the 100 series one (332691-003EN), with the same offsets
and defaults, and the same fields in PM_CFG, MTPMC, SLP_S0_RES,
CIR31C, PPFEAR0 and PPFEAR1. Neither documents the LTR registers. The
Cannon Lake PCHs of the other Coffee Lake systems carry other PMC IDs,
so they keep the Cannon Lake map.

Tested on a MacBookPro14,3 (Kaby Lake-H, 100 series PCH, PMC 0xa121):
with the patch, pch_ip_power_gating_status, ltr_show and
slp_s0_residency_usec show what the PWRMBASE registers hold when read
through /dev/mem; ltr_ignore and ltr_restore set and clear the IP's
bit in LTR_IGNORE at 0x30c; after a hibernation LTR_IGNORE reads as
before it. Not tested on a Union Point system.

Fixes: 661405bd817b ("platform/x86: intel_pmc_core: Special case for
Coffeelake")
Signed-off-by: Daniel Betz <dnlbtz@xxxxxxxxx>
---
drivers/platform/x86/intel/pmc/core.h | 4 +++-
drivers/platform/x86/intel/pmc/spt.c | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel/pmc/core.h
b/drivers/platform/x86/intel/pmc/core.h
index e55164e58..2981d1491 100644
--- a/drivers/platform/x86/intel/pmc/core.h
+++ b/drivers/platform/x86/intel/pmc/core.h
@@ -34,8 +34,10 @@ DEFINE_FREE(pmc_acpi_free, void *, if (_T) ACPI_FREE(_T))
#define LPM_REG_COUNT 28
#define LPM_MODE_OFFSET 1

-/* Sunrise Point Power Management Controller PCI Device ID */
+/* Sunrise Point and Union Point Power Management Controller PCI Device IDs */
#define SPT_PMC_PCI_DEVICE_ID 0x9d21
+#define SPT_H_PMC_PCI_DEVICE_ID 0xa121
+#define UPT_PMC_PCI_DEVICE_ID 0xa2a1
#define SPT_PMC_BASE_ADDR_OFFSET 0x48
#define SPT_PMC_SLP_S0_RES_COUNTER_OFFSET 0x13c
#define SPT_PMC_PM_CFG_OFFSET 0x18
diff --git a/drivers/platform/x86/intel/pmc/spt.c
b/drivers/platform/x86/intel/pmc/spt.c
index b50534aa2..feeaa99f7 100644
--- a/drivers/platform/x86/intel/pmc/spt.c
+++ b/drivers/platform/x86/intel/pmc/spt.c
@@ -138,6 +138,8 @@ static const struct pmc_reg_map spt_reg_map = {

static const struct pci_device_id spt_pmc_pci_id[] = {
{ PCI_VDEVICE(INTEL, SPT_PMC_PCI_DEVICE_ID) },
+ { PCI_VDEVICE(INTEL, SPT_H_PMC_PCI_DEVICE_ID) },
+ { PCI_VDEVICE(INTEL, UPT_PMC_PCI_DEVICE_ID) },
{ }
};

@@ -146,7 +148,8 @@ static int spt_core_init(struct pmc_dev *pmcdev,
struct pmc_dev_info *pmc_dev_in
/*
* Coffee Lake has CPU ID of Kaby Lake and Cannon Lake PCH. So here
* Sunrisepoint PCH regmap can't be used. Use Cannon Lake PCH regmap
- * in this case.
+ * in this case. Union Point PCHs, also used with Coffee Lake, have
+ * the Sunrise Point regmap.
*/
if (!pci_dev_present(spt_pmc_pci_id))
return generic_core_init(pmcdev, &cnp_pmc_dev);
--
2.43.0