xref: /freebsd-src/sys/dev/firmware/xilinx/pm_defs.h (revision 9e88711f28dc9afa7d68ae8dd027d2399a2a290b)
1*9e88711fSEmmanuel Vadot /*
2*9e88711fSEmmanuel Vadot  * Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved.
3*9e88711fSEmmanuel Vadot  *
4*9e88711fSEmmanuel Vadot  * SPDX-License-Identifier: BSD-3-Clause
5*9e88711fSEmmanuel Vadot  */
6*9e88711fSEmmanuel Vadot 
7*9e88711fSEmmanuel Vadot /* ZynqMP power management enums and defines */
8*9e88711fSEmmanuel Vadot 
9*9e88711fSEmmanuel Vadot #ifndef PM_DEFS_H
10*9e88711fSEmmanuel Vadot #define PM_DEFS_H
11*9e88711fSEmmanuel Vadot 
12*9e88711fSEmmanuel Vadot /*********************************************************************
13*9e88711fSEmmanuel Vadot  * Macro definitions
14*9e88711fSEmmanuel Vadot  ********************************************************************/
15*9e88711fSEmmanuel Vadot 
16*9e88711fSEmmanuel Vadot /*
17*9e88711fSEmmanuel Vadot  * Version number is a 32bit value, like:
18*9e88711fSEmmanuel Vadot  * (PM_VERSION_MAJOR << 16) | PM_VERSION_MINOR
19*9e88711fSEmmanuel Vadot  */
20*9e88711fSEmmanuel Vadot #define PM_VERSION_MAJOR	1U
21*9e88711fSEmmanuel Vadot #define PM_VERSION_MINOR	1U
22*9e88711fSEmmanuel Vadot 
23*9e88711fSEmmanuel Vadot #define PM_VERSION	((PM_VERSION_MAJOR << 16U) | PM_VERSION_MINOR)
24*9e88711fSEmmanuel Vadot 
25*9e88711fSEmmanuel Vadot /**
26*9e88711fSEmmanuel Vadot  * PM API versions
27*9e88711fSEmmanuel Vadot  */
28*9e88711fSEmmanuel Vadot /* Expected version of firmware APIs */
29*9e88711fSEmmanuel Vadot #define FW_API_BASE_VERSION		(1U)
30*9e88711fSEmmanuel Vadot /* Expected version of firmware API for feature check */
31*9e88711fSEmmanuel Vadot #define FW_API_VERSION_2		(2U)
32*9e88711fSEmmanuel Vadot /* Version of APIs implemented in ATF */
33*9e88711fSEmmanuel Vadot #define ATF_API_BASE_VERSION		(1U)
34*9e88711fSEmmanuel Vadot 
35*9e88711fSEmmanuel Vadot /* Capabilities for RAM */
36*9e88711fSEmmanuel Vadot #define PM_CAP_ACCESS	0x1U
37*9e88711fSEmmanuel Vadot #define PM_CAP_CONTEXT	0x2U
38*9e88711fSEmmanuel Vadot 
39*9e88711fSEmmanuel Vadot #define MAX_LATENCY	(~0U)
40*9e88711fSEmmanuel Vadot #define MAX_QOS		100U
41*9e88711fSEmmanuel Vadot 
42*9e88711fSEmmanuel Vadot /* State arguments of the self suspend */
43*9e88711fSEmmanuel Vadot #define PM_STATE_CPU_IDLE		0x0U
44*9e88711fSEmmanuel Vadot #define PM_STATE_SUSPEND_TO_RAM		0xFU
45*9e88711fSEmmanuel Vadot 
46*9e88711fSEmmanuel Vadot /* APU processor states */
47*9e88711fSEmmanuel Vadot #define PM_PROC_STATE_FORCEDOFF		0U
48*9e88711fSEmmanuel Vadot #define PM_PROC_STATE_ACTIVE		1U
49*9e88711fSEmmanuel Vadot #define PM_PROC_STATE_SLEEP		2U
50*9e88711fSEmmanuel Vadot #define PM_PROC_STATE_SUSPENDING	3U
51*9e88711fSEmmanuel Vadot 
52*9e88711fSEmmanuel Vadot #define EM_FUNID_NUM_MASK    0xF0000U
53*9e88711fSEmmanuel Vadot 
54*9e88711fSEmmanuel Vadot #define PM_GET_CALLBACK_DATA		0xa01
55*9e88711fSEmmanuel Vadot #define PM_SET_SUSPEND_MODE		0xa02
56*9e88711fSEmmanuel Vadot #define PM_GET_TRUSTZONE_VERSION	0xa03
57*9e88711fSEmmanuel Vadot 
58*9e88711fSEmmanuel Vadot /*********************************************************************
59*9e88711fSEmmanuel Vadot  * Enum definitions
60*9e88711fSEmmanuel Vadot  ********************************************************************/
61*9e88711fSEmmanuel Vadot 
62*9e88711fSEmmanuel Vadot enum pm_api_id {
63*9e88711fSEmmanuel Vadot 	/* Miscellaneous API functions: */
64*9e88711fSEmmanuel Vadot 	PM_GET_API_VERSION = 1, /* Do not change or move */
65*9e88711fSEmmanuel Vadot 	PM_SET_CONFIGURATION,
66*9e88711fSEmmanuel Vadot 	PM_GET_NODE_STATUS,
67*9e88711fSEmmanuel Vadot 	PM_GET_OP_CHARACTERISTIC,
68*9e88711fSEmmanuel Vadot 	PM_REGISTER_NOTIFIER,
69*9e88711fSEmmanuel Vadot 	/* API for suspending of PUs: */
70*9e88711fSEmmanuel Vadot 	PM_REQ_SUSPEND,
71*9e88711fSEmmanuel Vadot 	PM_SELF_SUSPEND,
72*9e88711fSEmmanuel Vadot 	PM_FORCE_POWERDOWN,
73*9e88711fSEmmanuel Vadot 	PM_ABORT_SUSPEND,
74*9e88711fSEmmanuel Vadot 	PM_REQ_WAKEUP,
75*9e88711fSEmmanuel Vadot 	PM_SET_WAKEUP_SOURCE,
76*9e88711fSEmmanuel Vadot 	PM_SYSTEM_SHUTDOWN,
77*9e88711fSEmmanuel Vadot 	/* API for managing PM slaves: */
78*9e88711fSEmmanuel Vadot 	PM_REQ_NODE,
79*9e88711fSEmmanuel Vadot 	PM_RELEASE_NODE,
80*9e88711fSEmmanuel Vadot 	PM_SET_REQUIREMENT,
81*9e88711fSEmmanuel Vadot 	PM_SET_MAX_LATENCY,
82*9e88711fSEmmanuel Vadot 	/* Direct control API functions: */
83*9e88711fSEmmanuel Vadot 	PM_RESET_ASSERT,
84*9e88711fSEmmanuel Vadot 	PM_RESET_GET_STATUS,
85*9e88711fSEmmanuel Vadot 	PM_MMIO_WRITE,
86*9e88711fSEmmanuel Vadot 	PM_MMIO_READ,
87*9e88711fSEmmanuel Vadot 	PM_INIT_FINALIZE,
88*9e88711fSEmmanuel Vadot 	PM_FPGA_LOAD,
89*9e88711fSEmmanuel Vadot 	PM_FPGA_GET_STATUS,
90*9e88711fSEmmanuel Vadot 	PM_GET_CHIPID,
91*9e88711fSEmmanuel Vadot 	PM_SECURE_RSA_AES,
92*9e88711fSEmmanuel Vadot 	PM_SECURE_SHA,
93*9e88711fSEmmanuel Vadot 	PM_SECURE_RSA,
94*9e88711fSEmmanuel Vadot 	PM_PINCTRL_REQUEST,
95*9e88711fSEmmanuel Vadot 	PM_PINCTRL_RELEASE,
96*9e88711fSEmmanuel Vadot 	PM_PINCTRL_GET_FUNCTION,
97*9e88711fSEmmanuel Vadot 	PM_PINCTRL_SET_FUNCTION,
98*9e88711fSEmmanuel Vadot 	PM_PINCTRL_CONFIG_PARAM_GET,
99*9e88711fSEmmanuel Vadot 	PM_PINCTRL_CONFIG_PARAM_SET,
100*9e88711fSEmmanuel Vadot 	PM_IOCTL,
101*9e88711fSEmmanuel Vadot 	/* API to query information from firmware */
102*9e88711fSEmmanuel Vadot 	PM_QUERY_DATA,
103*9e88711fSEmmanuel Vadot 	/* Clock control API functions */
104*9e88711fSEmmanuel Vadot 	PM_CLOCK_ENABLE,
105*9e88711fSEmmanuel Vadot 	PM_CLOCK_DISABLE,
106*9e88711fSEmmanuel Vadot 	PM_CLOCK_GETSTATE,
107*9e88711fSEmmanuel Vadot 	PM_CLOCK_SETDIVIDER,
108*9e88711fSEmmanuel Vadot 	PM_CLOCK_GETDIVIDER,
109*9e88711fSEmmanuel Vadot 	PM_CLOCK_SETRATE,
110*9e88711fSEmmanuel Vadot 	PM_CLOCK_GETRATE,
111*9e88711fSEmmanuel Vadot 	PM_CLOCK_SETPARENT,
112*9e88711fSEmmanuel Vadot 	PM_CLOCK_GETPARENT,
113*9e88711fSEmmanuel Vadot 	PM_SECURE_IMAGE,
114*9e88711fSEmmanuel Vadot 	/* FPGA PL Readback */
115*9e88711fSEmmanuel Vadot 	PM_FPGA_READ,
116*9e88711fSEmmanuel Vadot 	PM_SECURE_AES,
117*9e88711fSEmmanuel Vadot 	/* PLL control API functions */
118*9e88711fSEmmanuel Vadot 	PM_PLL_SET_PARAMETER,
119*9e88711fSEmmanuel Vadot 	PM_PLL_GET_PARAMETER,
120*9e88711fSEmmanuel Vadot 	PM_PLL_SET_MODE,
121*9e88711fSEmmanuel Vadot 	PM_PLL_GET_MODE,
122*9e88711fSEmmanuel Vadot 	/* PM Register Access API */
123*9e88711fSEmmanuel Vadot 	PM_REGISTER_ACCESS,
124*9e88711fSEmmanuel Vadot 	PM_EFUSE_ACCESS,
125*9e88711fSEmmanuel Vadot 	PM_FPGA_GET_VERSION,
126*9e88711fSEmmanuel Vadot 	PM_FPGA_GET_FEATURE_LIST,
127*9e88711fSEmmanuel Vadot 	PM_FEATURE_CHECK = 63,
128*9e88711fSEmmanuel Vadot 	PM_API_MAX
129*9e88711fSEmmanuel Vadot };
130*9e88711fSEmmanuel Vadot 
131*9e88711fSEmmanuel Vadot enum pm_query_id {
132*9e88711fSEmmanuel Vadot 	PM_QID_INVALID = 0,
133*9e88711fSEmmanuel Vadot 	PM_QID_CLOCK_GET_NAME,
134*9e88711fSEmmanuel Vadot 	PM_QID_CLOCK_GET_TOPOLOGY,
135*9e88711fSEmmanuel Vadot 	PM_QID_CLOCK_GET_FIXEDFACTOR_PARAMS,
136*9e88711fSEmmanuel Vadot 	PM_QID_CLOCK_GET_PARENTS,
137*9e88711fSEmmanuel Vadot 	PM_QID_CLOCK_GET_ATTRIBUTES,
138*9e88711fSEmmanuel Vadot 	PM_QID_PINCTRL_GET_NUM_PINS,
139*9e88711fSEmmanuel Vadot 	PM_QID_PINCTRL_GET_NUM_FUNCTIONS,
140*9e88711fSEmmanuel Vadot 	PM_QID_PINCTRL_GET_NUM_FUNCTION_GROUPS,
141*9e88711fSEmmanuel Vadot 	PM_QID_PINCTRL_GET_FUNCTION_NAME,
142*9e88711fSEmmanuel Vadot 	PM_QID_PINCTRL_GET_FUNCTION_GROUPS,
143*9e88711fSEmmanuel Vadot 	PM_QID_PINCTRL_GET_PIN_GROUPS,
144*9e88711fSEmmanuel Vadot 	PM_QID_CLOCK_GET_NUM_CLOCKS,
145*9e88711fSEmmanuel Vadot 	PM_QID_CLOCK_GET_MAX_DIVISOR,
146*9e88711fSEmmanuel Vadot };
147*9e88711fSEmmanuel Vadot 
148*9e88711fSEmmanuel Vadot enum pm_node_id {
149*9e88711fSEmmanuel Vadot 	NODE_UNKNOWN = 0,
150*9e88711fSEmmanuel Vadot 	NODE_APU,
151*9e88711fSEmmanuel Vadot 	NODE_APU_0,
152*9e88711fSEmmanuel Vadot 	NODE_APU_1,
153*9e88711fSEmmanuel Vadot 	NODE_APU_2,
154*9e88711fSEmmanuel Vadot 	NODE_APU_3,
155*9e88711fSEmmanuel Vadot 	NODE_RPU,
156*9e88711fSEmmanuel Vadot 	NODE_RPU_0,
157*9e88711fSEmmanuel Vadot 	NODE_RPU_1,
158*9e88711fSEmmanuel Vadot 	NODE_PLD,
159*9e88711fSEmmanuel Vadot 	NODE_FPD,
160*9e88711fSEmmanuel Vadot 	NODE_OCM_BANK_0,
161*9e88711fSEmmanuel Vadot 	NODE_OCM_BANK_1,
162*9e88711fSEmmanuel Vadot 	NODE_OCM_BANK_2,
163*9e88711fSEmmanuel Vadot 	NODE_OCM_BANK_3,
164*9e88711fSEmmanuel Vadot 	NODE_TCM_0_A,
165*9e88711fSEmmanuel Vadot 	NODE_TCM_0_B,
166*9e88711fSEmmanuel Vadot 	NODE_TCM_1_A,
167*9e88711fSEmmanuel Vadot 	NODE_TCM_1_B,
168*9e88711fSEmmanuel Vadot 	NODE_L2,
169*9e88711fSEmmanuel Vadot 	NODE_GPU_PP_0,
170*9e88711fSEmmanuel Vadot 	NODE_GPU_PP_1,
171*9e88711fSEmmanuel Vadot 	NODE_USB_0,
172*9e88711fSEmmanuel Vadot 	NODE_USB_1,
173*9e88711fSEmmanuel Vadot 	NODE_TTC_0,
174*9e88711fSEmmanuel Vadot 	NODE_TTC_1,
175*9e88711fSEmmanuel Vadot 	NODE_TTC_2,
176*9e88711fSEmmanuel Vadot 	NODE_TTC_3,
177*9e88711fSEmmanuel Vadot 	NODE_SATA,
178*9e88711fSEmmanuel Vadot 	NODE_ETH_0,
179*9e88711fSEmmanuel Vadot 	NODE_ETH_1,
180*9e88711fSEmmanuel Vadot 	NODE_ETH_2,
181*9e88711fSEmmanuel Vadot 	NODE_ETH_3,
182*9e88711fSEmmanuel Vadot 	NODE_UART_0,
183*9e88711fSEmmanuel Vadot 	NODE_UART_1,
184*9e88711fSEmmanuel Vadot 	NODE_SPI_0,
185*9e88711fSEmmanuel Vadot 	NODE_SPI_1,
186*9e88711fSEmmanuel Vadot 	NODE_I2C_0,
187*9e88711fSEmmanuel Vadot 	NODE_I2C_1,
188*9e88711fSEmmanuel Vadot 	NODE_SD_0,
189*9e88711fSEmmanuel Vadot 	NODE_SD_1,
190*9e88711fSEmmanuel Vadot 	NODE_DP,
191*9e88711fSEmmanuel Vadot 	NODE_GDMA,
192*9e88711fSEmmanuel Vadot 	NODE_ADMA,
193*9e88711fSEmmanuel Vadot 	NODE_NAND,
194*9e88711fSEmmanuel Vadot 	NODE_QSPI,
195*9e88711fSEmmanuel Vadot 	NODE_GPIO,
196*9e88711fSEmmanuel Vadot 	NODE_CAN_0,
197*9e88711fSEmmanuel Vadot 	NODE_CAN_1,
198*9e88711fSEmmanuel Vadot 	NODE_EXTERN,
199*9e88711fSEmmanuel Vadot 	NODE_APLL,
200*9e88711fSEmmanuel Vadot 	NODE_VPLL,
201*9e88711fSEmmanuel Vadot 	NODE_DPLL,
202*9e88711fSEmmanuel Vadot 	NODE_RPLL,
203*9e88711fSEmmanuel Vadot 	NODE_IOPLL,
204*9e88711fSEmmanuel Vadot 	NODE_DDR,
205*9e88711fSEmmanuel Vadot 	NODE_IPI_APU,
206*9e88711fSEmmanuel Vadot 	NODE_IPI_RPU_0,
207*9e88711fSEmmanuel Vadot 	NODE_GPU,
208*9e88711fSEmmanuel Vadot 	NODE_PCIE,
209*9e88711fSEmmanuel Vadot 	NODE_PCAP,
210*9e88711fSEmmanuel Vadot 	NODE_RTC,
211*9e88711fSEmmanuel Vadot 	NODE_LPD,
212*9e88711fSEmmanuel Vadot 	NODE_VCU,
213*9e88711fSEmmanuel Vadot 	NODE_IPI_RPU_1,
214*9e88711fSEmmanuel Vadot 	NODE_IPI_PL_0,
215*9e88711fSEmmanuel Vadot 	NODE_IPI_PL_1,
216*9e88711fSEmmanuel Vadot 	NODE_IPI_PL_2,
217*9e88711fSEmmanuel Vadot 	NODE_IPI_PL_3,
218*9e88711fSEmmanuel Vadot 	NODE_PL,
219*9e88711fSEmmanuel Vadot 	NODE_GEM_TSU,
220*9e88711fSEmmanuel Vadot 	NODE_SWDT_0,
221*9e88711fSEmmanuel Vadot 	NODE_SWDT_1,
222*9e88711fSEmmanuel Vadot 	NODE_CSU,
223*9e88711fSEmmanuel Vadot 	NODE_PJTAG,
224*9e88711fSEmmanuel Vadot 	NODE_TRACE,
225*9e88711fSEmmanuel Vadot 	NODE_TESTSCAN,
226*9e88711fSEmmanuel Vadot 	NODE_PMU,
227*9e88711fSEmmanuel Vadot 	NODE_MAX,
228*9e88711fSEmmanuel Vadot };
229*9e88711fSEmmanuel Vadot 
230*9e88711fSEmmanuel Vadot enum pm_request_ack {
231*9e88711fSEmmanuel Vadot 	REQ_ACK_NO = 1,
232*9e88711fSEmmanuel Vadot 	REQ_ACK_BLOCKING,
233*9e88711fSEmmanuel Vadot 	REQ_ACK_NON_BLOCKING,
234*9e88711fSEmmanuel Vadot };
235*9e88711fSEmmanuel Vadot 
236*9e88711fSEmmanuel Vadot enum pm_abort_reason {
237*9e88711fSEmmanuel Vadot 	ABORT_REASON_WKUP_EVENT = 100,
238*9e88711fSEmmanuel Vadot 	ABORT_REASON_PU_BUSY,
239*9e88711fSEmmanuel Vadot 	ABORT_REASON_NO_PWRDN,
240*9e88711fSEmmanuel Vadot 	ABORT_REASON_UNKNOWN,
241*9e88711fSEmmanuel Vadot };
242*9e88711fSEmmanuel Vadot 
243*9e88711fSEmmanuel Vadot enum pm_suspend_reason {
244*9e88711fSEmmanuel Vadot 	SUSPEND_REASON_PU_REQ = 201,
245*9e88711fSEmmanuel Vadot 	SUSPEND_REASON_ALERT,
246*9e88711fSEmmanuel Vadot 	SUSPEND_REASON_SYS_SHUTDOWN,
247*9e88711fSEmmanuel Vadot };
248*9e88711fSEmmanuel Vadot 
249*9e88711fSEmmanuel Vadot enum pm_ram_state {
250*9e88711fSEmmanuel Vadot 	PM_RAM_STATE_OFF = 1,
251*9e88711fSEmmanuel Vadot 	PM_RAM_STATE_RETENTION,
252*9e88711fSEmmanuel Vadot 	PM_RAM_STATE_ON,
253*9e88711fSEmmanuel Vadot };
254*9e88711fSEmmanuel Vadot 
255*9e88711fSEmmanuel Vadot enum pm_opchar_type {
256*9e88711fSEmmanuel Vadot 	PM_OPCHAR_TYPE_POWER = 1,
257*9e88711fSEmmanuel Vadot 	PM_OPCHAR_TYPE_TEMP,
258*9e88711fSEmmanuel Vadot 	PM_OPCHAR_TYPE_LATENCY,
259*9e88711fSEmmanuel Vadot };
260*9e88711fSEmmanuel Vadot 
261*9e88711fSEmmanuel Vadot /**
262*9e88711fSEmmanuel Vadot  * @PM_RET_SUCCESS:		success
263*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_ARGS:		illegal arguments provided (deprecated)
264*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_NOTSUPPORTED:	feature not supported  (deprecated)
265*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_NOT_ENABLED:	feature is not enabled
266*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_INTERNAL:	internal error
267*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_CONFLICT:	conflict
268*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_ACCESS:	access rights violation
269*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_INVALID_NODE:	invalid node
270*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_DOUBLE_REQ:	duplicate request for same node
271*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_ABORT_SUSPEND:	suspend procedure has been aborted
272*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_TIMEOUT:	timeout in communication with PMU
273*9e88711fSEmmanuel Vadot  * @PM_RET_ERROR_NODE_USED:	node is already in use
274*9e88711fSEmmanuel Vadot  */
275*9e88711fSEmmanuel Vadot enum pm_ret_status {
276*9e88711fSEmmanuel Vadot 	PM_RET_SUCCESS = (0U),
277*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_ARGS = (1U),
278*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_NOTSUPPORTED = (4U),
279*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_NOT_ENABLED = (29U),
280*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_INTERNAL = (2000U),
281*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_CONFLICT = (2001U),
282*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_ACCESS = (2002U),
283*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_INVALID_NODE = (2003U),
284*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_DOUBLE_REQ = (2004U),
285*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_ABORT_SUSPEND = (2005U),
286*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_TIMEOUT = (2006U),
287*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_NODE_USED = (2007U),
288*9e88711fSEmmanuel Vadot 	PM_RET_ERROR_NO_FEATURE = (2008U)
289*9e88711fSEmmanuel Vadot };
290*9e88711fSEmmanuel Vadot 
291*9e88711fSEmmanuel Vadot /**
292*9e88711fSEmmanuel Vadot  * @PM_INITIAL_BOOT:	boot is a fresh system startup
293*9e88711fSEmmanuel Vadot  * @PM_RESUME:		boot is a resume
294*9e88711fSEmmanuel Vadot  * @PM_BOOT_ERROR:	error, boot cause cannot be identified
295*9e88711fSEmmanuel Vadot  */
296*9e88711fSEmmanuel Vadot enum pm_boot_status {
297*9e88711fSEmmanuel Vadot 	PM_INITIAL_BOOT,
298*9e88711fSEmmanuel Vadot 	PM_RESUME,
299*9e88711fSEmmanuel Vadot 	PM_BOOT_ERROR,
300*9e88711fSEmmanuel Vadot };
301*9e88711fSEmmanuel Vadot 
302*9e88711fSEmmanuel Vadot /**
303*9e88711fSEmmanuel Vadot  * @PMF_SHUTDOWN_TYPE_SHUTDOWN:		shutdown
304*9e88711fSEmmanuel Vadot  * @PMF_SHUTDOWN_TYPE_RESET:		reset/reboot
305*9e88711fSEmmanuel Vadot  * @PMF_SHUTDOWN_TYPE_SETSCOPE_ONLY:	set the shutdown/reboot scope
306*9e88711fSEmmanuel Vadot  */
307*9e88711fSEmmanuel Vadot enum pm_shutdown_type {
308*9e88711fSEmmanuel Vadot 	PMF_SHUTDOWN_TYPE_SHUTDOWN,
309*9e88711fSEmmanuel Vadot 	PMF_SHUTDOWN_TYPE_RESET,
310*9e88711fSEmmanuel Vadot 	PMF_SHUTDOWN_TYPE_SETSCOPE_ONLY,
311*9e88711fSEmmanuel Vadot };
312*9e88711fSEmmanuel Vadot 
313*9e88711fSEmmanuel Vadot /**
314*9e88711fSEmmanuel Vadot  * @PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM:	shutdown/reboot APU subsystem only
315*9e88711fSEmmanuel Vadot  * @PMF_SHUTDOWN_SUBTYPE_PS_ONLY:	shutdown/reboot entire PS (but not PL)
316*9e88711fSEmmanuel Vadot  * @PMF_SHUTDOWN_SUBTYPE_SYSTEM:	shutdown/reboot entire system
317*9e88711fSEmmanuel Vadot  */
318*9e88711fSEmmanuel Vadot enum pm_shutdown_subtype {
319*9e88711fSEmmanuel Vadot 	PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM,
320*9e88711fSEmmanuel Vadot 	PMF_SHUTDOWN_SUBTYPE_PS_ONLY,
321*9e88711fSEmmanuel Vadot 	PMF_SHUTDOWN_SUBTYPE_SYSTEM,
322*9e88711fSEmmanuel Vadot };
323*9e88711fSEmmanuel Vadot 
324*9e88711fSEmmanuel Vadot /**
325*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_DIV2:		Enable for divide by 2 function inside the PLL
326*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_FBDIV:		Feedback divisor integer portion for the PLL
327*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_DATA:		Feedback divisor fractional portion for the PLL
328*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_PRE_SRC:	Clock source for PLL input
329*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_POST_SRC:	Clock source for PLL Bypass mode
330*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_LOCK_DLY:	Lock circuit config settings for lock windowsize
331*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_LOCK_CNT:	Lock circuit counter setting
332*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_LFHF:		PLL loop filter high frequency capacitor control
333*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_CP:		PLL charge pump control
334*9e88711fSEmmanuel Vadot  * @PM_PLL_PARAM_RES:		PLL loop filter resistor control
335*9e88711fSEmmanuel Vadot  */
336*9e88711fSEmmanuel Vadot enum pm_pll_param {
337*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_DIV2,
338*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_FBDIV,
339*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_DATA,
340*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_PRE_SRC,
341*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_POST_SRC,
342*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_LOCK_DLY,
343*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_LOCK_CNT,
344*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_LFHF,
345*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_CP,
346*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_RES,
347*9e88711fSEmmanuel Vadot 	PM_PLL_PARAM_MAX,
348*9e88711fSEmmanuel Vadot };
349*9e88711fSEmmanuel Vadot 
350*9e88711fSEmmanuel Vadot /**
351*9e88711fSEmmanuel Vadot  * @PM_PLL_MODE_RESET:		PLL is in reset (not locked)
352*9e88711fSEmmanuel Vadot  * @PM_PLL_MODE_INTEGER:	PLL is locked in integer mode
353*9e88711fSEmmanuel Vadot  * @PM_PLL_MODE_FRACTIONAL:	PLL is locked in fractional mode
354*9e88711fSEmmanuel Vadot  */
355*9e88711fSEmmanuel Vadot enum pm_pll_mode {
356*9e88711fSEmmanuel Vadot 	PM_PLL_MODE_RESET,
357*9e88711fSEmmanuel Vadot 	PM_PLL_MODE_INTEGER,
358*9e88711fSEmmanuel Vadot 	PM_PLL_MODE_FRACTIONAL,
359*9e88711fSEmmanuel Vadot 	PM_PLL_MODE_MAX,
360*9e88711fSEmmanuel Vadot };
361*9e88711fSEmmanuel Vadot 
362*9e88711fSEmmanuel Vadot /**
363*9e88711fSEmmanuel Vadot  * @PM_CLOCK_DIV0_ID:		Clock divider 0
364*9e88711fSEmmanuel Vadot  * @PM_CLOCK_DIV1_ID:		Clock divider 1
365*9e88711fSEmmanuel Vadot  */
366*9e88711fSEmmanuel Vadot enum pm_clock_div_id {
367*9e88711fSEmmanuel Vadot 	PM_CLOCK_DIV0_ID,
368*9e88711fSEmmanuel Vadot 	PM_CLOCK_DIV1_ID,
369*9e88711fSEmmanuel Vadot };
370*9e88711fSEmmanuel Vadot 
371*9e88711fSEmmanuel Vadot /**
372*9e88711fSEmmanuel Vadot  * EM API IDs
373*9e88711fSEmmanuel Vadot  */
374*9e88711fSEmmanuel Vadot enum em_api_id {
375*9e88711fSEmmanuel Vadot 	EM_SET_ACTION = 1,
376*9e88711fSEmmanuel Vadot 	EM_REMOVE_ACTION,
377*9e88711fSEmmanuel Vadot 	EM_SEND_ERRORS,
378*9e88711fSEmmanuel Vadot };
379*9e88711fSEmmanuel Vadot 
380*9e88711fSEmmanuel Vadot #endif /* PM_DEFS_H */
381