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 pin_wkup_req, applies for WAKEUP_EN, WAKE_STATUS
23// and WAKE_INFO
24#define PWRMGR_PARAM_PINMUX_PIN_WKUP_REQ_IDX 0
25
26// Vector index for pinmux usb_wkup_req, applies for WAKEUP_EN, WAKE_STATUS
27// and WAKE_INFO
28#define PWRMGR_PARAM_PINMUX_USB_WKUP_REQ_IDX 1
29
30// Vector index for aon_timer wkup_req, applies for WAKEUP_EN, WAKE_STATUS
31// and WAKE_INFO
32#define PWRMGR_PARAM_AON_TIMER_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 0x80000000u
82#define PWRMGR_ALERT_TEST_FATAL_FAULT_BIT 0
83#define PWRMGR_ALERT_TEST_REGWEN_BIT 31
84
85// Controls the configurability of the !!CONTROL register.
86#define PWRMGR_CTRL_CFG_REGWEN_REG_OFFSET 0x10
87#define PWRMGR_CTRL_CFG_REGWEN_REG_RESVAL 0x1u
88#define PWRMGR_CTRL_CFG_REGWEN_EN_BIT 0
89
90// Control register
91#define PWRMGR_CONTROL_REG_OFFSET 0x14
92#define PWRMGR_CONTROL_REG_RESVAL 0x180u
93#define PWRMGR_CONTROL_LOW_POWER_HINT_BIT 0
94#define PWRMGR_CONTROL_LOW_POWER_HINT_VALUE_NONE 0x0
95#define PWRMGR_CONTROL_LOW_POWER_HINT_VALUE_LOW_POWER 0x1
96#define PWRMGR_CONTROL_CORE_CLK_EN_BIT 4
97#define PWRMGR_CONTROL_CORE_CLK_EN_VALUE_DISABLED 0x0
98#define PWRMGR_CONTROL_CORE_CLK_EN_VALUE_ENABLED 0x1
99#define PWRMGR_CONTROL_IO_CLK_EN_BIT 5
100#define PWRMGR_CONTROL_IO_CLK_EN_VALUE_DISABLED 0x0
101#define PWRMGR_CONTROL_IO_CLK_EN_VALUE_ENABLED 0x1
102#define PWRMGR_CONTROL_USB_CLK_EN_LP_BIT 6
103#define PWRMGR_CONTROL_USB_CLK_EN_LP_VALUE_DISABLED 0x0
104#define PWRMGR_CONTROL_USB_CLK_EN_LP_VALUE_ENABLED 0x1
105#define PWRMGR_CONTROL_USB_CLK_EN_ACTIVE_BIT 7
106#define PWRMGR_CONTROL_USB_CLK_EN_ACTIVE_VALUE_DISABLED 0x0
107#define PWRMGR_CONTROL_USB_CLK_EN_ACTIVE_VALUE_ENABLED 0x1
108#define PWRMGR_CONTROL_MAIN_PD_N_BIT 8
109#define PWRMGR_CONTROL_MAIN_PD_N_VALUE_POWER_DOWN 0x0
110#define PWRMGR_CONTROL_MAIN_PD_N_VALUE_POWER_UP 0x1
111
112// The configuration registers CONTROL, WAKEUP_EN, RESET_EN are all written
113// in the
114#define PWRMGR_CFG_CDC_SYNC_REG_OFFSET 0x18
115#define PWRMGR_CFG_CDC_SYNC_REG_RESVAL 0x0u
116#define PWRMGR_CFG_CDC_SYNC_SYNC_BIT 0
117
118// Configuration enable for wakeup_en register
119#define PWRMGR_WAKEUP_EN_REGWEN_REG_OFFSET 0x1c
120#define PWRMGR_WAKEUP_EN_REGWEN_REG_RESVAL 0x1u
121#define PWRMGR_WAKEUP_EN_REGWEN_EN_BIT 0
122
123// Bit mask for enabled wakeups (common parameters)
124#define PWRMGR_WAKEUP_EN_EN_FIELD_WIDTH 1
125#define PWRMGR_WAKEUP_EN_MULTIREG_COUNT 1
126
127// Bit mask for enabled wakeups
128#define PWRMGR_WAKEUP_EN_REG_OFFSET 0x20
129#define PWRMGR_WAKEUP_EN_REG_RESVAL 0x0u
130#define PWRMGR_WAKEUP_EN_EN_0_BIT 0
131#define PWRMGR_WAKEUP_EN_EN_1_BIT 1
132#define PWRMGR_WAKEUP_EN_EN_2_BIT 2
133
134// A read only register of all current wake requests post enable mask (common
135// parameters)
136#define PWRMGR_WAKE_STATUS_VAL_FIELD_WIDTH 1
137#define PWRMGR_WAKE_STATUS_MULTIREG_COUNT 1
138
139// A read only register of all current wake requests post enable mask
140#define PWRMGR_WAKE_STATUS_REG_OFFSET 0x24
141#define PWRMGR_WAKE_STATUS_REG_RESVAL 0x0u
142#define PWRMGR_WAKE_STATUS_VAL_0_BIT 0
143#define PWRMGR_WAKE_STATUS_VAL_1_BIT 1
144#define PWRMGR_WAKE_STATUS_VAL_2_BIT 2
145
146// Configuration enable for reset_en register
147#define PWRMGR_RESET_EN_REGWEN_REG_OFFSET 0x28
148#define PWRMGR_RESET_EN_REGWEN_REG_RESVAL 0x1u
149#define PWRMGR_RESET_EN_REGWEN_EN_BIT 0
150
151// Bit mask for enabled reset requests
152#define PWRMGR_RESET_EN_REG_OFFSET 0x2c
153#define PWRMGR_RESET_EN_REG_RESVAL 0x0u
154#define PWRMGR_RESET_EN_EN_0_BIT 0
155
156// A read only register of all current reset requests post enable mask
157// (common parameters)
158#define PWRMGR_RESET_STATUS_VAL_FIELD_WIDTH 1
159#define PWRMGR_RESET_STATUS_MULTIREG_COUNT 1
160
161// A read only register of all current reset requests post enable mask
162#define PWRMGR_RESET_STATUS_REG_OFFSET 0x30
163#define PWRMGR_RESET_STATUS_REG_RESVAL 0x0u
164#define PWRMGR_RESET_STATUS_VAL_0_BIT 0
165
166// A read only register of escalation reset request
167#define PWRMGR_ESCALATE_RESET_STATUS_REG_OFFSET 0x34
168#define PWRMGR_ESCALATE_RESET_STATUS_REG_RESVAL 0x0u
169#define PWRMGR_ESCALATE_RESET_STATUS_VAL_BIT 0
170
171// Indicates which functions caused the chip to wakeup
172#define PWRMGR_WAKE_INFO_CAPTURE_DIS_REG_OFFSET 0x38
173#define PWRMGR_WAKE_INFO_CAPTURE_DIS_REG_RESVAL 0x0u
174#define PWRMGR_WAKE_INFO_CAPTURE_DIS_VAL_BIT 0
175
176// Indicates which functions caused the chip to wakeup.
177#define PWRMGR_WAKE_INFO_REG_OFFSET 0x3c
178#define PWRMGR_WAKE_INFO_REG_RESVAL 0x0u
179#define PWRMGR_WAKE_INFO_REASONS_MASK 0x7u
180#define PWRMGR_WAKE_INFO_REASONS_OFFSET 0
181#define PWRMGR_WAKE_INFO_REASONS_FIELD \
182 ((bitfield_field32_t) { .mask = PWRMGR_WAKE_INFO_REASONS_MASK, .index = PWRMGR_WAKE_INFO_REASONS_OFFSET })
183#define PWRMGR_WAKE_INFO_FALL_THROUGH_BIT 3
184#define PWRMGR_WAKE_INFO_ABORT_BIT 4
185
186// A read only register that shows the existing faults
187#define PWRMGR_FAULT_STATUS_REG_OFFSET 0x40
188#define PWRMGR_FAULT_STATUS_REG_RESVAL 0x0u
189#define PWRMGR_FAULT_STATUS_REG_INTG_ERR_BIT 0
190#define PWRMGR_FAULT_STATUS_ESC_TIMEOUT_BIT 1
191#define PWRMGR_FAULT_STATUS_MAIN_PD_GLITCH_BIT 2
192
193#ifdef __cplusplus
194} // extern "C"
195#endif
196#endif // _PWRMGR_REG_DEFS_
197// End generated register defines for pwrmgr