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 aon_timer_aon wkup_req, applies for WAKEUP_EN,
27// WAKE_STATUS and WAKE_INFO
28#define PWRMGR_PARAM_AON_TIMER_AON_WKUP_REQ_IDX 1
29
30// Vector index for soc_proxy wkup_external_req, applies for WAKEUP_EN,
31// WAKE_STATUS and WAKE_INFO
32#define PWRMGR_PARAM_SOC_PROXY_WKUP_EXTERNAL_REQ_IDX 2
33
34// Number of peripheral reset requets
35#define PWRMGR_PARAM_NUM_RST_REQS 2
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 3
45
46// Reset req idx for MainPwr
47#define PWRMGR_PARAM_RESET_MAIN_PWR_IDX 2
48
49// Reset req idx for Esc
50#define PWRMGR_PARAM_RESET_ESC_IDX 3
51
52// Reset req idx for Ndm
53#define PWRMGR_PARAM_RESET_NDM_IDX 4
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 0x40u
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_MAIN_PD_N_BIT 6
102#define PWRMGR_CONTROL_MAIN_PD_N_VALUE_POWER_DOWN 0x0
103#define PWRMGR_CONTROL_MAIN_PD_N_VALUE_POWER_UP 0x1
104
105// The configuration registers CONTROL, WAKEUP_EN, RESET_EN are all written
106// in the
107#define PWRMGR_CFG_CDC_SYNC_REG_OFFSET 0x18
108#define PWRMGR_CFG_CDC_SYNC_REG_RESVAL 0x0u
109#define PWRMGR_CFG_CDC_SYNC_SYNC_BIT 0
110
111// Configuration enable for wakeup_en register
112#define PWRMGR_WAKEUP_EN_REGWEN_REG_OFFSET 0x1c
113#define PWRMGR_WAKEUP_EN_REGWEN_REG_RESVAL 0x1u
114#define PWRMGR_WAKEUP_EN_REGWEN_EN_BIT 0
115
116// Bit mask for enabled wakeups (common parameters)
117#define PWRMGR_WAKEUP_EN_EN_FIELD_WIDTH 1
118#define PWRMGR_WAKEUP_EN_MULTIREG_COUNT 1
119
120// Bit mask for enabled wakeups
121#define PWRMGR_WAKEUP_EN_REG_OFFSET 0x20
122#define PWRMGR_WAKEUP_EN_REG_RESVAL 0x0u
123#define PWRMGR_WAKEUP_EN_EN_0_BIT 0
124#define PWRMGR_WAKEUP_EN_EN_1_BIT 1
125#define PWRMGR_WAKEUP_EN_EN_2_BIT 2
126
127// A read only register of all current wake requests post enable mask (common
128// parameters)
129#define PWRMGR_WAKE_STATUS_VAL_FIELD_WIDTH 1
130#define PWRMGR_WAKE_STATUS_MULTIREG_COUNT 1
131
132// A read only register of all current wake requests post enable mask
133#define PWRMGR_WAKE_STATUS_REG_OFFSET 0x24
134#define PWRMGR_WAKE_STATUS_REG_RESVAL 0x0u
135#define PWRMGR_WAKE_STATUS_VAL_0_BIT 0
136#define PWRMGR_WAKE_STATUS_VAL_1_BIT 1
137#define PWRMGR_WAKE_STATUS_VAL_2_BIT 2
138
139// Configuration enable for reset_en register
140#define PWRMGR_RESET_EN_REGWEN_REG_OFFSET 0x28
141#define PWRMGR_RESET_EN_REGWEN_REG_RESVAL 0x1u
142#define PWRMGR_RESET_EN_REGWEN_EN_BIT 0
143
144// Bit mask for enabled reset requests (common parameters)
145#define PWRMGR_RESET_EN_EN_FIELD_WIDTH 1
146#define PWRMGR_RESET_EN_MULTIREG_COUNT 1
147
148// Bit mask for enabled reset requests
149#define PWRMGR_RESET_EN_REG_OFFSET 0x2c
150#define PWRMGR_RESET_EN_REG_RESVAL 0x0u
151#define PWRMGR_RESET_EN_EN_0_BIT 0
152#define PWRMGR_RESET_EN_EN_1_BIT 1
153
154// A read only register of all current reset requests post enable mask
155// (common parameters)
156#define PWRMGR_RESET_STATUS_VAL_FIELD_WIDTH 1
157#define PWRMGR_RESET_STATUS_MULTIREG_COUNT 1
158
159// A read only register of all current reset requests post enable mask
160#define PWRMGR_RESET_STATUS_REG_OFFSET 0x30
161#define PWRMGR_RESET_STATUS_REG_RESVAL 0x0u
162#define PWRMGR_RESET_STATUS_VAL_0_BIT 0
163#define PWRMGR_RESET_STATUS_VAL_1_BIT 1
164
165// A read only register of escalation reset request
166#define PWRMGR_ESCALATE_RESET_STATUS_REG_OFFSET 0x34
167#define PWRMGR_ESCALATE_RESET_STATUS_REG_RESVAL 0x0u
168#define PWRMGR_ESCALATE_RESET_STATUS_VAL_BIT 0
169
170// Indicates which functions caused the chip to wakeup
171#define PWRMGR_WAKE_INFO_CAPTURE_DIS_REG_OFFSET 0x38
172#define PWRMGR_WAKE_INFO_CAPTURE_DIS_REG_RESVAL 0x0u
173#define PWRMGR_WAKE_INFO_CAPTURE_DIS_VAL_BIT 0
174
175// Indicates which functions caused the chip to wakeup.
176#define PWRMGR_WAKE_INFO_REG_OFFSET 0x3c
177#define PWRMGR_WAKE_INFO_REG_RESVAL 0x0u
178#define PWRMGR_WAKE_INFO_REASONS_MASK 0x7u
179#define PWRMGR_WAKE_INFO_REASONS_OFFSET 0
180#define PWRMGR_WAKE_INFO_REASONS_FIELD \
181 ((bitfield_field32_t) { .mask = PWRMGR_WAKE_INFO_REASONS_MASK, .index = PWRMGR_WAKE_INFO_REASONS_OFFSET })
182#define PWRMGR_WAKE_INFO_FALL_THROUGH_BIT 3
183#define PWRMGR_WAKE_INFO_ABORT_BIT 4
184
185// A read only register that shows the existing faults
186#define PWRMGR_FAULT_STATUS_REG_OFFSET 0x40
187#define PWRMGR_FAULT_STATUS_REG_RESVAL 0x0u
188#define PWRMGR_FAULT_STATUS_REG_INTG_ERR_BIT 0
189#define PWRMGR_FAULT_STATUS_ESC_TIMEOUT_BIT 1
190#define PWRMGR_FAULT_STATUS_MAIN_PD_GLITCH_BIT 2
191
192#ifdef __cplusplus
193} // extern "C"
194#endif
195#endif // _PWRMGR_REG_DEFS_
196// End generated register defines for pwrmgr