162306a36Sopenharmony_ci/* SPDX-License-Identifier: MIT */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright © 2022 Intel Corporation 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#ifndef __INTEL_MCHBAR_REGS__ 762306a36Sopenharmony_ci#define __INTEL_MCHBAR_REGS__ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include "i915_reg_defs.h" 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* 1262306a36Sopenharmony_ci * MCHBAR mirror. 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * This mirrors the MCHBAR MMIO space whose location is determined by 1562306a36Sopenharmony_ci * device 0 function 0's pci config register 0x44 or 0x48 and matches it in 1662306a36Sopenharmony_ci * every way. It is not accessible from the CP register read instructions. 1762306a36Sopenharmony_ci * 1862306a36Sopenharmony_ci * Starting from Haswell, you can't write registers using the MCHBAR mirror, 1962306a36Sopenharmony_ci * just read. 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci#define MCHBAR_MIRROR_BASE 0x10000 2362306a36Sopenharmony_ci#define MCHBAR_MIRROR_BASE_SNB 0x140000 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define CTG_STOLEN_RESERVED _MMIO(MCHBAR_MIRROR_BASE + 0x34) 2662306a36Sopenharmony_ci#define ELK_STOLEN_RESERVED _MMIO(MCHBAR_MIRROR_BASE + 0x48) 2762306a36Sopenharmony_ci#define G4X_STOLEN_RESERVED_ADDR1_MASK (0xFFFF << 16) 2862306a36Sopenharmony_ci#define G4X_STOLEN_RESERVED_ADDR2_MASK (0xFFF << 4) 2962306a36Sopenharmony_ci#define G4X_STOLEN_RESERVED_ENABLE (1 << 0) 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci/* Pineview MCH register contains DDR3 setting */ 3262306a36Sopenharmony_ci#define CSHRDDR3CTL _MMIO(MCHBAR_MIRROR_BASE + 0x1a8) 3362306a36Sopenharmony_ci#define CSHRDDR3CTL_DDR3 (1 << 2) 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci/* 915-945 and GM965 MCH register controlling DRAM channel access */ 3662306a36Sopenharmony_ci#define DCC _MMIO(MCHBAR_MIRROR_BASE + 0x200) 3762306a36Sopenharmony_ci#define DCC_ADDRESSING_MODE_SINGLE_CHANNEL (0 << 0) 3862306a36Sopenharmony_ci#define DCC_ADDRESSING_MODE_DUAL_CHANNEL_ASYMMETRIC (1 << 0) 3962306a36Sopenharmony_ci#define DCC_ADDRESSING_MODE_DUAL_CHANNEL_INTERLEAVED (2 << 0) 4062306a36Sopenharmony_ci#define DCC_ADDRESSING_MODE_MASK (3 << 0) 4162306a36Sopenharmony_ci#define DCC_CHANNEL_XOR_DISABLE (1 << 10) 4262306a36Sopenharmony_ci#define DCC_CHANNEL_XOR_BIT_17 (1 << 9) 4362306a36Sopenharmony_ci#define DCC2 _MMIO(MCHBAR_MIRROR_BASE + 0x204) 4462306a36Sopenharmony_ci#define DCC2_MODIFIED_ENHANCED_DISABLE (1 << 20) 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci/* 965 MCH register controlling DRAM channel configuration */ 4762306a36Sopenharmony_ci#define C0DRB3_BW _MMIO(MCHBAR_MIRROR_BASE + 0x206) 4862306a36Sopenharmony_ci#define C1DRB3_BW _MMIO(MCHBAR_MIRROR_BASE + 0x606) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci/* Clocking configuration register */ 5162306a36Sopenharmony_ci#define CLKCFG _MMIO(MCHBAR_MIRROR_BASE + 0xc00) 5262306a36Sopenharmony_ci#define CLKCFG_FSB_400 (0 << 0) /* hrawclk 100 */ 5362306a36Sopenharmony_ci#define CLKCFG_FSB_400_ALT (5 << 0) /* hrawclk 100 */ 5462306a36Sopenharmony_ci#define CLKCFG_FSB_533 (1 << 0) /* hrawclk 133 */ 5562306a36Sopenharmony_ci#define CLKCFG_FSB_667 (3 << 0) /* hrawclk 166 */ 5662306a36Sopenharmony_ci#define CLKCFG_FSB_800 (2 << 0) /* hrawclk 200 */ 5762306a36Sopenharmony_ci#define CLKCFG_FSB_1067 (6 << 0) /* hrawclk 266 */ 5862306a36Sopenharmony_ci#define CLKCFG_FSB_1067_ALT (0 << 0) /* hrawclk 266 */ 5962306a36Sopenharmony_ci#define CLKCFG_FSB_1333 (7 << 0) /* hrawclk 333 */ 6062306a36Sopenharmony_ci#define CLKCFG_FSB_1333_ALT (4 << 0) /* hrawclk 333 */ 6162306a36Sopenharmony_ci#define CLKCFG_FSB_1600_ALT (6 << 0) /* hrawclk 400 */ 6262306a36Sopenharmony_ci#define CLKCFG_FSB_MASK (7 << 0) 6362306a36Sopenharmony_ci#define CLKCFG_MEM_533 (1 << 4) 6462306a36Sopenharmony_ci#define CLKCFG_MEM_667 (2 << 4) 6562306a36Sopenharmony_ci#define CLKCFG_MEM_800 (3 << 4) 6662306a36Sopenharmony_ci#define CLKCFG_MEM_MASK (7 << 4) 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci#define HPLLVCO_MOBILE _MMIO(MCHBAR_MIRROR_BASE + 0xc0f) 6962306a36Sopenharmony_ci#define HPLLVCO _MMIO(MCHBAR_MIRROR_BASE + 0xc38) 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci#define TSC1 _MMIO(MCHBAR_MIRROR_BASE + 0x1001) 7262306a36Sopenharmony_ci#define TSE (1 << 0) 7362306a36Sopenharmony_ci#define TR1 _MMIO(MCHBAR_MIRROR_BASE + 0x1006) 7462306a36Sopenharmony_ci#define TSFS _MMIO(MCHBAR_MIRROR_BASE + 0x1020) 7562306a36Sopenharmony_ci#define TSFS_SLOPE_MASK 0x0000ff00 7662306a36Sopenharmony_ci#define TSFS_SLOPE_SHIFT 8 7762306a36Sopenharmony_ci#define TSFS_INTR_MASK 0x000000ff 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci/* Memory latency timer register */ 8062306a36Sopenharmony_ci#define MLTR_ILK _MMIO(MCHBAR_MIRROR_BASE + 0x1222) 8162306a36Sopenharmony_ci/* the unit of memory self-refresh latency time is 0.5us */ 8262306a36Sopenharmony_ci#define MLTR_WM2_MASK REG_GENMASK(13, 8) 8362306a36Sopenharmony_ci#define MLTR_WM1_MASK REG_GENMASK(5, 0) 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci#define CSIPLL0 _MMIO(MCHBAR_MIRROR_BASE + 0x2c10) 8662306a36Sopenharmony_ci#define DDRMPLL1 _MMIO(MCHBAR_MIRROR_BASE + 0x2c20) 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#define ILK_GDSR _MMIO(MCHBAR_MIRROR_BASE + 0x2ca4) 8962306a36Sopenharmony_ci#define ILK_GRDOM_FULL (0 << 1) 9062306a36Sopenharmony_ci#define ILK_GRDOM_RENDER (1 << 1) 9162306a36Sopenharmony_ci#define ILK_GRDOM_MEDIA (3 << 1) 9262306a36Sopenharmony_ci#define ILK_GRDOM_MASK (3 << 1) 9362306a36Sopenharmony_ci#define ILK_GRDOM_RESET_ENABLE (1 << 0) 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci#define BXT_D_CR_DRP0_DUNIT8 0x1000 9662306a36Sopenharmony_ci#define BXT_D_CR_DRP0_DUNIT9 0x1200 9762306a36Sopenharmony_ci#define BXT_D_CR_DRP0_DUNIT_START 8 9862306a36Sopenharmony_ci#define BXT_D_CR_DRP0_DUNIT_END 11 9962306a36Sopenharmony_ci#define BXT_D_CR_DRP0_DUNIT(x) _MMIO(MCHBAR_MIRROR_BASE_SNB + \ 10062306a36Sopenharmony_ci _PICK_EVEN((x) - 8, BXT_D_CR_DRP0_DUNIT8,\ 10162306a36Sopenharmony_ci BXT_D_CR_DRP0_DUNIT9)) 10262306a36Sopenharmony_ci#define BXT_DRAM_RANK_MASK 0x3 10362306a36Sopenharmony_ci#define BXT_DRAM_RANK_SINGLE 0x1 10462306a36Sopenharmony_ci#define BXT_DRAM_RANK_DUAL 0x3 10562306a36Sopenharmony_ci#define BXT_DRAM_WIDTH_MASK (0x3 << 4) 10662306a36Sopenharmony_ci#define BXT_DRAM_WIDTH_SHIFT 4 10762306a36Sopenharmony_ci#define BXT_DRAM_WIDTH_X8 (0x0 << 4) 10862306a36Sopenharmony_ci#define BXT_DRAM_WIDTH_X16 (0x1 << 4) 10962306a36Sopenharmony_ci#define BXT_DRAM_WIDTH_X32 (0x2 << 4) 11062306a36Sopenharmony_ci#define BXT_DRAM_WIDTH_X64 (0x3 << 4) 11162306a36Sopenharmony_ci#define BXT_DRAM_SIZE_MASK (0x7 << 6) 11262306a36Sopenharmony_ci#define BXT_DRAM_SIZE_SHIFT 6 11362306a36Sopenharmony_ci#define BXT_DRAM_SIZE_4GBIT (0x0 << 6) 11462306a36Sopenharmony_ci#define BXT_DRAM_SIZE_6GBIT (0x1 << 6) 11562306a36Sopenharmony_ci#define BXT_DRAM_SIZE_8GBIT (0x2 << 6) 11662306a36Sopenharmony_ci#define BXT_DRAM_SIZE_12GBIT (0x3 << 6) 11762306a36Sopenharmony_ci#define BXT_DRAM_SIZE_16GBIT (0x4 << 6) 11862306a36Sopenharmony_ci#define BXT_DRAM_TYPE_MASK (0x7 << 22) 11962306a36Sopenharmony_ci#define BXT_DRAM_TYPE_SHIFT 22 12062306a36Sopenharmony_ci#define BXT_DRAM_TYPE_DDR3 (0x0 << 22) 12162306a36Sopenharmony_ci#define BXT_DRAM_TYPE_LPDDR3 (0x1 << 22) 12262306a36Sopenharmony_ci#define BXT_DRAM_TYPE_LPDDR4 (0x2 << 22) 12362306a36Sopenharmony_ci#define BXT_DRAM_TYPE_DDR4 (0x4 << 22) 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ci#define MCHBAR_CH0_CR_TC_PRE_0_0_0_MCHBAR _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x4000) 12662306a36Sopenharmony_ci#define DG1_DRAM_T_RDPRE_MASK REG_GENMASK(16, 11) 12762306a36Sopenharmony_ci#define DG1_DRAM_T_RP_MASK REG_GENMASK(6, 0) 12862306a36Sopenharmony_ci#define MCHBAR_CH0_CR_TC_PRE_0_0_0_MCHBAR_HIGH _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x4004) 12962306a36Sopenharmony_ci#define DG1_DRAM_T_RCD_MASK REG_GENMASK(15, 9) 13062306a36Sopenharmony_ci#define DG1_DRAM_T_RAS_MASK REG_GENMASK(8, 1) 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ci#define SKL_MAD_INTER_CHANNEL_0_0_0_MCHBAR_MCMAIN _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5000) 13362306a36Sopenharmony_ci#define SKL_DRAM_DDR_TYPE_MASK (0x3 << 0) 13462306a36Sopenharmony_ci#define SKL_DRAM_DDR_TYPE_DDR4 (0 << 0) 13562306a36Sopenharmony_ci#define SKL_DRAM_DDR_TYPE_DDR3 (1 << 0) 13662306a36Sopenharmony_ci#define SKL_DRAM_DDR_TYPE_LPDDR3 (2 << 0) 13762306a36Sopenharmony_ci#define SKL_DRAM_DDR_TYPE_LPDDR4 (3 << 0) 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci/* snb MCH registers for reading the DRAM channel configuration */ 14062306a36Sopenharmony_ci#define MAD_DIMM_C0 _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5004) 14162306a36Sopenharmony_ci#define MAD_DIMM_C1 _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5008) 14262306a36Sopenharmony_ci#define MAD_DIMM_C2 _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x500C) 14362306a36Sopenharmony_ci#define MAD_DIMM_ECC_MASK (0x3 << 24) 14462306a36Sopenharmony_ci#define MAD_DIMM_ECC_OFF (0x0 << 24) 14562306a36Sopenharmony_ci#define MAD_DIMM_ECC_IO_ON_LOGIC_OFF (0x1 << 24) 14662306a36Sopenharmony_ci#define MAD_DIMM_ECC_IO_OFF_LOGIC_ON (0x2 << 24) 14762306a36Sopenharmony_ci#define MAD_DIMM_ECC_ON (0x3 << 24) 14862306a36Sopenharmony_ci#define MAD_DIMM_ENH_INTERLEAVE (0x1 << 22) 14962306a36Sopenharmony_ci#define MAD_DIMM_RANK_INTERLEAVE (0x1 << 21) 15062306a36Sopenharmony_ci#define MAD_DIMM_B_WIDTH_X16 (0x1 << 20) /* X8 chips if unset */ 15162306a36Sopenharmony_ci#define MAD_DIMM_A_WIDTH_X16 (0x1 << 19) /* X8 chips if unset */ 15262306a36Sopenharmony_ci#define MAD_DIMM_B_DUAL_RANK (0x1 << 18) 15362306a36Sopenharmony_ci#define MAD_DIMM_A_DUAL_RANK (0x1 << 17) 15462306a36Sopenharmony_ci#define MAD_DIMM_A_SELECT (0x1 << 16) 15562306a36Sopenharmony_ci/* DIMM sizes are in multiples of 256mb. */ 15662306a36Sopenharmony_ci#define MAD_DIMM_B_SIZE_SHIFT 8 15762306a36Sopenharmony_ci#define MAD_DIMM_B_SIZE_MASK (0xff << MAD_DIMM_B_SIZE_SHIFT) 15862306a36Sopenharmony_ci#define MAD_DIMM_A_SIZE_SHIFT 0 15962306a36Sopenharmony_ci#define MAD_DIMM_A_SIZE_MASK (0xff << MAD_DIMM_A_SIZE_SHIFT) 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci#define SKL_MAD_DIMM_CH0_0_0_0_MCHBAR_MCMAIN _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x500C) 16262306a36Sopenharmony_ci#define SKL_MAD_DIMM_CH1_0_0_0_MCHBAR_MCMAIN _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5010) 16362306a36Sopenharmony_ci#define SKL_DRAM_S_SHIFT 16 16462306a36Sopenharmony_ci#define SKL_DRAM_SIZE_MASK 0x3F 16562306a36Sopenharmony_ci#define SKL_DRAM_WIDTH_MASK (0x3 << 8) 16662306a36Sopenharmony_ci#define SKL_DRAM_WIDTH_SHIFT 8 16762306a36Sopenharmony_ci#define SKL_DRAM_WIDTH_X8 (0x0 << 8) 16862306a36Sopenharmony_ci#define SKL_DRAM_WIDTH_X16 (0x1 << 8) 16962306a36Sopenharmony_ci#define SKL_DRAM_WIDTH_X32 (0x2 << 8) 17062306a36Sopenharmony_ci#define SKL_DRAM_RANK_MASK (0x1 << 10) 17162306a36Sopenharmony_ci#define SKL_DRAM_RANK_SHIFT 10 17262306a36Sopenharmony_ci#define SKL_DRAM_RANK_1 (0x0 << 10) 17362306a36Sopenharmony_ci#define SKL_DRAM_RANK_2 (0x1 << 10) 17462306a36Sopenharmony_ci#define SKL_DRAM_RANK_MASK (0x1 << 10) 17562306a36Sopenharmony_ci#define ICL_DRAM_SIZE_MASK 0x7F 17662306a36Sopenharmony_ci#define ICL_DRAM_WIDTH_MASK (0x3 << 7) 17762306a36Sopenharmony_ci#define ICL_DRAM_WIDTH_SHIFT 7 17862306a36Sopenharmony_ci#define ICL_DRAM_WIDTH_X8 (0x0 << 7) 17962306a36Sopenharmony_ci#define ICL_DRAM_WIDTH_X16 (0x1 << 7) 18062306a36Sopenharmony_ci#define ICL_DRAM_WIDTH_X32 (0x2 << 7) 18162306a36Sopenharmony_ci#define ICL_DRAM_RANK_MASK (0x3 << 9) 18262306a36Sopenharmony_ci#define ICL_DRAM_RANK_SHIFT 9 18362306a36Sopenharmony_ci#define ICL_DRAM_RANK_1 (0x0 << 9) 18462306a36Sopenharmony_ci#define ICL_DRAM_RANK_2 (0x1 << 9) 18562306a36Sopenharmony_ci#define ICL_DRAM_RANK_3 (0x2 << 9) 18662306a36Sopenharmony_ci#define ICL_DRAM_RANK_4 (0x3 << 9) 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ci#define SA_PERF_STATUS_0_0_0_MCHBAR_PC _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5918) 18962306a36Sopenharmony_ci#define DG1_QCLK_RATIO_MASK REG_GENMASK(9, 2) 19062306a36Sopenharmony_ci#define DG1_QCLK_REFERENCE REG_BIT(10) 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci/* 19362306a36Sopenharmony_ci * *_PACKAGE_POWER_SKU - SKU power and timing parameters. 19462306a36Sopenharmony_ci */ 19562306a36Sopenharmony_ci#define PCU_PACKAGE_POWER_SKU _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5930) 19662306a36Sopenharmony_ci#define PKG_PKG_TDP GENMASK_ULL(14, 0) 19762306a36Sopenharmony_ci#define PKG_MIN_PWR GENMASK_ULL(30, 16) 19862306a36Sopenharmony_ci#define PKG_MAX_PWR GENMASK_ULL(46, 32) 19962306a36Sopenharmony_ci#define PKG_MAX_WIN GENMASK_ULL(54, 48) 20062306a36Sopenharmony_ci#define PKG_MAX_WIN_X GENMASK_ULL(54, 53) 20162306a36Sopenharmony_ci#define PKG_MAX_WIN_Y GENMASK_ULL(52, 48) 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci#define PCU_PACKAGE_POWER_SKU_UNIT _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5938) 20462306a36Sopenharmony_ci#define PKG_PWR_UNIT REG_GENMASK(3, 0) 20562306a36Sopenharmony_ci#define PKG_ENERGY_UNIT REG_GENMASK(12, 8) 20662306a36Sopenharmony_ci#define PKG_TIME_UNIT REG_GENMASK(19, 16) 20762306a36Sopenharmony_ci#define PCU_PACKAGE_ENERGY_STATUS _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x593c) 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ci#define GEN6_GT_PERF_STATUS _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5948) 21062306a36Sopenharmony_ci#define GEN6_RP_STATE_LIMITS _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5994) 21162306a36Sopenharmony_ci#define GEN6_RP_STATE_CAP _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5998) 21262306a36Sopenharmony_ci#define RP0_CAP_MASK REG_GENMASK(7, 0) 21362306a36Sopenharmony_ci#define RP1_CAP_MASK REG_GENMASK(15, 8) 21462306a36Sopenharmony_ci#define RPN_CAP_MASK REG_GENMASK(23, 16) 21562306a36Sopenharmony_ci 21662306a36Sopenharmony_ci#define GEN10_FREQ_INFO_REC _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5ef0) 21762306a36Sopenharmony_ci#define RPE_MASK REG_GENMASK(15, 8) 21862306a36Sopenharmony_ci#define PCU_PACKAGE_RAPL_LIMIT _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x59a0) 21962306a36Sopenharmony_ci#define PKG_PWR_LIM_1 REG_GENMASK(14, 0) 22062306a36Sopenharmony_ci#define PKG_PWR_LIM_1_EN REG_BIT(15) 22162306a36Sopenharmony_ci#define PKG_PWR_LIM_1_TIME REG_GENMASK(23, 17) 22262306a36Sopenharmony_ci#define PKG_PWR_LIM_1_TIME_X REG_GENMASK(23, 22) 22362306a36Sopenharmony_ci#define PKG_PWR_LIM_1_TIME_Y REG_GENMASK(21, 17) 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_ci/* snb MCH registers for priority tuning */ 22662306a36Sopenharmony_ci#define MCH_SSKPD _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5d10) 22762306a36Sopenharmony_ci#define SSKPD_NEW_WM0_MASK_HSW REG_GENMASK64(63, 56) 22862306a36Sopenharmony_ci#define SSKPD_WM4_MASK_HSW REG_GENMASK64(40, 32) 22962306a36Sopenharmony_ci#define SSKPD_WM3_MASK_HSW REG_GENMASK64(28, 20) 23062306a36Sopenharmony_ci#define SSKPD_WM2_MASK_HSW REG_GENMASK64(19, 12) 23162306a36Sopenharmony_ci#define SSKPD_WM1_MASK_HSW REG_GENMASK64(11, 4) 23262306a36Sopenharmony_ci#define SSKPD_OLD_WM0_MASK_HSW REG_GENMASK64(3, 0) 23362306a36Sopenharmony_ci#define SSKPD_WM3_MASK_SNB REG_GENMASK(29, 24) 23462306a36Sopenharmony_ci#define SSKPD_WM2_MASK_SNB REG_GENMASK(21, 16) 23562306a36Sopenharmony_ci#define SSKPD_WM1_MASK_SNB REG_GENMASK(13, 8) 23662306a36Sopenharmony_ci#define SSKPD_WM0_MASK_SNB REG_GENMASK(5, 0) 23762306a36Sopenharmony_ci 23862306a36Sopenharmony_ci/* Memory controller frequency in MCHBAR for Haswell (possible SNB+) */ 23962306a36Sopenharmony_ci#define DCLK _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5e04) 24062306a36Sopenharmony_ci#define SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5e04) 24162306a36Sopenharmony_ci#define DG1_GEAR_TYPE REG_BIT(16) 24262306a36Sopenharmony_ci 24362306a36Sopenharmony_ci/* 24462306a36Sopenharmony_ci * Please see hsw_read_dcomp() and hsw_write_dcomp() before using this register, 24562306a36Sopenharmony_ci * since on HSW we can't write to it using intel_uncore_write. 24662306a36Sopenharmony_ci */ 24762306a36Sopenharmony_ci#define D_COMP_HSW _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5f0c) 24862306a36Sopenharmony_ci#define D_COMP_RCOMP_IN_PROGRESS (1 << 9) 24962306a36Sopenharmony_ci#define D_COMP_COMP_FORCE (1 << 8) 25062306a36Sopenharmony_ci#define D_COMP_COMP_DISABLE (1 << 0) 25162306a36Sopenharmony_ci 25262306a36Sopenharmony_ci#define BXT_GT_PERF_STATUS _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x7070) 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_ci#endif /* __INTEL_MCHBAR_REGS */ 255