xref: /linux/drivers/platform/x86/intel/pmc/arl.c (revision ea5f6ad9ad9645733b72ab53a98e719b460d36a6)
183f168a1SRajvi Jingar // SPDX-License-Identifier: GPL-2.0
283f168a1SRajvi Jingar /*
383f168a1SRajvi Jingar  * This file contains platform specific structure definitions
4*f1f663ebSColin Ian King  * and init function used by Arrow Lake PCH.
583f168a1SRajvi Jingar  *
683f168a1SRajvi Jingar  * Copyright (c) 2022, Intel Corporation.
783f168a1SRajvi Jingar  * All Rights Reserved.
883f168a1SRajvi Jingar  *
983f168a1SRajvi Jingar  */
1083f168a1SRajvi Jingar 
1183f168a1SRajvi Jingar #include <linux/pci.h>
1283f168a1SRajvi Jingar #include "core.h"
1383f168a1SRajvi Jingar #include "../pmt/telemetry.h"
1483f168a1SRajvi Jingar 
1583f168a1SRajvi Jingar /* PMC SSRAM PMT Telemetry GUID */
1683f168a1SRajvi Jingar #define IOEP_LPM_REQ_GUID	0x5077612
1783f168a1SRajvi Jingar #define SOCS_LPM_REQ_GUID	0x8478657
1883f168a1SRajvi Jingar #define PCHS_LPM_REQ_GUID	0x9684572
1983f168a1SRajvi Jingar 
2083f168a1SRajvi Jingar static const u8 ARL_LPM_REG_INDEX[] = {0, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20};
2183f168a1SRajvi Jingar 
2283f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_ltr_show_map[] = {
2383f168a1SRajvi Jingar 	{"SOUTHPORT_A",		CNP_PMC_LTR_SPA},
2483f168a1SRajvi Jingar 	{"SOUTHPORT_B",		CNP_PMC_LTR_SPB},
2583f168a1SRajvi Jingar 	{"SATA",		CNP_PMC_LTR_SATA},
2683f168a1SRajvi Jingar 	{"GIGABIT_ETHERNET",	CNP_PMC_LTR_GBE},
2783f168a1SRajvi Jingar 	{"XHCI",		CNP_PMC_LTR_XHCI},
2883f168a1SRajvi Jingar 	{"SOUTHPORT_F",		ADL_PMC_LTR_SPF},
2983f168a1SRajvi Jingar 	{"ME",			CNP_PMC_LTR_ME},
3083f168a1SRajvi Jingar 	/* EVA is Enterprise Value Add, doesn't really exist on PCH */
3183f168a1SRajvi Jingar 	{"SATA1",		CNP_PMC_LTR_EVA},
3283f168a1SRajvi Jingar 	{"SOUTHPORT_C",		CNP_PMC_LTR_SPC},
3383f168a1SRajvi Jingar 	{"HD_AUDIO",		CNP_PMC_LTR_AZ},
3483f168a1SRajvi Jingar 	{"CNV",			CNP_PMC_LTR_CNV},
3583f168a1SRajvi Jingar 	{"LPSS",		CNP_PMC_LTR_LPSS},
3683f168a1SRajvi Jingar 	{"SOUTHPORT_D",		CNP_PMC_LTR_SPD},
3783f168a1SRajvi Jingar 	{"SOUTHPORT_E",		CNP_PMC_LTR_SPE},
3883f168a1SRajvi Jingar 	{"SATA2",		CNP_PMC_LTR_CAM},
3983f168a1SRajvi Jingar 	{"ESPI",		CNP_PMC_LTR_ESPI},
4083f168a1SRajvi Jingar 	{"SCC",			CNP_PMC_LTR_SCC},
4183f168a1SRajvi Jingar 	{"ISH",			CNP_PMC_LTR_ISH},
4283f168a1SRajvi Jingar 	{"UFSX2",		CNP_PMC_LTR_UFSX2},
4383f168a1SRajvi Jingar 	{"EMMC",		CNP_PMC_LTR_EMMC},
4483f168a1SRajvi Jingar 	/*
4583f168a1SRajvi Jingar 	 * Check intel_pmc_core_ids[] users of cnp_reg_map for
4683f168a1SRajvi Jingar 	 * a list of core SoCs using this.
4783f168a1SRajvi Jingar 	 */
4883f168a1SRajvi Jingar 	{"WIGIG",		ICL_PMC_LTR_WIGIG},
4983f168a1SRajvi Jingar 	{"THC0",		TGL_PMC_LTR_THC0},
5083f168a1SRajvi Jingar 	{"THC1",		TGL_PMC_LTR_THC1},
5183f168a1SRajvi Jingar 	{"SOUTHPORT_G",		MTL_PMC_LTR_SPG},
5283f168a1SRajvi Jingar 	{"Reserved",		ARL_SOCS_PMC_LTR_RESERVED},
5383f168a1SRajvi Jingar 	{"IOE_PMC",		MTL_PMC_LTR_IOE_PMC},
5483f168a1SRajvi Jingar 	{"DMI3",		ARL_PMC_LTR_DMI3},
5583f168a1SRajvi Jingar 
5683f168a1SRajvi Jingar 	/* Below two cannot be used for LTR_IGNORE */
5783f168a1SRajvi Jingar 	{"CURRENT_PLATFORM",	CNP_PMC_LTR_CUR_PLT},
5883f168a1SRajvi Jingar 	{"AGGREGATED_SYSTEM",	CNP_PMC_LTR_CUR_ASLT},
5983f168a1SRajvi Jingar 	{}
6083f168a1SRajvi Jingar };
6183f168a1SRajvi Jingar 
6283f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_clocksource_status_map[] = {
6383f168a1SRajvi Jingar 	{"AON2_OFF_STS",		BIT(0)},
6483f168a1SRajvi Jingar 	{"AON3_OFF_STS",		BIT(1)},
6583f168a1SRajvi Jingar 	{"AON4_OFF_STS",		BIT(2)},
6683f168a1SRajvi Jingar 	{"AON5_OFF_STS",		BIT(3)},
6783f168a1SRajvi Jingar 	{"AON1_OFF_STS",		BIT(4)},
6883f168a1SRajvi Jingar 	{"XTAL_LVM_OFF_STS",		BIT(5)},
6983f168a1SRajvi Jingar 	{"AON3_SPL_OFF_STS",		BIT(9)},
7083f168a1SRajvi Jingar 	{"DMI3FPW_0_PLL_OFF_STS",	BIT(10)},
7183f168a1SRajvi Jingar 	{"DMI3FPW_1_PLL_OFF_STS",	BIT(11)},
7283f168a1SRajvi Jingar 	{"G5X16FPW_0_PLL_OFF_STS",	BIT(14)},
7383f168a1SRajvi Jingar 	{"G5X16FPW_1_PLL_OFF_STS",	BIT(15)},
7483f168a1SRajvi Jingar 	{"G5X16FPW_2_PLL_OFF_STS",	BIT(16)},
7583f168a1SRajvi Jingar 	{"XTAL_AGGR_OFF_STS",		BIT(17)},
7683f168a1SRajvi Jingar 	{"USB2_PLL_OFF_STS",		BIT(18)},
7783f168a1SRajvi Jingar 	{"G5X16FPW_3_PLL_OFF_STS",	BIT(19)},
7883f168a1SRajvi Jingar 	{"BCLK_EXT_INJ_CLK_OFF_STS",	BIT(20)},
7983f168a1SRajvi Jingar 	{"PHY_OC_EXT_INJ_CLK_OFF_STS",	BIT(21)},
8083f168a1SRajvi Jingar 	{"FILTER_PLL_OFF_STS",		BIT(22)},
8183f168a1SRajvi Jingar 	{"FABRIC_PLL_OFF_STS",		BIT(25)},
8283f168a1SRajvi Jingar 	{"SOC_PLL_OFF_STS",		BIT(26)},
8383f168a1SRajvi Jingar 	{"PCIEFAB_PLL_OFF_STS",		BIT(27)},
8483f168a1SRajvi Jingar 	{"REF_PLL_OFF_STS",		BIT(28)},
8583f168a1SRajvi Jingar 	{"GENLOCK_FILTER_PLL_OFF_STS",	BIT(30)},
8683f168a1SRajvi Jingar 	{"RTC_PLL_OFF_STS",		BIT(31)},
8783f168a1SRajvi Jingar 	{}
8883f168a1SRajvi Jingar };
8983f168a1SRajvi Jingar 
9083f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_power_gating_status_0_map[] = {
9183f168a1SRajvi Jingar 	{"PMC_PGD0_PG_STS",		BIT(0)},
9283f168a1SRajvi Jingar 	{"DMI_PGD0_PG_STS",		BIT(1)},
9383f168a1SRajvi Jingar 	{"ESPISPI_PGD0_PG_STS",		BIT(2)},
9483f168a1SRajvi Jingar 	{"XHCI_PGD0_PG_STS",		BIT(3)},
9583f168a1SRajvi Jingar 	{"SPA_PGD0_PG_STS",		BIT(4)},
9683f168a1SRajvi Jingar 	{"SPB_PGD0_PG_STS",		BIT(5)},
9783f168a1SRajvi Jingar 	{"SPC_PGD0_PG_STS",		BIT(6)},
9883f168a1SRajvi Jingar 	{"GBE_PGD0_PG_STS",		BIT(7)},
9983f168a1SRajvi Jingar 	{"SATA_PGD0_PG_STS",		BIT(8)},
10083f168a1SRajvi Jingar 	{"FIACPCB_P5x16_PGD0_PG_STS",	BIT(9)},
10183f168a1SRajvi Jingar 	{"G5x16FPW_PGD0_PG_STS",	BIT(10)},
10283f168a1SRajvi Jingar 	{"FIA_D_PGD0_PG_STS",		BIT(11)},
10383f168a1SRajvi Jingar 	{"MPFPW2_PGD0_PG_STS",		BIT(12)},
10483f168a1SRajvi Jingar 	{"SPD_PGD0_PG_STS",		BIT(13)},
10583f168a1SRajvi Jingar 	{"LPSS_PGD0_PG_STS",		BIT(14)},
10683f168a1SRajvi Jingar 	{"LPC_PGD0_PG_STS",		BIT(15)},
10783f168a1SRajvi Jingar 	{"SMB_PGD0_PG_STS",		BIT(16)},
10883f168a1SRajvi Jingar 	{"ISH_PGD0_PG_STS",		BIT(17)},
10983f168a1SRajvi Jingar 	{"P2S_PGD0_PG_STS",		BIT(18)},
11083f168a1SRajvi Jingar 	{"NPK_PGD0_PG_STS",		BIT(19)},
11183f168a1SRajvi Jingar 	{"DMI3FPW_PGD0_PG_STS",		BIT(20)},
11283f168a1SRajvi Jingar 	{"GBETSN1_PGD0_PG_STS",		BIT(21)},
11383f168a1SRajvi Jingar 	{"FUSE_PGD0_PG_STS",		BIT(22)},
11483f168a1SRajvi Jingar 	{"FIACPCB_D_PGD0_PG_STS",	BIT(23)},
11583f168a1SRajvi Jingar 	{"FUSEGPSB_PGD0_PG_STS",	BIT(24)},
11683f168a1SRajvi Jingar 	{"XDCI_PGD0_PG_STS",		BIT(25)},
11783f168a1SRajvi Jingar 	{"EXI_PGD0_PG_STS",		BIT(26)},
11883f168a1SRajvi Jingar 	{"CSE_PGD0_PG_STS",		BIT(27)},
11983f168a1SRajvi Jingar 	{"KVMCC_PGD0_PG_STS",		BIT(28)},
12083f168a1SRajvi Jingar 	{"PMT_PGD0_PG_STS",		BIT(29)},
12183f168a1SRajvi Jingar 	{"CLINK_PGD0_PG_STS",		BIT(30)},
12283f168a1SRajvi Jingar 	{"PTIO_PGD0_PG_STS",		BIT(31)},
12383f168a1SRajvi Jingar 	{}
12483f168a1SRajvi Jingar };
12583f168a1SRajvi Jingar 
12683f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_power_gating_status_1_map[] = {
12783f168a1SRajvi Jingar 	{"USBR0_PGD0_PG_STS",		BIT(0)},
12883f168a1SRajvi Jingar 	{"SUSRAM_PGD0_PG_STS",		BIT(1)},
12983f168a1SRajvi Jingar 	{"SMT1_PGD0_PG_STS",		BIT(2)},
13083f168a1SRajvi Jingar 	{"FIACPCB_U_PGD0_PG_STS",	BIT(3)},
13183f168a1SRajvi Jingar 	{"SMS2_PGD0_PG_STS",		BIT(4)},
13283f168a1SRajvi Jingar 	{"SMS1_PGD0_PG_STS",		BIT(5)},
13383f168a1SRajvi Jingar 	{"CSMERTC_PGD0_PG_STS",		BIT(6)},
13483f168a1SRajvi Jingar 	{"CSMEPSF_PGD0_PG_STS",		BIT(7)},
13583f168a1SRajvi Jingar 	{"SBR0_PGD0_PG_STS",		BIT(8)},
13683f168a1SRajvi Jingar 	{"SBR1_PGD0_PG_STS",		BIT(9)},
13783f168a1SRajvi Jingar 	{"SBR2_PGD0_PG_STS",		BIT(10)},
13883f168a1SRajvi Jingar 	{"SBR3_PGD0_PG_STS",		BIT(11)},
13983f168a1SRajvi Jingar 	{"MPFPW1_PGD0_PG_STS",		BIT(12)},
14083f168a1SRajvi Jingar 	{"SBR5_PGD0_PG_STS",		BIT(13)},
14183f168a1SRajvi Jingar 	{"FIA_X_PGD0_PG_STS",		BIT(14)},
14283f168a1SRajvi Jingar 	{"FIACPCB_X_PGD0_PG_STS",	BIT(15)},
14383f168a1SRajvi Jingar 	{"SBRG_PGD0_PG_STS",		BIT(16)},
14483f168a1SRajvi Jingar 	{"SOC_D2D_PGD1_PG_STS",		BIT(17)},
14583f168a1SRajvi Jingar 	{"PSF4_PGD0_PG_STS",		BIT(18)},
14683f168a1SRajvi Jingar 	{"CNVI_PGD0_PG_STS",		BIT(19)},
14783f168a1SRajvi Jingar 	{"UFSX2_PGD0_PG_STS",		BIT(20)},
14883f168a1SRajvi Jingar 	{"ENDBG_PGD0_PG_STS",		BIT(21)},
14983f168a1SRajvi Jingar 	{"DBG_PSF_PGD0_PG_STS",		BIT(22)},
15083f168a1SRajvi Jingar 	{"SBR6_PGD0_PG_STS",		BIT(23)},
15183f168a1SRajvi Jingar 	{"SOC_D2D_PGD2_PG_STS",		BIT(24)},
15283f168a1SRajvi Jingar 	{"NPK_PGD1_PG_STS",		BIT(25)},
15383f168a1SRajvi Jingar 	{"DMI3_PGD0_PG_STS",		BIT(26)},
15483f168a1SRajvi Jingar 	{"DBG_SBR_PGD0_PG_STS",		BIT(27)},
15583f168a1SRajvi Jingar 	{"SOC_D2D_PGD0_PG_STS",		BIT(28)},
15683f168a1SRajvi Jingar 	{"PSF6_PGD0_PG_STS",		BIT(29)},
15783f168a1SRajvi Jingar 	{"PSF7_PGD0_PG_STS",		BIT(30)},
15883f168a1SRajvi Jingar 	{"MPFPW3_PGD0_PG_STS",		BIT(31)},
15983f168a1SRajvi Jingar 	{}
16083f168a1SRajvi Jingar };
16183f168a1SRajvi Jingar 
16283f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_power_gating_status_2_map[] = {
16383f168a1SRajvi Jingar 	{"PSF8_PGD0_PG_STS",		BIT(0)},
16483f168a1SRajvi Jingar 	{"FIA_PGD0_PG_STS",		BIT(1)},
16583f168a1SRajvi Jingar 	{"SOC_D2D_PGD3_PG_STS",		BIT(2)},
16683f168a1SRajvi Jingar 	{"FIA_U_PGD0_PG_STS",		BIT(3)},
16783f168a1SRajvi Jingar 	{"TAM_PGD0_PG_STS",		BIT(4)},
16883f168a1SRajvi Jingar 	{"GBETSN_PGD0_PG_STS",		BIT(5)},
16983f168a1SRajvi Jingar 	{"TBTLSX_PGD0_PG_STS",		BIT(6)},
17083f168a1SRajvi Jingar 	{"THC0_PGD0_PG_STS",		BIT(7)},
17183f168a1SRajvi Jingar 	{"THC1_PGD0_PG_STS",		BIT(8)},
17283f168a1SRajvi Jingar 	{"PMC_PGD1_PG_STS",		BIT(9)},
17383f168a1SRajvi Jingar 	{"FIA_P5x16_PGD0_PG_STS",	BIT(10)},
17483f168a1SRajvi Jingar 	{"GNA_PGD0_PG_STS",		BIT(11)},
17583f168a1SRajvi Jingar 	{"ACE_PGD0_PG_STS",		BIT(12)},
17683f168a1SRajvi Jingar 	{"ACE_PGD1_PG_STS",		BIT(13)},
17783f168a1SRajvi Jingar 	{"ACE_PGD2_PG_STS",		BIT(14)},
17883f168a1SRajvi Jingar 	{"ACE_PGD3_PG_STS",		BIT(15)},
17983f168a1SRajvi Jingar 	{"ACE_PGD4_PG_STS",		BIT(16)},
18083f168a1SRajvi Jingar 	{"ACE_PGD5_PG_STS",		BIT(17)},
18183f168a1SRajvi Jingar 	{"ACE_PGD6_PG_STS",		BIT(18)},
18283f168a1SRajvi Jingar 	{"ACE_PGD7_PG_STS",		BIT(19)},
18383f168a1SRajvi Jingar 	{"ACE_PGD8_PG_STS",		BIT(20)},
18483f168a1SRajvi Jingar 	{"FIA_PGS_PGD0_PG_STS",		BIT(21)},
18583f168a1SRajvi Jingar 	{"FIACPCB_PGS_PGD0_PG_STS",	BIT(22)},
18683f168a1SRajvi Jingar 	{"FUSEPMSB_PGD0_PG_STS",	BIT(23)},
18783f168a1SRajvi Jingar 	{}
18883f168a1SRajvi Jingar };
18983f168a1SRajvi Jingar 
19083f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_d3_status_2_map[] = {
19183f168a1SRajvi Jingar 	{"CSMERTC_D3_STS",		BIT(1)},
19283f168a1SRajvi Jingar 	{"SUSRAM_D3_STS",		BIT(2)},
19383f168a1SRajvi Jingar 	{"CSE_D3_STS",			BIT(4)},
19483f168a1SRajvi Jingar 	{"KVMCC_D3_STS",		BIT(5)},
19583f168a1SRajvi Jingar 	{"USBR0_D3_STS",		BIT(6)},
19683f168a1SRajvi Jingar 	{"ISH_D3_STS",			BIT(7)},
19783f168a1SRajvi Jingar 	{"SMT1_D3_STS",			BIT(8)},
19883f168a1SRajvi Jingar 	{"SMT2_D3_STS",			BIT(9)},
19983f168a1SRajvi Jingar 	{"SMT3_D3_STS",			BIT(10)},
20083f168a1SRajvi Jingar 	{"GNA_D3_STS",			BIT(12)},
20183f168a1SRajvi Jingar 	{"CLINK_D3_STS",		BIT(14)},
20283f168a1SRajvi Jingar 	{"PTIO_D3_STS",			BIT(16)},
20383f168a1SRajvi Jingar 	{"PMT_D3_STS",			BIT(17)},
20483f168a1SRajvi Jingar 	{"SMS1_D3_STS",			BIT(18)},
20583f168a1SRajvi Jingar 	{"SMS2_D3_STS",			BIT(19)},
20683f168a1SRajvi Jingar 	{}
20783f168a1SRajvi Jingar };
20883f168a1SRajvi Jingar 
20983f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_d3_status_3_map[] = {
21083f168a1SRajvi Jingar 	{"GBETSN_D3_STS",		BIT(13)},
21183f168a1SRajvi Jingar 	{"THC0_D3_STS",			BIT(14)},
21283f168a1SRajvi Jingar 	{"THC1_D3_STS",			BIT(15)},
21383f168a1SRajvi Jingar 	{"ACE_D3_STS",			BIT(23)},
21483f168a1SRajvi Jingar 	{}
21583f168a1SRajvi Jingar };
21683f168a1SRajvi Jingar 
21783f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_vnn_req_status_3_map[] = {
21883f168a1SRajvi Jingar 	{"DTS0_VNN_REQ_STS",		BIT(7)},
21983f168a1SRajvi Jingar 	{"GPIOCOM5_VNN_REQ_STS",	BIT(11)},
22083f168a1SRajvi Jingar 	{}
22183f168a1SRajvi Jingar };
22283f168a1SRajvi Jingar 
22383f168a1SRajvi Jingar const struct pmc_bit_map *arl_socs_lpm_maps[] = {
22483f168a1SRajvi Jingar 	arl_socs_clocksource_status_map,
22583f168a1SRajvi Jingar 	arl_socs_power_gating_status_0_map,
22683f168a1SRajvi Jingar 	arl_socs_power_gating_status_1_map,
22783f168a1SRajvi Jingar 	arl_socs_power_gating_status_2_map,
22883f168a1SRajvi Jingar 	mtl_socm_d3_status_0_map,
22983f168a1SRajvi Jingar 	mtl_socm_d3_status_1_map,
23083f168a1SRajvi Jingar 	arl_socs_d3_status_2_map,
23183f168a1SRajvi Jingar 	arl_socs_d3_status_3_map,
23283f168a1SRajvi Jingar 	mtl_socm_vnn_req_status_0_map,
23383f168a1SRajvi Jingar 	mtl_socm_vnn_req_status_1_map,
23483f168a1SRajvi Jingar 	mtl_socm_vnn_req_status_2_map,
23583f168a1SRajvi Jingar 	arl_socs_vnn_req_status_3_map,
23683f168a1SRajvi Jingar 	mtl_socm_vnn_misc_status_map,
23783f168a1SRajvi Jingar 	mtl_socm_signal_status_map,
23883f168a1SRajvi Jingar 	NULL
23983f168a1SRajvi Jingar };
24083f168a1SRajvi Jingar 
24183f168a1SRajvi Jingar const struct pmc_bit_map arl_socs_pfear_map[] = {
24283f168a1SRajvi Jingar 	{"RSVD64",			BIT(0)},
24383f168a1SRajvi Jingar 	{"RSVD65",			BIT(1)},
24483f168a1SRajvi Jingar 	{"RSVD66",			BIT(2)},
24583f168a1SRajvi Jingar 	{"RSVD67",			BIT(3)},
24683f168a1SRajvi Jingar 	{"RSVD68",			BIT(4)},
24783f168a1SRajvi Jingar 	{"GBETSN",			BIT(5)},
24883f168a1SRajvi Jingar 	{"TBTLSX",			BIT(6)},
24983f168a1SRajvi Jingar 	{}
25083f168a1SRajvi Jingar };
25183f168a1SRajvi Jingar 
25283f168a1SRajvi Jingar const struct pmc_bit_map *ext_arl_socs_pfear_map[] = {
25383f168a1SRajvi Jingar 	mtl_socm_pfear_map,
25483f168a1SRajvi Jingar 	arl_socs_pfear_map,
25583f168a1SRajvi Jingar 	NULL
25683f168a1SRajvi Jingar };
25783f168a1SRajvi Jingar 
25883f168a1SRajvi Jingar const struct pmc_reg_map arl_socs_reg_map = {
25983f168a1SRajvi Jingar 	.pfear_sts = ext_arl_socs_pfear_map,
26083f168a1SRajvi Jingar 	.ppfear_buckets = ARL_SOCS_PPFEAR_NUM_ENTRIES,
26183f168a1SRajvi Jingar 	.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
26283f168a1SRajvi Jingar 	.lpm_sts = arl_socs_lpm_maps,
26383f168a1SRajvi Jingar 	.ltr_ignore_max = ARL_SOCS_NUM_IP_IGN_ALLOWED,
26483f168a1SRajvi Jingar 	.ltr_show_sts = arl_socs_ltr_show_map,
26583f168a1SRajvi Jingar 	.slp_s0_offset = CNP_PMC_SLP_S0_RES_COUNTER_OFFSET,
26683f168a1SRajvi Jingar 	.slp_s0_res_counter_step = TGL_PMC_SLP_S0_RES_COUNTER_STEP,
26783f168a1SRajvi Jingar 	.lpm_res_counter_step_x2 = TGL_PMC_LPM_RES_COUNTER_STEP_X2,
26883f168a1SRajvi Jingar 	.msr_sts = msr_map,
26983f168a1SRajvi Jingar 	.ltr_ignore_offset = CNP_PMC_LTR_IGNORE_OFFSET,
27083f168a1SRajvi Jingar 	.regmap_length = MTL_SOC_PMC_MMIO_REG_LEN,
27183f168a1SRajvi Jingar 	.ppfear0_offset = CNP_PMC_HOST_PPFEAR0A,
27283f168a1SRajvi Jingar 	.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
27383f168a1SRajvi Jingar 	.lpm_priority_offset = MTL_LPM_PRI_OFFSET,
27483f168a1SRajvi Jingar 	.lpm_en_offset = MTL_LPM_EN_OFFSET,
27583f168a1SRajvi Jingar 	.lpm_residency_offset = MTL_LPM_RESIDENCY_OFFSET,
27683f168a1SRajvi Jingar 	.lpm_status_offset = MTL_LPM_STATUS_OFFSET,
27783f168a1SRajvi Jingar 	.lpm_sts_latch_en_offset = MTL_LPM_STATUS_LATCH_EN_OFFSET,
27883f168a1SRajvi Jingar 	.lpm_live_status_offset = MTL_LPM_LIVE_STATUS_OFFSET,
27983f168a1SRajvi Jingar 	.lpm_num_maps = ADL_LPM_NUM_MAPS,
28083f168a1SRajvi Jingar 	.lpm_reg_index = ARL_LPM_REG_INDEX,
28183f168a1SRajvi Jingar 	.etr3_offset = ETR3_OFFSET,
28283f168a1SRajvi Jingar 	.pson_residency_offset = TGL_PSON_RESIDENCY_OFFSET,
28383f168a1SRajvi Jingar 	.pson_residency_counter_step = TGL_PSON_RES_COUNTER_STEP,
28483f168a1SRajvi Jingar };
28583f168a1SRajvi Jingar 
28683f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_ltr_show_map[] = {
28783f168a1SRajvi Jingar 	{"SOUTHPORT_A",		CNP_PMC_LTR_SPA},
28883f168a1SRajvi Jingar 	{"SOUTHPORT_B",		CNP_PMC_LTR_SPB},
28983f168a1SRajvi Jingar 	{"SATA",		CNP_PMC_LTR_SATA},
29083f168a1SRajvi Jingar 	{"GIGABIT_ETHERNET",	CNP_PMC_LTR_GBE},
29183f168a1SRajvi Jingar 	{"XHCI",		CNP_PMC_LTR_XHCI},
29283f168a1SRajvi Jingar 	{"SOUTHPORT_F",		ADL_PMC_LTR_SPF},
29383f168a1SRajvi Jingar 	{"ME",			CNP_PMC_LTR_ME},
29483f168a1SRajvi Jingar 	/* EVA is Enterprise Value Add, doesn't really exist on PCH */
29583f168a1SRajvi Jingar 	{"SATA1",		CNP_PMC_LTR_EVA},
29683f168a1SRajvi Jingar 	{"SOUTHPORT_C",		CNP_PMC_LTR_SPC},
29783f168a1SRajvi Jingar 	{"HD_AUDIO",		CNP_PMC_LTR_AZ},
29883f168a1SRajvi Jingar 	{"CNV",			CNP_PMC_LTR_CNV},
29983f168a1SRajvi Jingar 	{"LPSS",		CNP_PMC_LTR_LPSS},
30083f168a1SRajvi Jingar 	{"SOUTHPORT_D",		CNP_PMC_LTR_SPD},
30183f168a1SRajvi Jingar 	{"SOUTHPORT_E",		CNP_PMC_LTR_SPE},
30283f168a1SRajvi Jingar 	{"SATA2",		CNP_PMC_LTR_CAM},
30383f168a1SRajvi Jingar 	{"ESPI",		CNP_PMC_LTR_ESPI},
30483f168a1SRajvi Jingar 	{"SCC",			CNP_PMC_LTR_SCC},
30583f168a1SRajvi Jingar 	{"ISH",			CNP_PMC_LTR_ISH},
30683f168a1SRajvi Jingar 	{"UFSX2",		CNP_PMC_LTR_UFSX2},
30783f168a1SRajvi Jingar 	{"EMMC",		CNP_PMC_LTR_EMMC},
30883f168a1SRajvi Jingar 	/*
30983f168a1SRajvi Jingar 	 * Check intel_pmc_core_ids[] users of cnp_reg_map for
31083f168a1SRajvi Jingar 	 * a list of core SoCs using this.
31183f168a1SRajvi Jingar 	 */
31283f168a1SRajvi Jingar 	{"WIGIG",		ICL_PMC_LTR_WIGIG},
31383f168a1SRajvi Jingar 	{"THC0",		TGL_PMC_LTR_THC0},
31483f168a1SRajvi Jingar 	{"THC1",		TGL_PMC_LTR_THC1},
31583f168a1SRajvi Jingar 	{"SOUTHPORT_G",		MTL_PMC_LTR_SPG},
31683f168a1SRajvi Jingar 	{"ESE",			MTL_PMC_LTR_ESE},
31783f168a1SRajvi Jingar 	{"IOE_PMC",		MTL_PMC_LTR_IOE_PMC},
31883f168a1SRajvi Jingar 	{"DMI3",		ARL_PMC_LTR_DMI3},
31983f168a1SRajvi Jingar 
32083f168a1SRajvi Jingar 	/* Below two cannot be used for LTR_IGNORE */
32183f168a1SRajvi Jingar 	{"CURRENT_PLATFORM",	CNP_PMC_LTR_CUR_PLT},
32283f168a1SRajvi Jingar 	{"AGGREGATED_SYSTEM",	CNP_PMC_LTR_CUR_ASLT},
32383f168a1SRajvi Jingar 	{}
32483f168a1SRajvi Jingar };
32583f168a1SRajvi Jingar 
32683f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_clocksource_status_map[] = {
32783f168a1SRajvi Jingar 	{"AON2_OFF_STS",		BIT(0)},
32883f168a1SRajvi Jingar 	{"AON3_OFF_STS",		BIT(1)},
32983f168a1SRajvi Jingar 	{"AON4_OFF_STS",		BIT(2)},
33083f168a1SRajvi Jingar 	{"AON2_SPL_OFF_STS",		BIT(3)},
33183f168a1SRajvi Jingar 	{"AONL_OFF_STS",		BIT(4)},
33283f168a1SRajvi Jingar 	{"XTAL_LVM_OFF_STS",		BIT(5)},
33383f168a1SRajvi Jingar 	{"AON5_ACRO_OFF_STS",		BIT(6)},
33483f168a1SRajvi Jingar 	{"AON6_ACRO_OFF_STS",		BIT(7)},
33583f168a1SRajvi Jingar 	{"USB3_PLL_OFF_STS",		BIT(8)},
33683f168a1SRajvi Jingar 	{"ACRO_OFF_STS",		BIT(9)},
33783f168a1SRajvi Jingar 	{"AUDIO_PLL_OFF_STS",		BIT(10)},
33883f168a1SRajvi Jingar 	{"MAIN_CRO_OFF_STS",		BIT(11)},
33983f168a1SRajvi Jingar 	{"MAIN_DIVIDER_OFF_STS",	BIT(12)},
34083f168a1SRajvi Jingar 	{"REF_PLL_NON_OC_OFF_STS",	BIT(13)},
34183f168a1SRajvi Jingar 	{"DMI_PLL_OFF_STS",		BIT(14)},
34283f168a1SRajvi Jingar 	{"PHY_EXT_INJ_OFF_STS",		BIT(15)},
34383f168a1SRajvi Jingar 	{"AON6_MCRO_OFF_STS",		BIT(16)},
34483f168a1SRajvi Jingar 	{"XTAL_AGGR_OFF_STS",		BIT(17)},
34583f168a1SRajvi Jingar 	{"USB2_PLL_OFF_STS",		BIT(18)},
34683f168a1SRajvi Jingar 	{"TSN0_PLL_OFF_STS",		BIT(19)},
34783f168a1SRajvi Jingar 	{"TSN1_PLL_OFF_STS",		BIT(20)},
34883f168a1SRajvi Jingar 	{"GBE_PLL_OFF_STS",		BIT(21)},
34983f168a1SRajvi Jingar 	{"SATA_PLL_OFF_STS",		BIT(22)},
35083f168a1SRajvi Jingar 	{"PCIE0_PLL_OFF_STS",		BIT(23)},
35183f168a1SRajvi Jingar 	{"PCIE1_PLL_OFF_STS",		BIT(24)},
35283f168a1SRajvi Jingar 	{"PCIE2_PLL_OFF_STS",		BIT(26)},
35383f168a1SRajvi Jingar 	{"PCIE3_PLL_OFF_STS",		BIT(27)},
35483f168a1SRajvi Jingar 	{"REF_PLL_OFF_STS",		BIT(28)},
35583f168a1SRajvi Jingar 	{"PCIE4_PLL_OFF_STS",		BIT(29)},
35683f168a1SRajvi Jingar 	{"PCIE5_PLL_OFF_STS",		BIT(30)},
35783f168a1SRajvi Jingar 	{"REF38P4_PLL_OFF_STS",		BIT(31)},
35883f168a1SRajvi Jingar 	{}
35983f168a1SRajvi Jingar };
36083f168a1SRajvi Jingar 
36183f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_power_gating_status_0_map[] = {
36283f168a1SRajvi Jingar 	{"PMC_PGD0_PG_STS",		BIT(0)},
36383f168a1SRajvi Jingar 	{"DMI_PGD0_PG_STS",		BIT(1)},
36483f168a1SRajvi Jingar 	{"ESPISPI_PGD0_PG_STS",		BIT(2)},
36583f168a1SRajvi Jingar 	{"XHCI_PGD0_PG_STS",		BIT(3)},
36683f168a1SRajvi Jingar 	{"SPA_PGD0_PG_STS",		BIT(4)},
36783f168a1SRajvi Jingar 	{"SPB_PGD0_PG_STS",		BIT(5)},
36883f168a1SRajvi Jingar 	{"SPC_PGD0_PG_STS",		BIT(6)},
36983f168a1SRajvi Jingar 	{"GBE_PGD0_PG_STS",		BIT(7)},
37083f168a1SRajvi Jingar 	{"SATA_PGD0_PG_STS",		BIT(8)},
37183f168a1SRajvi Jingar 	{"FIA_X_PGD0_PG_STS",		BIT(9)},
37283f168a1SRajvi Jingar 	{"MPFPW4_PGD0_PG_STS",		BIT(10)},
37383f168a1SRajvi Jingar 	{"EAH_PGD0_PG_STS",		BIT(11)},
37483f168a1SRajvi Jingar 	{"MPFPW1_PGD0_PG_STS",		BIT(12)},
37583f168a1SRajvi Jingar 	{"SPD_PGD0_PG_STS",		BIT(13)},
37683f168a1SRajvi Jingar 	{"LPSS_PGD0_PG_STS",		BIT(14)},
37783f168a1SRajvi Jingar 	{"LPC_PGD0_PG_STS",		BIT(15)},
37883f168a1SRajvi Jingar 	{"SMB_PGD0_PG_STS",		BIT(16)},
37983f168a1SRajvi Jingar 	{"ISH_PGD0_PG_STS",		BIT(17)},
38083f168a1SRajvi Jingar 	{"P2S_PGD0_PG_STS",		BIT(18)},
38183f168a1SRajvi Jingar 	{"NPK_PGD0_PG_STS",		BIT(19)},
38283f168a1SRajvi Jingar 	{"U3FPW1_PGD0_PG_STS",		BIT(20)},
38383f168a1SRajvi Jingar 	{"PECI_PGD0_PG_STS",		BIT(21)},
38483f168a1SRajvi Jingar 	{"FUSE_PGD0_PG_STS",		BIT(22)},
38583f168a1SRajvi Jingar 	{"SBR8_PGD0_PG_STS",		BIT(23)},
38683f168a1SRajvi Jingar 	{"EXE_PGD0_PG_STS",		BIT(24)},
38783f168a1SRajvi Jingar 	{"XDCI_PGD0_PG_STS",		BIT(25)},
38883f168a1SRajvi Jingar 	{"EXI_PGD0_PG_STS",		BIT(26)},
38983f168a1SRajvi Jingar 	{"CSE_PGD0_PG_STS",		BIT(27)},
39083f168a1SRajvi Jingar 	{"KVMCC_PGD0_PG_STS",		BIT(28)},
39183f168a1SRajvi Jingar 	{"PMT_PGD0_PG_STS",		BIT(29)},
39283f168a1SRajvi Jingar 	{"CLINK_PGD0_PG_STS",		BIT(30)},
39383f168a1SRajvi Jingar 	{"PTIO_PGD0_PG_STS",		BIT(31)},
39483f168a1SRajvi Jingar 	{}
39583f168a1SRajvi Jingar };
39683f168a1SRajvi Jingar 
39783f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_power_gating_status_1_map[] = {
39883f168a1SRajvi Jingar 	{"USBR0_PGD0_PG_STS",		BIT(0)},
39983f168a1SRajvi Jingar 	{"SUSRAM_PGD0_PG_STS",		BIT(1)},
40083f168a1SRajvi Jingar 	{"SMT1_PGD0_PG_STS",		BIT(2)},
40183f168a1SRajvi Jingar 	{"SMT4_PGD0_PG_STS",		BIT(3)},
40283f168a1SRajvi Jingar 	{"SMS2_PGD0_PG_STS",		BIT(4)},
40383f168a1SRajvi Jingar 	{"SMS1_PGD0_PG_STS",		BIT(5)},
40483f168a1SRajvi Jingar 	{"CSMERTC_PGD0_PG_STS",		BIT(6)},
40583f168a1SRajvi Jingar 	{"CSMEPSF_PGD0_PG_STS",		BIT(7)},
40683f168a1SRajvi Jingar 	{"SBR0_PGD0_PG_STS",		BIT(8)},
40783f168a1SRajvi Jingar 	{"SBR1_PGD0_PG_STS",		BIT(9)},
40883f168a1SRajvi Jingar 	{"SBR2_PGD0_PG_STS",		BIT(10)},
40983f168a1SRajvi Jingar 	{"SBR3_PGD0_PG_STS",		BIT(11)},
41083f168a1SRajvi Jingar 	{"SBR4_PGD0_PG_STS",		BIT(12)},
41183f168a1SRajvi Jingar 	{"SBR5_PGD0_PG_STS",		BIT(13)},
41283f168a1SRajvi Jingar 	{"MPFPW3_PGD0_PG_STS",		BIT(14)},
41383f168a1SRajvi Jingar 	{"PSF1_PGD0_PG_STS",		BIT(15)},
41483f168a1SRajvi Jingar 	{"PSF2_PGD0_PG_STS",		BIT(16)},
41583f168a1SRajvi Jingar 	{"PSF3_PGD0_PG_STS",		BIT(17)},
41683f168a1SRajvi Jingar 	{"PSF4_PGD0_PG_STS",		BIT(18)},
41783f168a1SRajvi Jingar 	{"CNVI_PGD0_PG_STS",		BIT(19)},
41883f168a1SRajvi Jingar 	{"DMI3_PGD0_PG_STS",		BIT(20)},
41983f168a1SRajvi Jingar 	{"ENDBG_PGD0_PG_STS",		BIT(21)},
42083f168a1SRajvi Jingar 	{"DBG_SBR_PGD0_PG_STS",		BIT(22)},
42183f168a1SRajvi Jingar 	{"SBR6_PGD0_PG_STS",		BIT(23)},
42283f168a1SRajvi Jingar 	{"SBR7_PGD0_PG_STS",		BIT(24)},
42383f168a1SRajvi Jingar 	{"NPK_PGD1_PG_STS",		BIT(25)},
42483f168a1SRajvi Jingar 	{"U3FPW3_PGD0_PG_STS",		BIT(26)},
42583f168a1SRajvi Jingar 	{"MPFPW2_PGD0_PG_STS",		BIT(27)},
42683f168a1SRajvi Jingar 	{"MPFPW7_PGD0_PG_STS",		BIT(28)},
42783f168a1SRajvi Jingar 	{"GBETSN1_PGD0_PG_STS",		BIT(29)},
42883f168a1SRajvi Jingar 	{"PSF7_PGD0_PG_STS",		BIT(30)},
42983f168a1SRajvi Jingar 	{"FIA2_PGD0_PG_STS",		BIT(31)},
43083f168a1SRajvi Jingar 	{}
43183f168a1SRajvi Jingar };
43283f168a1SRajvi Jingar 
43383f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_power_gating_status_2_map[] = {
43483f168a1SRajvi Jingar 	{"U3FPW2_PGD0_PG_STS",		BIT(0)},
43583f168a1SRajvi Jingar 	{"FIA_PGD0_PG_STS",		BIT(1)},
43683f168a1SRajvi Jingar 	{"FIACPCB_X_PGD0_PG_STS",	BIT(2)},
43783f168a1SRajvi Jingar 	{"FIA1_PGD0_PG_STS",		BIT(3)},
43883f168a1SRajvi Jingar 	{"TAM_PGD0_PG_STS",		BIT(4)},
43983f168a1SRajvi Jingar 	{"GBETSN_PGD0_PG_STS",		BIT(5)},
44083f168a1SRajvi Jingar 	{"SBR9_PGD0_PG_STS",		BIT(6)},
44183f168a1SRajvi Jingar 	{"THC0_PGD0_PG_STS",		BIT(7)},
44283f168a1SRajvi Jingar 	{"THC1_PGD0_PG_STS",		BIT(8)},
44383f168a1SRajvi Jingar 	{"PMC_PGD1_PG_STS",		BIT(9)},
44483f168a1SRajvi Jingar 	{"DBC_PGD0_PG_STS",		BIT(10)},
44583f168a1SRajvi Jingar 	{"DBG_PSF_PGD0_PG_STS",		BIT(11)},
44683f168a1SRajvi Jingar 	{"SPF_PGD0_PG_STS",		BIT(12)},
44783f168a1SRajvi Jingar 	{"ACE_PGD0_PG_STS",		BIT(13)},
44883f168a1SRajvi Jingar 	{"ACE_PGD1_PG_STS",		BIT(14)},
44983f168a1SRajvi Jingar 	{"ACE_PGD2_PG_STS",		BIT(15)},
45083f168a1SRajvi Jingar 	{"ACE_PGD3_PG_STS",		BIT(16)},
45183f168a1SRajvi Jingar 	{"ACE_PGD4_PG_STS",		BIT(17)},
45283f168a1SRajvi Jingar 	{"ACE_PGD5_PG_STS",		BIT(18)},
45383f168a1SRajvi Jingar 	{"ACE_PGD6_PG_STS",		BIT(19)},
45483f168a1SRajvi Jingar 	{"ACE_PGD7_PG_STS",		BIT(20)},
45583f168a1SRajvi Jingar 	{"SPE_PGD0_PG_STS",		BIT(21)},
45683f168a1SRajvi Jingar 	{"MPFPW5_PG_STS",		BIT(22)},
45783f168a1SRajvi Jingar 	{}
45883f168a1SRajvi Jingar };
45983f168a1SRajvi Jingar 
46083f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_d3_status_0_map[] = {
46183f168a1SRajvi Jingar 	{"SPF_D3_STS",			BIT(0)},
46283f168a1SRajvi Jingar 	{"LPSS_D3_STS",			BIT(3)},
46383f168a1SRajvi Jingar 	{"XDCI_D3_STS",			BIT(4)},
46483f168a1SRajvi Jingar 	{"XHCI_D3_STS",			BIT(5)},
46583f168a1SRajvi Jingar 	{"SPA_D3_STS",			BIT(12)},
46683f168a1SRajvi Jingar 	{"SPB_D3_STS",			BIT(13)},
46783f168a1SRajvi Jingar 	{"SPC_D3_STS",			BIT(14)},
46883f168a1SRajvi Jingar 	{"SPD_D3_STS",			BIT(15)},
46983f168a1SRajvi Jingar 	{"SPE_D3_STS",			BIT(16)},
47083f168a1SRajvi Jingar 	{"ESPISPI_D3_STS",		BIT(18)},
47183f168a1SRajvi Jingar 	{"SATA_D3_STS",			BIT(20)},
47283f168a1SRajvi Jingar 	{"PSTH_D3_STS",			BIT(21)},
47383f168a1SRajvi Jingar 	{"DMI_D3_STS",			BIT(22)},
47483f168a1SRajvi Jingar 	{}
47583f168a1SRajvi Jingar };
47683f168a1SRajvi Jingar 
47783f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_d3_status_1_map[] = {
47883f168a1SRajvi Jingar 	{"GBETSN1_D3_STS",		BIT(14)},
47983f168a1SRajvi Jingar 	{"GBE_D3_STS",			BIT(19)},
48083f168a1SRajvi Jingar 	{"ITSS_D3_STS",			BIT(23)},
48183f168a1SRajvi Jingar 	{"P2S_D3_STS",			BIT(24)},
48283f168a1SRajvi Jingar 	{"CNVI_D3_STS",			BIT(27)},
48383f168a1SRajvi Jingar 	{}
48483f168a1SRajvi Jingar };
48583f168a1SRajvi Jingar 
48683f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_d3_status_2_map[] = {
48783f168a1SRajvi Jingar 	{"CSMERTC_D3_STS",		BIT(1)},
48883f168a1SRajvi Jingar 	{"SUSRAM_D3_STS",		BIT(2)},
48983f168a1SRajvi Jingar 	{"CSE_D3_STS",			BIT(4)},
49083f168a1SRajvi Jingar 	{"KVMCC_D3_STS",		BIT(5)},
49183f168a1SRajvi Jingar 	{"USBR0_D3_STS",		BIT(6)},
49283f168a1SRajvi Jingar 	{"ISH_D3_STS",			BIT(7)},
49383f168a1SRajvi Jingar 	{"SMT1_D3_STS",			BIT(8)},
49483f168a1SRajvi Jingar 	{"SMT2_D3_STS",			BIT(9)},
49583f168a1SRajvi Jingar 	{"SMT3_D3_STS",			BIT(10)},
49683f168a1SRajvi Jingar 	{"SMT4_D3_STS",			BIT(11)},
49783f168a1SRajvi Jingar 	{"SMT5_D3_STS",			BIT(12)},
49883f168a1SRajvi Jingar 	{"SMT6_D3_STS",			BIT(13)},
49983f168a1SRajvi Jingar 	{"CLINK_D3_STS",		BIT(14)},
50083f168a1SRajvi Jingar 	{"PTIO_D3_STS",			BIT(16)},
50183f168a1SRajvi Jingar 	{"PMT_D3_STS",			BIT(17)},
50283f168a1SRajvi Jingar 	{"SMS1_D3_STS",			BIT(18)},
50383f168a1SRajvi Jingar 	{"SMS2_D3_STS",			BIT(19)},
50483f168a1SRajvi Jingar 	{}
50583f168a1SRajvi Jingar };
50683f168a1SRajvi Jingar 
50783f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_d3_status_3_map[] = {
50883f168a1SRajvi Jingar 	{"ESE_D3_STS",			BIT(3)},
50983f168a1SRajvi Jingar 	{"GBETSN_D3_STS",		BIT(13)},
51083f168a1SRajvi Jingar 	{"THC0_D3_STS",			BIT(14)},
51183f168a1SRajvi Jingar 	{"THC1_D3_STS",			BIT(15)},
51283f168a1SRajvi Jingar 	{"ACE_D3_STS",			BIT(23)},
51383f168a1SRajvi Jingar 	{}
51483f168a1SRajvi Jingar };
51583f168a1SRajvi Jingar 
51683f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_vnn_req_status_0_map[] = {
51783f168a1SRajvi Jingar 	{"FIA_VNN_REQ_STS",		BIT(17)},
51883f168a1SRajvi Jingar 	{"ESPISPI_VNN_REQ_STS",		BIT(18)},
51983f168a1SRajvi Jingar 	{}
52083f168a1SRajvi Jingar };
52183f168a1SRajvi Jingar 
52283f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_vnn_req_status_1_map[] = {
52383f168a1SRajvi Jingar 	{"NPK_VNN_REQ_STS",		BIT(4)},
52483f168a1SRajvi Jingar 	{"DFXAGG_VNN_REQ_STS",		BIT(8)},
52583f168a1SRajvi Jingar 	{"EXI_VNN_REQ_STS",		BIT(9)},
52683f168a1SRajvi Jingar 	{"GBE_VNN_REQ_STS",		BIT(19)},
52783f168a1SRajvi Jingar 	{"SMB_VNN_REQ_STS",		BIT(25)},
52883f168a1SRajvi Jingar 	{"LPC_VNN_REQ_STS",		BIT(26)},
52983f168a1SRajvi Jingar 	{"CNVI_VNN_REQ_STS",		BIT(27)},
53083f168a1SRajvi Jingar 	{}
53183f168a1SRajvi Jingar };
53283f168a1SRajvi Jingar 
53383f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_vnn_req_status_2_map[] = {
53483f168a1SRajvi Jingar 	{"FIA2_VNN_REQ_STS",		BIT(0)},
53583f168a1SRajvi Jingar 	{"CSMERTC_VNN_REQ_STS",		BIT(1)},
53683f168a1SRajvi Jingar 	{"CSE_VNN_REQ_STS",		BIT(4)},
53783f168a1SRajvi Jingar 	{"ISH_VNN_REQ_STS",		BIT(7)},
53883f168a1SRajvi Jingar 	{"SMT1_VNN_REQ_STS",		BIT(8)},
53983f168a1SRajvi Jingar 	{"SMT4_VNN_REQ_STS",		BIT(11)},
54083f168a1SRajvi Jingar 	{"CLINK_VNN_REQ_STS",		BIT(14)},
54183f168a1SRajvi Jingar 	{"SMS1_VNN_REQ_STS",		BIT(18)},
54283f168a1SRajvi Jingar 	{"SMS2_VNN_REQ_STS",		BIT(19)},
54383f168a1SRajvi Jingar 	{"GPIOCOM4_VNN_REQ_STS",	BIT(20)},
54483f168a1SRajvi Jingar 	{"GPIOCOM3_VNN_REQ_STS",	BIT(21)},
54583f168a1SRajvi Jingar 	{"GPIOCOM2_VNN_REQ_STS",	BIT(22)},
54683f168a1SRajvi Jingar 	{"GPIOCOM1_VNN_REQ_STS",	BIT(23)},
54783f168a1SRajvi Jingar 	{"GPIOCOM0_VNN_REQ_STS",	BIT(24)},
54883f168a1SRajvi Jingar 	{}
54983f168a1SRajvi Jingar };
55083f168a1SRajvi Jingar 
55183f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_vnn_req_status_3_map[] = {
55283f168a1SRajvi Jingar 	{"ESE_VNN_REQ_STS",		BIT(3)},
55383f168a1SRajvi Jingar 	{"DTS0_VNN_REQ_STS",		BIT(7)},
55483f168a1SRajvi Jingar 	{"GPIOCOM5_VNN_REQ_STS",	BIT(11)},
55583f168a1SRajvi Jingar 	{"FIA1_VNN_REQ_STS",		BIT(12)},
55683f168a1SRajvi Jingar 	{}
55783f168a1SRajvi Jingar };
55883f168a1SRajvi Jingar 
55983f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_vnn_misc_status_map[] = {
56083f168a1SRajvi Jingar 	{"CPU_C10_REQ_STS",			BIT(0)},
56183f168a1SRajvi Jingar 	{"TS_OFF_REQ_STS",			BIT(1)},
56283f168a1SRajvi Jingar 	{"PNDE_MET_REQ_STS",			BIT(2)},
56383f168a1SRajvi Jingar 	{"PCIE_DEEP_PM_REQ_STS",		BIT(3)},
56483f168a1SRajvi Jingar 	{"FW_THROTTLE_ALLOWED_REQ_STS",		BIT(4)},
56583f168a1SRajvi Jingar 	{"ISH_VNNAON_REQ_STS",			BIT(7)},
56683f168a1SRajvi Jingar 	{"IOE_COND_MET_S02I2_0_REQ_STS",	BIT(8)},
56783f168a1SRajvi Jingar 	{"IOE_COND_MET_S02I2_1_REQ_STS",	BIT(9)},
56883f168a1SRajvi Jingar 	{"IOE_COND_MET_S02I2_2_REQ_STS",	BIT(10)},
56983f168a1SRajvi Jingar 	{"PLT_GREATER_REQ_STS",			BIT(11)},
57083f168a1SRajvi Jingar 	{"PMC_IDLE_FB_OCP_REQ_STS",		BIT(13)},
57183f168a1SRajvi Jingar 	{"PM_SYNC_STATES_REQ_STS",		BIT(14)},
57283f168a1SRajvi Jingar 	{"EA_REQ_STS",				BIT(15)},
57383f168a1SRajvi Jingar 	{"DMI_CLKREQ_B_REQ_STS",		BIT(16)},
57483f168a1SRajvi Jingar 	{"BRK_EV_EN_REQ_STS",			BIT(17)},
57583f168a1SRajvi Jingar 	{"AUTO_DEMO_EN_REQ_STS",		BIT(18)},
57683f168a1SRajvi Jingar 	{"ITSS_CLK_SRC_REQ_STS",		BIT(19)},
57783f168a1SRajvi Jingar 	{"ARC_IDLE_REQ_STS",			BIT(21)},
57883f168a1SRajvi Jingar 	{"DMI_IN_REQ_STS",			BIT(22)},
57983f168a1SRajvi Jingar 	{"FIA_DEEP_PM_REQ_STS",			BIT(23)},
58083f168a1SRajvi Jingar 	{"XDCI_ATTACHED_REQ_STS",		BIT(24)},
58183f168a1SRajvi Jingar 	{"ARC_INTERRUPT_WAKE_REQ_STS",		BIT(25)},
58283f168a1SRajvi Jingar 	{"PRE_WAKE0_REQ_STS",			BIT(27)},
58383f168a1SRajvi Jingar 	{"PRE_WAKE1_REQ_STS",			BIT(28)},
58483f168a1SRajvi Jingar 	{"PRE_WAKE2_EN_REQ_STS",		BIT(29)},
58583f168a1SRajvi Jingar 	{"CNVI_V1P05_REQ_STS",			BIT(31)},
58683f168a1SRajvi Jingar 	{}
58783f168a1SRajvi Jingar };
58883f168a1SRajvi Jingar 
58983f168a1SRajvi Jingar const struct pmc_bit_map arl_pchs_signal_status_map[] = {
59083f168a1SRajvi Jingar 	{"LSX_Wake0_STS",		BIT(0)},
59183f168a1SRajvi Jingar 	{"LSX_Wake1_STS",		BIT(1)},
59283f168a1SRajvi Jingar 	{"LSX_Wake2_STS",		BIT(2)},
59383f168a1SRajvi Jingar 	{"LSX_Wake3_STS",		BIT(3)},
59483f168a1SRajvi Jingar 	{"LSX_Wake4_STS",		BIT(4)},
59583f168a1SRajvi Jingar 	{"LSX_Wake5_STS",		BIT(5)},
59683f168a1SRajvi Jingar 	{"LSX_Wake6_STS",		BIT(6)},
59783f168a1SRajvi Jingar 	{"LSX_Wake7_STS",		BIT(7)},
59883f168a1SRajvi Jingar 	{"Int_Timer_SS_Wake0_STS",	BIT(8)},
59983f168a1SRajvi Jingar 	{"Int_Timer_SS_Wake1_STS",	BIT(9)},
60083f168a1SRajvi Jingar 	{"Int_Timer_SS_Wake0_STS",	BIT(10)},
60183f168a1SRajvi Jingar 	{"Int_Timer_SS_Wake1_STS",	BIT(11)},
60283f168a1SRajvi Jingar 	{"Int_Timer_SS_Wake2_STS",	BIT(12)},
60383f168a1SRajvi Jingar 	{"Int_Timer_SS_Wake3_STS",	BIT(13)},
60483f168a1SRajvi Jingar 	{"Int_Timer_SS_Wake4_STS",	BIT(14)},
60583f168a1SRajvi Jingar 	{"Int_Timer_SS_Wake5_STS",	BIT(15)},
60683f168a1SRajvi Jingar 	{}
60783f168a1SRajvi Jingar };
60883f168a1SRajvi Jingar 
60983f168a1SRajvi Jingar const struct pmc_bit_map *arl_pchs_lpm_maps[] = {
61083f168a1SRajvi Jingar 	arl_pchs_clocksource_status_map,
61183f168a1SRajvi Jingar 	arl_pchs_power_gating_status_0_map,
61283f168a1SRajvi Jingar 	arl_pchs_power_gating_status_1_map,
61383f168a1SRajvi Jingar 	arl_pchs_power_gating_status_2_map,
61483f168a1SRajvi Jingar 	arl_pchs_d3_status_0_map,
61583f168a1SRajvi Jingar 	arl_pchs_d3_status_1_map,
61683f168a1SRajvi Jingar 	arl_pchs_d3_status_2_map,
61783f168a1SRajvi Jingar 	arl_pchs_d3_status_3_map,
61883f168a1SRajvi Jingar 	arl_pchs_vnn_req_status_0_map,
61983f168a1SRajvi Jingar 	arl_pchs_vnn_req_status_1_map,
62083f168a1SRajvi Jingar 	arl_pchs_vnn_req_status_2_map,
62183f168a1SRajvi Jingar 	arl_pchs_vnn_req_status_3_map,
62283f168a1SRajvi Jingar 	arl_pchs_vnn_misc_status_map,
62383f168a1SRajvi Jingar 	arl_pchs_signal_status_map,
62483f168a1SRajvi Jingar 	NULL
62583f168a1SRajvi Jingar };
62683f168a1SRajvi Jingar 
62783f168a1SRajvi Jingar const struct pmc_reg_map arl_pchs_reg_map = {
62883f168a1SRajvi Jingar 	.pfear_sts = ext_arl_socs_pfear_map,
62983f168a1SRajvi Jingar 	.ppfear_buckets = ARL_SOCS_PPFEAR_NUM_ENTRIES,
63083f168a1SRajvi Jingar 	.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
63183f168a1SRajvi Jingar 	.ltr_ignore_max = ARL_SOCS_NUM_IP_IGN_ALLOWED,
63283f168a1SRajvi Jingar 	.lpm_sts = arl_pchs_lpm_maps,
63383f168a1SRajvi Jingar 	.ltr_show_sts = arl_pchs_ltr_show_map,
63483f168a1SRajvi Jingar 	.slp_s0_offset = CNP_PMC_SLP_S0_RES_COUNTER_OFFSET,
63583f168a1SRajvi Jingar 	.slp_s0_res_counter_step = TGL_PMC_SLP_S0_RES_COUNTER_STEP,
63683f168a1SRajvi Jingar 	.lpm_res_counter_step_x2 = TGL_PMC_LPM_RES_COUNTER_STEP_X2,
63783f168a1SRajvi Jingar 	.msr_sts = msr_map,
63883f168a1SRajvi Jingar 	.ltr_ignore_offset = CNP_PMC_LTR_IGNORE_OFFSET,
63983f168a1SRajvi Jingar 	.regmap_length = ARL_PCH_PMC_MMIO_REG_LEN,
64083f168a1SRajvi Jingar 	.ppfear0_offset = CNP_PMC_HOST_PPFEAR0A,
64183f168a1SRajvi Jingar 	.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
64283f168a1SRajvi Jingar 	.lpm_priority_offset = MTL_LPM_PRI_OFFSET,
64383f168a1SRajvi Jingar 	.lpm_en_offset = MTL_LPM_EN_OFFSET,
64483f168a1SRajvi Jingar 	.lpm_residency_offset = MTL_LPM_RESIDENCY_OFFSET,
64583f168a1SRajvi Jingar 	.lpm_status_offset = MTL_LPM_STATUS_OFFSET,
64683f168a1SRajvi Jingar 	.lpm_sts_latch_en_offset = MTL_LPM_STATUS_LATCH_EN_OFFSET,
64783f168a1SRajvi Jingar 	.lpm_live_status_offset = MTL_LPM_LIVE_STATUS_OFFSET,
64883f168a1SRajvi Jingar 	.lpm_num_maps = ADL_LPM_NUM_MAPS,
64983f168a1SRajvi Jingar 	.lpm_reg_index = ARL_LPM_REG_INDEX,
65083f168a1SRajvi Jingar 	.etr3_offset = ETR3_OFFSET,
65183f168a1SRajvi Jingar };
65283f168a1SRajvi Jingar 
65383f168a1SRajvi Jingar #define PMC_DEVID_SOCS 0xae7f
65483f168a1SRajvi Jingar #define PMC_DEVID_IOEP 0x7ecf
65583f168a1SRajvi Jingar #define PMC_DEVID_PCHS 0x7f27
65683f168a1SRajvi Jingar static struct pmc_info arl_pmc_info_list[] = {
65783f168a1SRajvi Jingar 	{
65883f168a1SRajvi Jingar 		.guid	= IOEP_LPM_REQ_GUID,
65983f168a1SRajvi Jingar 		.devid	= PMC_DEVID_IOEP,
66083f168a1SRajvi Jingar 		.map	= &mtl_ioep_reg_map,
66183f168a1SRajvi Jingar 	},
66283f168a1SRajvi Jingar 	{
66383f168a1SRajvi Jingar 		.guid	= SOCS_LPM_REQ_GUID,
66483f168a1SRajvi Jingar 		.devid	= PMC_DEVID_SOCS,
66583f168a1SRajvi Jingar 		.map	= &arl_socs_reg_map,
66683f168a1SRajvi Jingar 	},
66783f168a1SRajvi Jingar 	{
66883f168a1SRajvi Jingar 		.guid	= PCHS_LPM_REQ_GUID,
66983f168a1SRajvi Jingar 		.devid	= PMC_DEVID_PCHS,
67083f168a1SRajvi Jingar 		.map	= &arl_pchs_reg_map,
67183f168a1SRajvi Jingar 	},
67283f168a1SRajvi Jingar 	{}
67383f168a1SRajvi Jingar };
67483f168a1SRajvi Jingar 
67583f168a1SRajvi Jingar #define ARL_NPU_PCI_DEV			0xad1d
676ac2d1fd9SDavid E. Box #define ARL_GNA_PCI_DEV			0xae4c
67783f168a1SRajvi Jingar /*
67883f168a1SRajvi Jingar  * Set power state of select devices that do not have drivers to D3
67983f168a1SRajvi Jingar  * so that they do not block Package C entry.
68083f168a1SRajvi Jingar  */
arl_d3_fixup(void)68183f168a1SRajvi Jingar static void arl_d3_fixup(void)
68283f168a1SRajvi Jingar {
68383f168a1SRajvi Jingar 	pmc_core_set_device_d3(ARL_NPU_PCI_DEV);
684ac2d1fd9SDavid E. Box 	pmc_core_set_device_d3(ARL_GNA_PCI_DEV);
68583f168a1SRajvi Jingar }
68683f168a1SRajvi Jingar 
arl_resume(struct pmc_dev * pmcdev)68783f168a1SRajvi Jingar static int arl_resume(struct pmc_dev *pmcdev)
68883f168a1SRajvi Jingar {
68983f168a1SRajvi Jingar 	arl_d3_fixup();
69010ed9ee0SDavid E. Box 	pmc_core_send_ltr_ignore(pmcdev, 3, 0);
69110ed9ee0SDavid E. Box 
69283f168a1SRajvi Jingar 	return pmc_core_resume_common(pmcdev);
69383f168a1SRajvi Jingar }
69483f168a1SRajvi Jingar 
arl_core_init(struct pmc_dev * pmcdev)69583f168a1SRajvi Jingar int arl_core_init(struct pmc_dev *pmcdev)
69683f168a1SRajvi Jingar {
69783f168a1SRajvi Jingar 	struct pmc *pmc = pmcdev->pmcs[PMC_IDX_SOC];
69883f168a1SRajvi Jingar 	int ret;
69983f168a1SRajvi Jingar 	int func = 0;
70083f168a1SRajvi Jingar 	bool ssram_init = true;
70183f168a1SRajvi Jingar 
70283f168a1SRajvi Jingar 	arl_d3_fixup();
70310ed9ee0SDavid E. Box 	pmcdev->suspend = cnl_suspend;
70483f168a1SRajvi Jingar 	pmcdev->resume = arl_resume;
70583f168a1SRajvi Jingar 	pmcdev->regmap_list = arl_pmc_info_list;
70683f168a1SRajvi Jingar 
70783f168a1SRajvi Jingar 	/*
70883f168a1SRajvi Jingar 	 * If ssram init fails use legacy method to at least get the
70983f168a1SRajvi Jingar 	 * primary PMC
71083f168a1SRajvi Jingar 	 */
71183f168a1SRajvi Jingar 	ret = pmc_core_ssram_init(pmcdev, func);
71283f168a1SRajvi Jingar 	if (ret) {
71383f168a1SRajvi Jingar 		ssram_init = false;
71483f168a1SRajvi Jingar 		pmc->map = &arl_socs_reg_map;
71583f168a1SRajvi Jingar 
71683f168a1SRajvi Jingar 		ret = get_primary_reg_base(pmc);
71783f168a1SRajvi Jingar 		if (ret)
71883f168a1SRajvi Jingar 			return ret;
71983f168a1SRajvi Jingar 	}
72083f168a1SRajvi Jingar 
72183f168a1SRajvi Jingar 	pmc_core_get_low_power_modes(pmcdev);
72283f168a1SRajvi Jingar 	pmc_core_punit_pmt_init(pmcdev, ARL_PMT_DMU_GUID);
72383f168a1SRajvi Jingar 
72483f168a1SRajvi Jingar 	if (ssram_init)	{
72583f168a1SRajvi Jingar 		ret = pmc_core_ssram_get_lpm_reqs(pmcdev);
72683f168a1SRajvi Jingar 		if (ret)
72783f168a1SRajvi Jingar 			return ret;
72883f168a1SRajvi Jingar 	}
72983f168a1SRajvi Jingar 
73083f168a1SRajvi Jingar 	return 0;
73183f168a1SRajvi Jingar }
732