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_PMC_H_
4 #define _SOC_PMC_H_
5 
6 /* PCI Configuration Space (D31:F2): PMC */
7 #define ABASE 0x40
8 #define ACTL 0x44
9 #define PWRM_EN (1 << 8)
10 #define ACPI_EN (1 << 7)
11 #define SCI_IRQ_SEL (7 << 0)
12 #define SCIS_IRQ9 0
13 #define SCIS_IRQ10 1
14 #define SCIS_IRQ11 2
15 #define SCIS_IRQ20 4
16 #define SCIS_IRQ21 5
17 #define SCIS_IRQ22 6
18 #define SCIS_IRQ23 7
19 #define PWRMBASE 0x48
20 #define GEN_PMCON_A 0xa0
21 #define DC_PP_DIS (1 << 30)
22 #define DSX_PP_DIS (1 << 29)
23 #define AG3_PP_EN (1 << 28)
24 #define SX_PP_EN (1 << 27)
25 #define DISB (1 << 23)
26 #define MEM_SR (1 << 21)
27 #define MS4V (1 << 18)
28 #define GBL_RST_STS (1 << 16)
29 #define ALLOW_ICLK_PLL_SD_INC0 (1 << 15)
30 #define MPHY_CRICLK_GATE_OVER (1 << 14)
31 #define ALLOW_OPI_PLL_SD_INC0 (1 << 13)
32 #define ALLOW_SPXB_CG_INC0 (1 << 12)
33 #define BIOS_PCI_EXP_EN (1 << 10)
34 #define PWRBTN_LVL (1 << 9)
35 #define ALLOW_L1LOW_C0 (1 << 7)
36 #define ALLOW_L1LOW_OPI_ON (1 << 6)
37 #define SMI_LOCK (1 << 4)
38 #define GEN_PMCON_B 0xa4
39 #define SLP_STR_POL_LOCK (1 << 18)
40 #define ACPI_BASE_LOCK (1 << 17)
41 #define SUS_PWR_FLR (1 << 14)
42 #define WOL_EN_OVRD (1 << 13)
43 #define DIS_SLP_X_STRCH_SUS_UP (1 << 12)
44 #define SLP_S3_MIN_ASST_WDTH_MASK (0x3 << 10)
45 #define SLP_S3_MIN_ASST_WDTH_60USEC (0 << 10)
46 #define SLP_S3_MIN_ASST_WDTH_1MS (1 << 10)
47 #define SLP_S3_MIN_ASST_WDTH_50MS (2 << 10)
48 #define SLP_S3_MIN_ASST_WDTH_2S (3 << 10)
49 #define HOST_RST_STS (1 << 9)
50 #define S4MAW_MASK (0x3 << 4)
51 #define S4MAW_1S (1 << 4)
52 #define S4MAW_2S (2 << 4)
53 #define S4MAW_3S (3 << 4)
54 #define S4MAW_4S (0 << 4)
55 #define S4ASE (1 << 3)
56 #define RTC_BATTERY_DEAD (1 << 2)
57 #define PWR_FLR (1 << 1)
58 #define SLEEP_AFTER_POWER_FAIL (1 << 0)
59 #define ETR3 0xac
60 #define ETR3_CF9LOCK (1 << 31)
61 #define ETR3_CF9GR (1 << 20)
62 #define SCI_IRQ_ADJUST 0
63 #define IRQ_REG ACTL
64 
65 /* Memory mapped IO registers in PMC */
66 #define S3_PWRGATE_POL 0x28
67 #define S3DC_GATE_SUS (1 << 1)
68 #define S3AC_GATE_SUS (1 << 0)
69 #define S4_PWRGATE_POL 0x2c
70 #define S4DC_GATE_SUS (1 << 1)
71 #define S4AC_GATE_SUS (1 << 0)
72 #define S5_PWRGATE_POL 0x30
73 #define S5DC_GATE_SUS (1 << 15)
74 #define S5AC_GATE_SUS (1 << 14)
75 #define DSX_CFG 0x34
76 #define DSX_CFG_MASK 0x7
77 #define DSX_EN_WAKE_PIN (1 << 2)
78 #define DSX_DIS_AC_PRESENT_PD (1 << 1)
79 #define DSX_EN_LAN_WAKE_PIN (1 << 0)
80 #define PMSYNC_TPR_CFG 0xc4
81 #define PMSYNC_LOCK (1 << 31)
82 #define PCH_PWRM_ACPI_TMR_CTL 0xfc
83 #define ACPI_TIM_DIS (1 << 1)
84 #define GPIO_GPE_CFG 0x120
85 #define GPE0_DWX_MASK 0xf
86 #define GPE0_DW_SHIFT(x) (4*(x))
87 #define GBLRST_CAUSE0 0x124
88 #define GBLRST_CAUSE1 0x128
89 #define SLP_S0_RES 0x13c
90 #define CPPMVRIC 0x31c
91 #define XTALSDQDIS (1 << 22)
92 #endif