Skip to content

Commit d2a7bd3

Browse files
xpardee-createjwrdegoede
authored andcommitted
platform/x86:intel/pmc: Add Meteor Lake IOE-M PMC related maps
Add device ID and register maps for the PMC in IO expansion die M in Meteor Lake. Signed-off-by: Xi Pardee <xi.pardee@intel.com> Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230613225347.2720665-9-rajvi.jingar@linux.intel.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 9f17728 commit d2a7bd3

File tree

2 files changed

+151
-0
lines changed

2 files changed

+151
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,12 @@ extern const struct pmc_bit_map mtl_ioep_vnn_req_status_3_map[];
478478
extern const struct pmc_bit_map mtl_ioep_vnn_misc_status_map[];
479479
extern const struct pmc_bit_map *mtl_ioep_lpm_maps[];
480480
extern const struct pmc_reg_map mtl_ioep_reg_map;
481+
extern const struct pmc_bit_map mtl_ioem_pfear_map[];
482+
extern const struct pmc_bit_map *ext_mtl_ioem_pfear_map[];
483+
extern const struct pmc_bit_map mtl_ioem_power_gating_status_1_map[];
484+
extern const struct pmc_bit_map mtl_ioem_vnn_req_status_1_map[];
485+
extern const struct pmc_bit_map *mtl_ioem_lpm_maps[];
486+
extern const struct pmc_reg_map mtl_ioem_reg_map;
481487

482488
extern void pmc_core_get_tgl_lpm_reqs(struct platform_device *pdev);
483489
extern int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value);

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

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,149 @@ const struct pmc_reg_map mtl_ioep_reg_map = {
784784
.ltr_ignore_max = ADL_NUM_IP_IGN_ALLOWED,
785785
};
786786

787+
const struct pmc_bit_map mtl_ioem_pfear_map[] = {
788+
{"PMC_0", BIT(0)},
789+
{"OPI", BIT(1)},
790+
{"TCSS", BIT(2)},
791+
{"RSVD3", BIT(3)},
792+
{"SPA", BIT(4)},
793+
{"SPB", BIT(5)},
794+
{"SPC", BIT(6)},
795+
{"IOE_D2D_3", BIT(7)},
796+
797+
{"RSVD8", BIT(0)},
798+
{"RSVD9", BIT(1)},
799+
{"SPE", BIT(2)},
800+
{"RSVD11", BIT(3)},
801+
{"RSVD12", BIT(4)},
802+
{"SPD", BIT(5)},
803+
{"ACE_7", BIT(6)},
804+
{"RSVD15", BIT(7)},
805+
806+
{"ACE_0", BIT(0)},
807+
{"FIACPCB_P", BIT(1)},
808+
{"P2S", BIT(2)},
809+
{"RSVD19", BIT(3)},
810+
{"ACE_8", BIT(4)},
811+
{"IOE_D2D_0", BIT(5)},
812+
{"FUSE", BIT(6)},
813+
{"RSVD23", BIT(7)},
814+
815+
{"FIACPCB_P5", BIT(0)},
816+
{"ACE_3", BIT(1)},
817+
{"RSF5", BIT(2)},
818+
{"ACE_2", BIT(3)},
819+
{"ACE_4", BIT(4)},
820+
{"RSVD29", BIT(5)},
821+
{"RSF10", BIT(6)},
822+
{"MPFPW5", BIT(7)},
823+
824+
{"PSF9", BIT(0)},
825+
{"MPFPW4", BIT(1)},
826+
{"RSVD34", BIT(2)},
827+
{"RSVD35", BIT(3)},
828+
{"RSVD36", BIT(4)},
829+
{"RSVD37", BIT(5)},
830+
{"RSVD38", BIT(6)},
831+
{"RSVD39", BIT(7)},
832+
833+
{"SBR0", BIT(0)},
834+
{"SBR1", BIT(1)},
835+
{"SBR2", BIT(2)},
836+
{"SBR3", BIT(3)},
837+
{"SBR4", BIT(4)},
838+
{"RSVD45", BIT(5)},
839+
{"RSVD46", BIT(6)},
840+
{"RSVD47", BIT(7)},
841+
842+
{"RSVD48", BIT(0)},
843+
{"FIA_P5", BIT(1)},
844+
{"RSVD50", BIT(2)},
845+
{"RSVD51", BIT(3)},
846+
{"RSVD52", BIT(4)},
847+
{"RSVD53", BIT(5)},
848+
{"RSVD54", BIT(6)},
849+
{"ACE_1", BIT(7)},
850+
851+
{"RSVD56", BIT(0)},
852+
{"ACE_5", BIT(1)},
853+
{"RSVD58", BIT(2)},
854+
{"G5FPW1", BIT(3)},
855+
{"RSVD60", BIT(4)},
856+
{"ACE_6", BIT(5)},
857+
{"RSVD62", BIT(6)},
858+
{"GBETSN1", BIT(7)},
859+
860+
{"RSVD64", BIT(0)},
861+
{"FIA", BIT(1)},
862+
{"RSVD66", BIT(2)},
863+
{"FIA_P", BIT(3)},
864+
{"TAM", BIT(4)},
865+
{"GBETSN", BIT(5)},
866+
{"IOE_D2D_2", BIT(6)},
867+
{"IOE_D2D_1", BIT(7)},
868+
869+
{"SPF", BIT(0)},
870+
{"PMC_1", BIT(1)},
871+
{}
872+
};
873+
874+
const struct pmc_bit_map *ext_mtl_ioem_pfear_map[] = {
875+
mtl_ioem_pfear_map,
876+
NULL
877+
};
878+
879+
const struct pmc_bit_map mtl_ioem_power_gating_status_1_map[] = {
880+
{"PSF9_PGD0_PG_STS", BIT(0)},
881+
{"MPFPW4_PGD0_PG_STS", BIT(1)},
882+
{"SBR0_PGD0_PG_STS", BIT(8)},
883+
{"SBR1_PGD0_PG_STS", BIT(9)},
884+
{"SBR2_PGD0_PG_STS", BIT(10)},
885+
{"SBR3_PGD0_PG_STS", BIT(11)},
886+
{"SBR4_PGD0_PG_STS", BIT(12)},
887+
{"FIA_P5_PGD0_PG_STS", BIT(17)},
888+
{"ACE_PGD1_PGD0_PG_STS", BIT(23)},
889+
{"ACE_PGD5_PGD1_PG_STS", BIT(25)},
890+
{"G5FPW1_PGD0_PG_STS", BIT(27)},
891+
{"ACE_PGD6_PG_STS", BIT(29)},
892+
{"GBETSN1_PGD0_PG_STS", BIT(31)},
893+
{}
894+
};
895+
896+
const struct pmc_bit_map *mtl_ioem_lpm_maps[] = {
897+
mtl_ioep_clocksource_status_map,
898+
mtl_ioep_power_gating_status_0_map,
899+
mtl_ioem_power_gating_status_1_map,
900+
mtl_ioep_power_gating_status_2_map,
901+
mtl_ioep_d3_status_0_map,
902+
mtl_ioep_d3_status_1_map,
903+
mtl_ioep_d3_status_2_map,
904+
mtl_ioep_d3_status_3_map,
905+
mtl_ioep_vnn_req_status_0_map,
906+
mtl_ioep_vnn_req_status_1_map,
907+
mtl_ioep_vnn_req_status_2_map,
908+
mtl_ioep_vnn_req_status_3_map,
909+
mtl_ioep_vnn_misc_status_map,
910+
mtl_socm_signal_status_map,
911+
NULL
912+
};
913+
914+
const struct pmc_reg_map mtl_ioem_reg_map = {
915+
.regmap_length = MTL_IOE_PMC_MMIO_REG_LEN,
916+
.pfear_sts = ext_mtl_ioem_pfear_map,
917+
.ppfear0_offset = CNP_PMC_HOST_PPFEAR0A,
918+
.ppfear_buckets = MTL_IOE_PPFEAR_NUM_ENTRIES,
919+
.lpm_status_offset = MTL_LPM_STATUS_OFFSET,
920+
.lpm_live_status_offset = MTL_LPM_LIVE_STATUS_OFFSET,
921+
.lpm_sts = mtl_ioem_lpm_maps,
922+
.ltr_show_sts = mtl_ioep_ltr_show_map,
923+
.ltr_ignore_offset = CNP_PMC_LTR_IGNORE_OFFSET,
924+
.ltr_ignore_max = ADL_NUM_IP_IGN_ALLOWED,
925+
};
926+
787927
#define PMC_DEVID_SOCM 0x7e7f
788928
#define PMC_DEVID_IOEP 0x7ecf
929+
#define PMC_DEVID_IOEM 0x7ebf
789930
static struct pmc_info mtl_pmc_info_list[] = {
790931
{
791932
.devid = PMC_DEVID_SOCM,
@@ -795,6 +936,10 @@ static struct pmc_info mtl_pmc_info_list[] = {
795936
.devid = PMC_DEVID_IOEP,
796937
.map = &mtl_ioep_reg_map,
797938
},
939+
{
940+
.devid = PMC_DEVID_IOEM,
941+
.map = &mtl_ioem_reg_map
942+
},
798943
{}
799944
};
800945

0 commit comments

Comments
 (0)