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