Software APIs
pwrmgr_regs.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief Generated register defines for pwrmgr
4 */
5
6// Copyright information found in source file:
7// Copyright lowRISC contributors (OpenTitan project).
8
9// Licensing information found in source file:
10// Licensed under the Apache License, Version 2.0, see LICENSE for details.
11// SPDX-License-Identifier: Apache-2.0
12
13#ifndef _PWRMGR_REG_DEFS_
14#define _PWRMGR_REG_DEFS_
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19// Number of wakeups
20#define PWRMGR_PARAM_NUM_WKUPS 8
21
22// Vector index for i3c0 rstdet_wkup_req, applies for WAKEUP_EN, WAKE_STATUS
23// and WAKE_INFO
24#define PWRMGR_PARAM_I3C0_RSTDET_WKUP_REQ_IDX 0
25
26// Vector index for i3c1 rstdet_wkup_req, applies for WAKEUP_EN, WAKE_STATUS
27// and WAKE_INFO
28#define PWRMGR_PARAM_I3C1_RSTDET_WKUP_REQ_IDX 1
29
30// Vector index for sysrst_ctrl wkup_req, applies for WAKEUP_EN, WAKE_STATUS
31// and WAKE_INFO
32#define PWRMGR_PARAM_SYSRST_CTRL_WKUP_REQ_IDX 2
33
34// Vector index for adc_ctrl wkup_req, applies for WAKEUP_EN, WAKE_STATUS and
35// WAKE_INFO
36#define PWRMGR_PARAM_ADC_CTRL_WKUP_REQ_IDX 3
37
38// Vector index for pinmux pin_wkup_req, applies for WAKEUP_EN, WAKE_STATUS
39// and WAKE_INFO
40#define PWRMGR_PARAM_PINMUX_PIN_WKUP_REQ_IDX 4
41
42// Vector index for pinmux usb_wkup_req, applies for WAKEUP_EN, WAKE_STATUS
43// and WAKE_INFO
44#define PWRMGR_PARAM_PINMUX_USB_WKUP_REQ_IDX 5
45
46// Vector index for aon_timer wkup_req, applies for WAKEUP_EN, WAKE_STATUS
47// and WAKE_INFO
48#define PWRMGR_PARAM_AON_TIMER_WKUP_REQ_IDX 6
49
50// Vector index for sensor_ctrl wkup_req, applies for WAKEUP_EN, WAKE_STATUS
51// and WAKE_INFO
52#define PWRMGR_PARAM_SENSOR_CTRL_WKUP_REQ_IDX 7
53
54// Number of peripheral reset requets
55#define PWRMGR_PARAM_NUM_RST_REQS 2
56
57// Number of pwrmgr internal reset requets
58#define PWRMGR_PARAM_NUM_INT_RST_REQS 2
59
60// Number of debug reset requets
61#define PWRMGR_PARAM_NUM_DEBUG_RST_REQS 1
62
63// Number of inputs from ROM_CTRL
64#define PWRMGR_PARAM_NUM_ROM_INPUTS 1
65
66// Reset req idx for MainPwr
67#define PWRMGR_PARAM_RESET_MAIN_PWR_IDX 2
68
69// Reset req idx for Esc
70#define PWRMGR_PARAM_RESET_ESC_IDX 3
71
72// Reset req idx for Ndm
73#define PWRMGR_PARAM_RESET_NDM_IDX 4
74
75// Number of alerts
76#define PWRMGR_PARAM_NUM_ALERTS 1
77
78// Register width
79#define PWRMGR_PARAM_REG_WIDTH 32
80
81// Common Interrupt Offsets
82#define PWRMGR_INTR_COMMON_WAKEUP_BIT 0
83
84// Interrupt State Register
85#define PWRMGR_INTR_STATE_REG_OFFSET 0x0
86#define PWRMGR_INTR_STATE_REG_RESVAL 0x0u
87#define PWRMGR_INTR_STATE_WAKEUP_BIT 0
88
89// Interrupt Enable Register
90#define PWRMGR_INTR_ENABLE_REG_OFFSET 0x4
91#define PWRMGR_INTR_ENABLE_REG_RESVAL 0x0u
92#define PWRMGR_INTR_ENABLE_WAKEUP_BIT 0
93
94// Interrupt Test Register
95#define PWRMGR_INTR_TEST_REG_OFFSET 0x8
96#define PWRMGR_INTR_TEST_REG_RESVAL 0x0u
97#define PWRMGR_INTR_TEST_WAKEUP_BIT 0
98
99// Alert Test Register
100#define PWRMGR_ALERT_TEST_REG_OFFSET 0xc
101#define PWRMGR_ALERT_TEST_REG_RESVAL 0x80000000u
102#define PWRMGR_ALERT_TEST_FATAL_FAULT_BIT 0
103#define PWRMGR_ALERT_TEST_REGWEN_BIT 31
104
105// Controls the configurability of the !!CONTROL register.
106#define PWRMGR_CTRL_CFG_REGWEN_REG_OFFSET 0x10
107#define PWRMGR_CTRL_CFG_REGWEN_REG_RESVAL 0x1u
108#define PWRMGR_CTRL_CFG_REGWEN_EN_BIT 0
109
110// Control register
111#define PWRMGR_CONTROL_REG_OFFSET 0x14
112#define PWRMGR_CONTROL_REG_RESVAL 0x180u
113#define PWRMGR_CONTROL_LOW_POWER_HINT_BIT 0
114#define PWRMGR_CONTROL_LOW_POWER_HINT_VALUE_NONE 0x0
115#define PWRMGR_CONTROL_LOW_POWER_HINT_VALUE_LOW_POWER 0x1
116#define PWRMGR_CONTROL_CORE_CLK_EN_BIT 4
117#define PWRMGR_CONTROL_CORE_CLK_EN_VALUE_DISABLED 0x0
118#define PWRMGR_CONTROL_CORE_CLK_EN_VALUE_ENABLED 0x1
119#define PWRMGR_CONTROL_IO_CLK_EN_BIT 5
120#define PWRMGR_CONTROL_IO_CLK_EN_VALUE_DISABLED 0x0
121#define PWRMGR_CONTROL_IO_CLK_EN_VALUE_ENABLED 0x1
122#define PWRMGR_CONTROL_USB_CLK_EN_LP_BIT 6
123#define PWRMGR_CONTROL_USB_CLK_EN_LP_VALUE_DISABLED 0x0
124#define PWRMGR_CONTROL_USB_CLK_EN_LP_VALUE_ENABLED 0x1
125#define PWRMGR_CONTROL_USB_CLK_EN_ACTIVE_BIT 7
126#define PWRMGR_CONTROL_USB_CLK_EN_ACTIVE_VALUE_DISABLED 0x0
127#define PWRMGR_CONTROL_USB_CLK_EN_ACTIVE_VALUE_ENABLED 0x1
128#define PWRMGR_CONTROL_MAIN_PD_N_BIT 8
129#define PWRMGR_CONTROL_MAIN_PD_N_VALUE_POWER_DOWN 0x0
130#define PWRMGR_CONTROL_MAIN_PD_N_VALUE_POWER_UP 0x1
131
132// The configuration registers CONTROL, WAKEUP_EN, RESET_EN are all written
133// in the
134#define PWRMGR_CFG_CDC_SYNC_REG_OFFSET 0x18
135#define PWRMGR_CFG_CDC_SYNC_REG_RESVAL 0x0u
136#define PWRMGR_CFG_CDC_SYNC_SYNC_BIT 0
137
138// Configuration enable for wakeup_en register
139#define PWRMGR_WAKEUP_EN_REGWEN_REG_OFFSET 0x1c
140#define PWRMGR_WAKEUP_EN_REGWEN_REG_RESVAL 0x1u
141#define PWRMGR_WAKEUP_EN_REGWEN_EN_BIT 0
142
143// Bit mask for enabled wakeups (common parameters)
144#define PWRMGR_WAKEUP_EN_EN_FIELD_WIDTH 1
145#define PWRMGR_WAKEUP_EN_MULTIREG_COUNT 1
146
147// Bit mask for enabled wakeups
148#define PWRMGR_WAKEUP_EN_REG_OFFSET 0x20
149#define PWRMGR_WAKEUP_EN_REG_RESVAL 0x0u
150#define PWRMGR_WAKEUP_EN_EN_0_BIT 0
151#define PWRMGR_WAKEUP_EN_EN_1_BIT 1
152#define PWRMGR_WAKEUP_EN_EN_2_BIT 2
153#define PWRMGR_WAKEUP_EN_EN_3_BIT 3
154#define PWRMGR_WAKEUP_EN_EN_4_BIT 4
155#define PWRMGR_WAKEUP_EN_EN_5_BIT 5
156#define PWRMGR_WAKEUP_EN_EN_6_BIT 6
157#define PWRMGR_WAKEUP_EN_EN_7_BIT 7
158
159// A read only register of all current wake requests post enable mask (common
160// parameters)
161#define PWRMGR_WAKE_STATUS_VAL_FIELD_WIDTH 1
162#define PWRMGR_WAKE_STATUS_MULTIREG_COUNT 1
163
164// A read only register of all current wake requests post enable mask
165#define PWRMGR_WAKE_STATUS_REG_OFFSET 0x24
166#define PWRMGR_WAKE_STATUS_REG_RESVAL 0x0u
167#define PWRMGR_WAKE_STATUS_VAL_0_BIT 0
168#define PWRMGR_WAKE_STATUS_VAL_1_BIT 1
169#define PWRMGR_WAKE_STATUS_VAL_2_BIT 2
170#define PWRMGR_WAKE_STATUS_VAL_3_BIT 3
171#define PWRMGR_WAKE_STATUS_VAL_4_BIT 4
172#define PWRMGR_WAKE_STATUS_VAL_5_BIT 5
173#define PWRMGR_WAKE_STATUS_VAL_6_BIT 6
174#define PWRMGR_WAKE_STATUS_VAL_7_BIT 7
175
176// Configuration enable for reset_en register
177#define PWRMGR_RESET_EN_REGWEN_REG_OFFSET 0x28
178#define PWRMGR_RESET_EN_REGWEN_REG_RESVAL 0x1u
179#define PWRMGR_RESET_EN_REGWEN_EN_BIT 0
180
181// Bit mask for enabled reset requests
182#define PWRMGR_RESET_EN_REG_OFFSET 0x2c
183#define PWRMGR_RESET_EN_REG_RESVAL 0x0u
184#define PWRMGR_RESET_EN_EN_0_BIT 0
185#define PWRMGR_RESET_EN_EN_1_BIT 1
186
187// A read only register of all current reset requests post enable mask
188// (common parameters)
189#define PWRMGR_RESET_STATUS_VAL_FIELD_WIDTH 1
190#define PWRMGR_RESET_STATUS_MULTIREG_COUNT 1
191
192// A read only register of all current reset requests post enable mask
193#define PWRMGR_RESET_STATUS_REG_OFFSET 0x30
194#define PWRMGR_RESET_STATUS_REG_RESVAL 0x0u
195#define PWRMGR_RESET_STATUS_VAL_0_BIT 0
196#define PWRMGR_RESET_STATUS_VAL_1_BIT 1
197
198// A read only register of escalation reset request
199#define PWRMGR_ESCALATE_RESET_STATUS_REG_OFFSET 0x34
200#define PWRMGR_ESCALATE_RESET_STATUS_REG_RESVAL 0x0u
201#define PWRMGR_ESCALATE_RESET_STATUS_VAL_BIT 0
202
203// Indicates which functions caused the chip to wakeup
204#define PWRMGR_WAKE_INFO_CAPTURE_DIS_REG_OFFSET 0x38
205#define PWRMGR_WAKE_INFO_CAPTURE_DIS_REG_RESVAL 0x0u
206#define PWRMGR_WAKE_INFO_CAPTURE_DIS_VAL_BIT 0
207
208// Indicates which functions caused the chip to wakeup.
209#define PWRMGR_WAKE_INFO_REG_OFFSET 0x3c
210#define PWRMGR_WAKE_INFO_REG_RESVAL 0x0u
211#define PWRMGR_WAKE_INFO_REASONS_MASK 0xffu
212#define PWRMGR_WAKE_INFO_REASONS_OFFSET 0
213#define PWRMGR_WAKE_INFO_REASONS_FIELD \
214 ((bitfield_field32_t) { .mask = PWRMGR_WAKE_INFO_REASONS_MASK, .index = PWRMGR_WAKE_INFO_REASONS_OFFSET })
215#define PWRMGR_WAKE_INFO_FALL_THROUGH_BIT 8
216#define PWRMGR_WAKE_INFO_ABORT_BIT 9
217
218// A read only register that shows the existing faults
219#define PWRMGR_FAULT_STATUS_REG_OFFSET 0x40
220#define PWRMGR_FAULT_STATUS_REG_RESVAL 0x0u
221#define PWRMGR_FAULT_STATUS_REG_INTG_ERR_BIT 0
222#define PWRMGR_FAULT_STATUS_ESC_TIMEOUT_BIT 1
223#define PWRMGR_FAULT_STATUS_MAIN_PD_GLITCH_BIT 2
224
225#ifdef __cplusplus
226} // extern "C"
227#endif
228#endif // _PWRMGR_REG_DEFS_
229// End generated register defines for pwrmgr