Skip to content

Commit bd82090

Browse files
xpardee-createij-intel
authored andcommitted
platform/x86/intel/pmc: Add Arrow Lake U/H support to intel_pmc_core driver
Add Arrow Lake U and Arrow Lake H support in intel_pmc_core driver. Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com> Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com> Link: https://lore.kernel.org/r/20250207225615.401235-7-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 45fa1a0 commit bd82090

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

drivers/platform/x86/intel/pmc/arl.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define IOEP_LPM_REQ_GUID 0x5077612
1717
#define SOCS_LPM_REQ_GUID 0x8478657
1818
#define PCHS_LPM_REQ_GUID 0x9684572
19+
#define SOCM_LPM_REQ_GUID 0x2625030
1920

2021
static const u8 ARL_LPM_REG_INDEX[] = {0, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20};
2122

@@ -650,6 +651,7 @@ const struct pmc_reg_map arl_pchs_reg_map = {
650651
.etr3_offset = ETR3_OFFSET,
651652
};
652653

654+
#define PMC_DEVID_SOCM 0x777f
653655
#define PMC_DEVID_SOCS 0xae7f
654656
#define PMC_DEVID_IOEP 0x7ecf
655657
#define PMC_DEVID_PCHS 0x7f27
@@ -669,11 +671,17 @@ static struct pmc_info arl_pmc_info_list[] = {
669671
.devid = PMC_DEVID_PCHS,
670672
.map = &arl_pchs_reg_map,
671673
},
674+
{
675+
.guid = SOCM_LPM_REQ_GUID,
676+
.devid = PMC_DEVID_SOCM,
677+
.map = &mtl_socm_reg_map,
678+
},
672679
{}
673680
};
674681

675682
#define ARL_NPU_PCI_DEV 0xad1d
676683
#define ARL_GNA_PCI_DEV 0xae4c
684+
#define ARL_H_GNA_PCI_DEV 0x774c
677685
/*
678686
* Set power state of select devices that do not have drivers to D3
679687
* so that they do not block Package C entry.
@@ -684,19 +692,38 @@ static void arl_d3_fixup(void)
684692
pmc_core_set_device_d3(ARL_GNA_PCI_DEV);
685693
}
686694

695+
static void arl_h_d3_fixup(void)
696+
{
697+
pmc_core_set_device_d3(ARL_NPU_PCI_DEV);
698+
pmc_core_set_device_d3(ARL_H_GNA_PCI_DEV);
699+
}
700+
687701
static int arl_resume(struct pmc_dev *pmcdev)
688702
{
689703
arl_d3_fixup();
690704

691705
return cnl_resume(pmcdev);
692706
}
693707

708+
static int arl_h_resume(struct pmc_dev *pmcdev)
709+
{
710+
arl_h_d3_fixup();
711+
712+
return cnl_resume(pmcdev);
713+
}
714+
694715
static int arl_core_init(struct pmc_dev *pmcdev, struct pmc_dev_info *pmc_dev_info)
695716
{
696717
arl_d3_fixup();
697718
return generic_core_init(pmcdev, pmc_dev_info);
698719
}
699720

721+
static int arl_h_core_init(struct pmc_dev *pmcdev, struct pmc_dev_info *pmc_dev_info)
722+
{
723+
arl_h_d3_fixup();
724+
return generic_core_init(pmcdev, pmc_dev_info);
725+
}
726+
700727
struct pmc_dev_info arl_pmc_dev = {
701728
.pci_func = 0,
702729
.dmu_guid = ARL_PMT_DMU_GUID,
@@ -706,3 +733,13 @@ struct pmc_dev_info arl_pmc_dev = {
706733
.resume = arl_resume,
707734
.init = arl_core_init,
708735
};
736+
737+
struct pmc_dev_info arl_h_pmc_dev = {
738+
.pci_func = 2,
739+
.dmu_guid = ARL_PMT_DMU_GUID,
740+
.regmap_list = arl_pmc_info_list,
741+
.map = &mtl_socm_reg_map,
742+
.suspend = cnl_suspend,
743+
.resume = arl_h_resume,
744+
.init = arl_h_core_init,
745+
};

drivers/platform/x86/intel/pmc/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,8 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
14101410
X86_MATCH_VFM(INTEL_RAPTORLAKE_S, &adl_pmc_dev),
14111411
X86_MATCH_VFM(INTEL_METEORLAKE_L, &mtl_pmc_dev),
14121412
X86_MATCH_VFM(INTEL_ARROWLAKE, &arl_pmc_dev),
1413+
X86_MATCH_VFM(INTEL_ARROWLAKE_H, &arl_h_pmc_dev),
1414+
X86_MATCH_VFM(INTEL_ARROWLAKE_U, &arl_h_pmc_dev),
14131415
X86_MATCH_VFM(INTEL_LUNARLAKE_M, &lnl_pmc_dev),
14141416
{}
14151417
};

drivers/platform/x86/intel/pmc/core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ extern struct pmc_dev_info tgl_pmc_dev;
624624
extern struct pmc_dev_info adl_pmc_dev;
625625
extern struct pmc_dev_info mtl_pmc_dev;
626626
extern struct pmc_dev_info arl_pmc_dev;
627+
extern struct pmc_dev_info arl_h_pmc_dev;
627628
extern struct pmc_dev_info lnl_pmc_dev;
628629

629630
void cnl_suspend(struct pmc_dev *pmcdev);

0 commit comments

Comments
 (0)