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