1 /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2 /*
3  * Header providing constants for Rockchip suspend bindings.
4  *
5  * Copyright (C) 2022 Rockchip Electronics Co., Ltd.
6  * Author: XiaoDong.Huang
7  */
8 
9 #ifndef __DT_BINDINGS_SUSPEND_ROCKCHIP_RK3568_H__
10 #define __DT_BINDINGS_SUSPEND_ROCKCHIP_RK3568_H__
11 /******************************bits ops************************************/
12 
13 #ifndef BIT
14 #define BIT(nr) (1 << (nr))
15 #endif
16 
17 #define RKPM_SLP_WFI BIT(0)
18 #define RKPM_SLP_ARMOFF BIT(1)
19 #define RKPM_SLP_CENTER_OFF BIT(2)
20 #define RKPM_SLP_ARMOFF_LOGOFF BIT(3)
21 #define RKPM_SLP_FROM_UBOOT BIT(4)
22 #define RKPM_SLP_PMIC_LP BIT(5)
23 #define RKPM_SLP_HW_PLLS_OFF BIT(6)
24 #define RKPM_SLP_PMUALIVE_32K BIT(7)
25 #define RKPM_SLP_OSC_DIS BIT(8)
26 #define RKPM_SLP_32K_EXT BIT(9)
27 #define RKPM_SLP_32K_PVTM BIT(10)
28 /* the wake up source */
29 #define RKPM_CPU0_WKUP_EN BIT(0)
30 #define RKPM_CPU1_WKUP_EN BIT(1)
31 #define RKPM_CPU2_WKUP_EN BIT(2)
32 #define RKPM_CPU3_WKUP_EN BIT(3)
33 #define RKPM_GPIO_WKUP_EN BIT(4)
34 #define RKPM_UART0_WKUP_EN BIT(5)
35 #define RKPM_SDMMC0_WKUP_EN BIT(6)
36 #define RKPM_SDMMC1_WKUP_EN BIT(7)
37 #define RKPM_SDMMC2_WKUP_EN BIT(8)
38 #define RKPM_USB_WKUP_EN BIT(9)
39 #define RKPM_PCIE_WKUP_EN BIT(10)
40 #define RKPM_VAD_WKUP_EN BIT(11)
41 #define RKPM_TIMER_WKUP_EN BIT(12)
42 #define RKPM_PWM0_WKUP_EN BIT(13)
43 #define RKPM_TIMEOUT_WKUP_EN BIT(14)
44 #define RKPM_SFT_WKUP_EN BIT(15)
45 #define RKPM_USB_LINESTATE_WKUP_EN BIT(16)
46 
47 #define RKPM_SLP_LDO1_ON BIT(0)
48 #define RKPM_SLP_LDO2_ON BIT(1)
49 #define RKPM_SLP_LDO3_ON BIT(2)
50 #define RKPM_SLP_LDO4_ON BIT(3)
51 #define RKPM_SLP_LDO5_ON BIT(4)
52 #define RKPM_SLP_LDO6_ON BIT(5)
53 #define RKPM_SLP_LDO7_ON BIT(6)
54 #define RKPM_SLP_LDO8_ON BIT(7)
55 #define RKPM_SLP_LDO9_ON BIT(8)
56 
57 #endif
58