coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmc.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#ifndef _SOC_TIGERLAKE_PMC_H_
4
#define _SOC_TIGERLAKE_PMC_H_
5
6
#include <
device/device.h
>
7
8
extern
struct
device_operations
pmc_ops
;
9
10
/* PCI Configuration Space (D31:F2): PMC */
11
#define PWRMBASE 0x10
12
#define ABASE 0x20
13
14
/* Memory mapped IO registers in PMC */
15
#define GEN_PMCON_A 0x1020
16
#define DC_PP_DIS (1 << 30)
17
#define DSX_PP_DIS (1 << 29)
18
#define AG3_PP_EN (1 << 28)
19
#define SX_PP_EN (1 << 27)
20
#define ALLOW_ICLK_PLL_SD_INC0 (1 << 26)
21
#define GBL_RST_STS (1 << 24)
22
#define DISB (1 << 23)
23
#define ALLOW_OPI_PLL_SD_INC0 (1 << 22)
24
#define MEM_SR (1 << 21)
25
#define ALLOW_SPXB_CG_INC0 (1 << 20)
26
#define ALLOW_L1LOW_C0 (1 << 19)
27
#define MS4V (1 << 18)
28
#define ALLOW_L1LOW_OPI_ON (1 << 17)
29
#define SUS_PWR_FLR (1 << 16)
30
#define PME_B0_S5_DIS (1 << 15)
31
#define PWR_FLR (1 << 14)
32
#define ALLOW_L1LOW_BCLKREQ_ON (1 << 13)
33
#define DIS_SLP_X_STRCH_SUS_UP (1 << 12)
34
#define SLP_S3_MIN_ASST_WDTH_MASK (3 << 10)
35
#define SLP_S3_MIN_ASST_WDTH_60USEC (0 << 10)
36
#define SLP_S3_MIN_ASST_WDTH_1MS (1 << 10)
37
#define SLP_S3_MIN_ASST_WDTH_50MS (2 << 10)
38
#define SLP_S3_MIN_ASST_WDTH_2S (3 << 10)
39
#define HOST_RST_STS (1 << 9)
40
#define ESPI_SMI_LOCK (1 << 8)
41
#define S4MAW_MASK (3 << 4)
42
#define S4MAW_1S (1 << 4)
43
#define S4MAW_2S (2 << 4)
44
#define S4MAW_3S (3 << 4)
45
#define S4MAW_4S (0 << 4)
46
#define S4ASE (1 << 3)
47
#define PER_SMI_SEL_MASK (3 << 1)
48
#define SMI_RATE_64S (0 << 1)
49
#define SMI_RATE_32S (1 << 1)
50
#define SMI_RATE_16S (2 << 1)
51
#define SMI_RATE_8S (3 << 1)
52
#define SLEEP_AFTER_POWER_FAIL (1 << 0)
53
54
#define GEN_PMCON_B 0x1024
55
#define SLP_STR_POL_LOCK (1 << 18)
56
#define ACPI_BASE_LOCK (1 << 17)
57
#define PM_DATA_BAR_DIS (1 << 16)
58
#define WOL_EN_OVRD (1 << 13)
59
#define BIOS_PCI_EXP_EN (1 << 10)
60
#define PWRBTN_LVL (1 << 9)
61
#define SMI_LOCK (1 << 4)
62
#define RTC_BATTERY_DEAD (1 << 2)
63
64
#define ETR 0x1048
65
#define CF9_LOCK (1 << 31)
66
#define CF9_GLB_RST (1 << 20)
67
68
#define SSML 0x104C
69
#define SSML_SSL_DS (0 << 0)
70
#define SSML_SSL_EN (1 << 0)
71
72
#define SSMC 0x1050
73
#define SSMC_SSMS (1 << 0)
74
75
#define SSMD 0x1054
76
#define SSMD_SSD_MASK (0xffff << 0)
77
78
#define PRSTS 0x1810
79
80
#define S3_PWRGATE_POL 0x1828
81
#define S3DC_GATE_SUS (1 << 1)
82
#define S3AC_GATE_SUS (1 << 0)
83
84
#define S4_PWRGATE_POL 0x182c
85
#define S4DC_GATE_SUS (1 << 1)
86
#define S4AC_GATE_SUS (1 << 0)
87
88
#define S5_PWRGATE_POL 0x1830
89
#define S5DC_GATE_SUS (1 << 15)
90
#define S5AC_GATE_SUS (1 << 14)
91
92
#define DSX_CFG 0x1834
93
#define REQ_CNV_NOWAKE_DSX (1 << 4)
94
#define REQ_BATLOW_DSX (1 << 3)
95
#define DSX_EN_WAKE_PIN (1 << 2)
96
#define DSX_DIS_AC_PRESENT_PD (1 << 1)
97
#define DSX_EN_LAN_WAKE_PIN (1 << 0)
98
#define DSX_CFG_MASK (0x1f << 0)
99
100
#define PMSYNC_TPR_CFG 0x18C4
101
#define PCH2CPU_TPR_CFG_LOCK (1 << 31)
102
#define PCH2CPU_TT_EN (1 << 26)
103
104
#define PCH_PWRM_ACPI_TMR_CTL 0x18FC
105
#define ACPI_TIM_DIS (1 << 1)
106
#define GPIO_GPE_CFG 0x1920
107
#define GPE0_DWX_MASK 0xf
108
#define GPE0_DW_SHIFT(x) (4*(x))
109
110
#if CONFIG(SOC_INTEL_TIGERLAKE_PCH_H)
111
#define PMC_GPD 0x0
112
#define PMC_GPP_A 0x1
113
#define PMC_GPP_R 0x2
114
#define PMC_GPP_B 0x3
115
#define PMC_GPP_D 0x4
116
#define PMC_GPP_C 0x5
117
#define PMC_GPP_S 0x6
118
#define PMC_GPP_G 0x7
119
#define PMC_GPP_E 0x9
120
#define PMC_GPP_F 0xA
121
#define PMC_GPP_H 0xB
122
#define PMC_GPP_J 0xC
123
#define PMC_GPP_K 0xD
124
#define PMC_GPP_I 0xE
125
#else
126
#define PMC_GPP_B 0x0
127
#define PMC_GPP_T 0x1
128
#define PMC_GPP_A 0x2
129
#define PMC_GPP_R 0x3
130
#define PMC_GPD 0x4
131
#define PMC_GPP_S 0x5
132
#define PMC_GPP_H 0x6
133
#define PMC_GPP_D 0x7
134
#define PMC_GPP_U 0x8
135
#define PMC_GPP_F 0xA
136
#define PMC_GPP_C 0xB
137
#define PMC_GPP_E 0xC
138
#endif
139
140
#define GBLRST_CAUSE0 0x1924
141
#define GBLRST_CAUSE0_THERMTRIP (1 << 5)
142
#define GBLRST_CAUSE1 0x1928
143
#define HPR_CAUSE0 0x192C
144
#define HPR_CAUSE0_MI_HRPD (1 << 10)
145
#define HPR_CAUSE0_MI_HRPC (1 << 9)
146
#define HPR_CAUSE0_MI_HR (1 << 8)
147
148
#define SLP_S0_RES 0x193c
149
150
#define CPPMVRIC 0x1B1C
151
#define XTALSDQDIS (1 << 22)
152
153
#define IRQ_REG ACTL
154
#define SCI_IRQ_ADJUST 0
155
#define ACTL 0x1BD8
156
#define PWRM_EN (1 << 8)
157
#define ACPI_EN (1 << 7)
158
#define SCI_IRQ_SEL (7 << 0)
159
160
#define SCIS_IRQ9 0
161
#define SCIS_IRQ10 1
162
#define SCIS_IRQ11 2
163
#define SCIS_IRQ20 4
164
#define SCIS_IRQ21 5
165
#define SCIS_IRQ22 6
166
#define SCIS_IRQ23 7
167
#endif
device.h
pmc_ops
struct device_operations pmc_ops
Definition:
pmc.c:190
device_operations
Definition:
device.h:38
src
soc
intel
tigerlake
include
soc
pmc.h
Generated by
1.9.1