tizen 2.4 release
[kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8830 / chip_x35 / sprd_reg_pmu_apb.h
1 /*
2  * Copyright (C) 2014-2015 Spreadtrum Communications Inc.
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  */
10
11 #ifndef __REGS_PMU_APB_H__
12 #define __REGS_PMU_APB_H__
13
14 #define REGS_PMU_APB
15
16 /* registers definitions for controller REGS_PMU_APB */
17 #define REG_PMU_APB_PD_CA7_TOP_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x0000)
18 #define REG_PMU_APB_PD_CA7_C0_CFG       SCI_ADDR(REGS_PMU_APB_BASE, 0x0004)
19 #define REG_PMU_APB_PD_CA7_C1_CFG       SCI_ADDR(REGS_PMU_APB_BASE, 0x0008)
20 #define REG_PMU_APB_PD_CA7_C2_CFG       SCI_ADDR(REGS_PMU_APB_BASE, 0x000C)
21 #define REG_PMU_APB_PD_CA7_C3_CFG       SCI_ADDR(REGS_PMU_APB_BASE, 0x0010)
22 #define REG_PMU_APB_PD_AP_DISP_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x0014)
23 #define REG_PMU_APB_PD_AP_SYS_CFG       SCI_ADDR(REGS_PMU_APB_BASE, 0x0018)
24 #define REG_PMU_APB_PD_MM_TOP_CFG       SCI_ADDR(REGS_PMU_APB_BASE, 0x001C)
25 #define REG_PMU_APB_PD_GPU_TOP_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x0020)
26 #define REG_PMU_APB_PD_CP0_ARM9_0_CFG   SCI_ADDR(REGS_PMU_APB_BASE, 0x0024)
27 #define REG_PMU_APB_PD_CP0_ARM9_1_CFG   SCI_ADDR(REGS_PMU_APB_BASE, 0x0028)
28 #define REG_PMU_APB_PD_CP0_ARM9_2_CFG   SCI_ADDR(REGS_PMU_APB_BASE, 0x002C)
29 #define REG_PMU_APB_PD_CP0_HU3GE_CFG    SCI_ADDR(REGS_PMU_APB_BASE, 0x0030)
30 #define REG_PMU_APB_PD_CP0_GSM_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x0034)
31 #define REG_PMU_APB_PD_CP0_L1RAM_CFG    SCI_ADDR(REGS_PMU_APB_BASE, 0x0038)
32 #define REG_PMU_APB_PD_CP0_SYS_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x003C)
33 #define REG_PMU_APB_PD_CP1_ARM9_CFG     SCI_ADDR(REGS_PMU_APB_BASE, 0x0040)
34 #define REG_PMU_APB_PD_CP1_GSM_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x0044)
35 #define REG_PMU_APB_PD_CP1_TD_CFG       SCI_ADDR(REGS_PMU_APB_BASE, 0x0048)
36 #define REG_PMU_APB_PD_CP1_L1RAM_CFG    SCI_ADDR(REGS_PMU_APB_BASE, 0x004C)
37 #define REG_PMU_APB_PD_CP1_SYS_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x0050)
38 #define REG_PMU_APB_PD_CP2_ARM9_CFG     SCI_ADDR(REGS_PMU_APB_BASE, 0x0054)
39 #define REG_PMU_APB_PD_CP2_WIFI_CFG     SCI_ADDR(REGS_PMU_APB_BASE, 0x0058)
40 #define REG_PMU_APB_AP_WAKEUP_POR_CFG   SCI_ADDR(REGS_PMU_APB_BASE, 0x005C)
41 #define REG_PMU_APB_PD_CP2_SYS_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x0060)
42 #define REG_PMU_APB_PD_PUB_SYS_CFG      SCI_ADDR(REGS_PMU_APB_BASE, 0x0064)
43 #define REG_PMU_APB_XTL_WAIT_CNT        SCI_ADDR(REGS_PMU_APB_BASE, 0x0068)
44 #define REG_PMU_APB_XTLBUF_WAIT_CNT     SCI_ADDR(REGS_PMU_APB_BASE, 0x006C)
45 #define REG_PMU_APB_PLL_WAIT_CNT1       SCI_ADDR(REGS_PMU_APB_BASE, 0x0070)
46 #define REG_PMU_APB_PLL_WAIT_CNT2       SCI_ADDR(REGS_PMU_APB_BASE, 0x0074)
47 #define REG_PMU_APB_XTL0_REL_CFG        SCI_ADDR(REGS_PMU_APB_BASE, 0x0078)
48 #define REG_PMU_APB_XTL1_REL_CFG        SCI_ADDR(REGS_PMU_APB_BASE, 0x007C)
49 #define REG_PMU_APB_XTL2_REL_CFG        SCI_ADDR(REGS_PMU_APB_BASE, 0x0080)
50 #define REG_PMU_APB_XTLBUF0_REL_CFG     SCI_ADDR(REGS_PMU_APB_BASE, 0x0084)
51 #define REG_PMU_APB_XTLBUF1_REL_CFG     SCI_ADDR(REGS_PMU_APB_BASE, 0x0088)
52 #define REG_PMU_APB_MPLL_REL_CFG        SCI_ADDR(REGS_PMU_APB_BASE, 0x008C)
53 #define REG_PMU_APB_DPLL_REL_CFG        SCI_ADDR(REGS_PMU_APB_BASE, 0x0090)
54 #define REG_PMU_APB_TDPLL_REL_CFG       SCI_ADDR(REGS_PMU_APB_BASE, 0x0094)
55 #define REG_PMU_APB_WPLL_REL_CFG        SCI_ADDR(REGS_PMU_APB_BASE, 0x0098)
56 #define REG_PMU_APB_CPLL_REL_CFG        SCI_ADDR(REGS_PMU_APB_BASE, 0x009C)
57 #define REG_PMU_APB_WIFIPLL1_REL_CFG    SCI_ADDR(REGS_PMU_APB_BASE, 0x00A0)
58 #define REG_PMU_APB_WIFIPLL2_REL_CFG    SCI_ADDR(REGS_PMU_APB_BASE, 0x00A4)
59 #define REG_PMU_APB_CP_SOFT_RST         SCI_ADDR(REGS_PMU_APB_BASE, 0x00A8)
60 #define REG_PMU_APB_CP_SLP_STATUS_DBG0  SCI_ADDR(REGS_PMU_APB_BASE, 0x00AC)
61 #define REG_PMU_APB_CP_SLP_STATUS_DBG1  SCI_ADDR(REGS_PMU_APB_BASE, 0x00B0)
62 #define REG_PMU_APB_PWR_STATUS0_DBG     SCI_ADDR(REGS_PMU_APB_BASE, 0x00B4)
63 #define REG_PMU_APB_PWR_STATUS1_DBG     SCI_ADDR(REGS_PMU_APB_BASE, 0x00B8)
64 #define REG_PMU_APB_PWR_STATUS2_DBG     SCI_ADDR(REGS_PMU_APB_BASE, 0x00BC)
65 #define REG_PMU_APB_PWR_STATUS3_DBG     SCI_ADDR(REGS_PMU_APB_BASE, 0x00C0)
66 #define REG_PMU_APB_SLEEP_CTRL          SCI_ADDR(REGS_PMU_APB_BASE, 0x00C4)
67 #define REG_PMU_APB_DDR_SLEEP_CTRL      SCI_ADDR(REGS_PMU_APB_BASE, 0x00C8)
68 #define REG_PMU_APB_SLEEP_STATUS        SCI_ADDR(REGS_PMU_APB_BASE, 0x00CC)
69 #define REG_PMU_APB_PLL_DIV_AUTO_GATE_EN SCI_ADDR(REGS_PMU_APB_BASE, 0x00D0)
70 #define REG_PMU_APB_PLL_DIV_EN1         SCI_ADDR(REGS_PMU_APB_BASE, 0x00D4)
71 #define REG_PMU_APB_PLL_DIV_EN2         SCI_ADDR(REGS_PMU_APB_BASE, 0x00D8)
72 #define REG_PMU_APB_CA7_TOP_CFG         SCI_ADDR(REGS_PMU_APB_BASE, 0x00DC)
73 #define REG_PMU_APB_CA7_C0_CFG          SCI_ADDR(REGS_PMU_APB_BASE, 0x00E0)
74 #define REG_PMU_APB_CA7_C1_CFG          SCI_ADDR(REGS_PMU_APB_BASE, 0x00E4)
75 #define REG_PMU_APB_CA7_C2_CFG          SCI_ADDR(REGS_PMU_APB_BASE, 0x00E8)
76 #define REG_PMU_APB_CA7_C3_CFG          SCI_ADDR(REGS_PMU_APB_BASE, 0x00EC)
77 #define REG_PMU_APB_DDR_CHN_SLEEP_CTRL0 SCI_ADDR(REGS_PMU_APB_BASE, 0x00F0)
78 #define REG_PMU_APB_DDR_CHN_SLEEP_CTRL1 SCI_ADDR(REGS_PMU_APB_BASE, 0x00F4)
79 #define REG_PMU_APB_BISR_CFG            SCI_ADDR(REGS_PMU_APB_BASE, 0x00F8)
80 #define REG_PMU_APB_CGM_AP_AUTO_GATE_EN SCI_ADDR(REGS_PMU_APB_BASE, 0x00FC)
81 #define REG_PMU_APB_CGM_GPU_MM_AUTO_GATE_EN SCI_ADDR(REGS_PMU_APB_BASE, 0x0100)
82 #define REG_PMU_APB_CGM_CP0_AUTO_GATE_EN SCI_ADDR(REGS_PMU_APB_BASE, 0x0104)
83 #define REG_PMU_APB_CGM_CP1_AUTO_GATE_EN SCI_ADDR(REGS_PMU_APB_BASE, 0x0108)
84 #define REG_PMU_APB_CGM_CP2_AUTO_GATE_EN SCI_ADDR(REGS_PMU_APB_BASE, 0x010C)
85 #define REG_PMU_APB_CGM_AP_EN           SCI_ADDR(REGS_PMU_APB_BASE, 0x00110)
86 #define REG_PMU_APB_CGM_GPU_MM_EN       SCI_ADDR(REGS_PMU_APB_BASE, 0x0114)
87 #define REG_PMU_APB_CGM_CP0_EN          SCI_ADDR(REGS_PMU_APB_BASE, 0x0118)
88 #define REG_PMU_APB_CGM_CP1_EN          SCI_ADDR(REGS_PMU_APB_BASE, 0x011C)
89 #define REG_PMU_APB_CGM_CP2_EN          SCI_ADDR(REGS_PMU_APB_BASE, 0x0120)
90 #define REG_PMU_APB_DDR_OP_MODE_CFG     SCI_ADDR(REGS_PMU_APB_BASE, 0x0124)
91 #define REG_PMU_APB_DDR_PHY_RET_CFG     SCI_ADDR(REGS_PMU_APB_BASE, 0x0128)
92
93 /* bits definitions for register REG_PMU_APB_PD_CA7_TOP_CFG */
94 #define BIT_PD_CA7_TOP_DBG_SHUTDOWN_EN  ( BIT(28) )
95 #define BIT_PD_CA7_TOP_FORCE_SHUTDOWN   ( BIT(25) )
96 #define BIT_PD_CA7_TOP_AUTO_SHUTDOWN_EN ( BIT(24) )
97 #define BITS_PD_CA7_TOP_PWR_ON_DLY(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
98 #define BITS_PD_CA7_TOP_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
99 #define BITS_PD_CA7_TOP_ISO_ON_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
100
101 /* bits definitions for register REG_PMU_APB_PD_CA7_C0_CFG */
102 #define BIT_PD_CA7_C0_DBG_SHUTDOWN_EN   ( BIT(28) )
103 #define BIT_PD_CA7_C0_FORCE_SHUTDOWN    ( BIT(25) )
104 #define BIT_PD_CA7_C0_AUTO_SHUTDOWN_EN  ( BIT(24) )
105 #define BITS_PD_CA7_C0_PWR_ON_DLY(_x_)  ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
106 #define BITS_PD_CA7_C0_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
107 #define BITS_PD_CA7_C0_ISO_ON_DLY(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
108
109 /* bits definitions for register REG_PMU_APB_PD_CA7_C1_CFG */
110 #define BIT_PD_CA7_C1_DBG_SHUTDOWN_EN   ( BIT(28) )
111 #define BIT_PD_CA7_C1_FORCE_SHUTDOWN    ( BIT(25) )
112 #define BIT_PD_CA7_C1_AUTO_SHUTDOWN_EN  ( BIT(24) )
113 #define BITS_PD_CA7_C1_PWR_ON_DLY(_x_)  ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
114 #define BITS_PD_CA7_C1_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
115 #define BITS_PD_CA7_C1_ISO_ON_DLY(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
116
117 /* bits definitions for register REG_PMU_APB_PD_CA7_C2_CFG */
118 #define BIT_PD_CA7_C2_DBG_SHUTDOWN_EN   ( BIT(28) )
119 #define BIT_PD_CA7_C2_FORCE_SHUTDOWN    ( BIT(25) )
120 #define BIT_PD_CA7_C2_AUTO_SHUTDOWN_EN  ( BIT(24) )
121 #define BITS_PD_CA7_C2_PWR_ON_DLY(_x_)  ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
122 #define BITS_PD_CA7_C2_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
123 #define BITS_PD_CA7_C2_ISO_ON_DLY(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
124
125 /* bits definitions for register REG_PMU_APB_PD_CA7_C3_CFG */
126 #define BIT_PD_CA7_C3_DBG_SHUTDOWN_EN   ( BIT(28) )
127 #define BIT_PD_CA7_C3_FORCE_SHUTDOWN    ( BIT(25) )
128 #define BIT_PD_CA7_C3_AUTO_SHUTDOWN_EN  ( BIT(24) )
129 #define BITS_PD_CA7_C3_PWR_ON_DLY(_x_)  ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
130 #define BITS_PD_CA7_C3_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
131 #define BITS_PD_CA7_C3_ISO_ON_DLY(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
132
133 /* bits definitions for register REG_PMU_APB_PD_AP_DISP_CFG */
134
135 /* bits definitions for register REG_PMU_APB_PD_AP_SYS_CFG */
136 #define BIT_PD_AP_SYS_FORCE_SHUTDOWN    ( BIT(25) )
137 #define BIT_PD_AP_SYS_AUTO_SHUTDOWN_EN  ( BIT(24) )
138 #define BITS_PD_AP_SYS_PWR_ON_DLY(_x_)  ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
139 #define BITS_PD_AP_SYS_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
140 #define BITS_PD_AP_SYS_ISO_ON_DLY(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
141
142 /* bits definitions for register REG_PMU_APB_PD_MM_TOP_CFG */
143 #define BIT_PD_MM_TOP_FORCE_SHUTDOWN    ( BIT(25) )
144 #define BIT_PD_MM_TOP_AUTO_SHUTDOWN_EN  ( BIT(24) )
145 #define BITS_PD_MM_TOP_PWR_ON_DLY(_x_)  ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
146 #define BITS_PD_MM_TOP_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
147 #define BITS_PD_MM_TOP_ISO_ON_DLY(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
148
149 /* bits definitions for register REG_PMU_APB_PD_GPU_TOP_CFG */
150 #define BIT_PD_GPU_TOP_FORCE_SHUTDOWN   ( BIT(25) )
151 #define BIT_PD_GPU_TOP_AUTO_SHUTDOWN_EN ( BIT(24) )
152 #define BITS_PD_GPU_TOP_PWR_ON_DLY(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
153 #define BITS_PD_GPU_TOP_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
154 #define BITS_PD_GPU_TOP_ISO_ON_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
155
156 /* bits definitions for register REG_PMU_APB_PD_CP0_ARM9_0_CFG */
157 #define BIT_PD_CP0_ARM9_0_FORCE_SHUTDOWN ( BIT(25) )
158 #define BIT_PD_CP0_ARM9_0_AUTO_SHUTDOWN_EN ( BIT(24) )
159 #define BITS_PD_CP0_ARM9_0_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
160 #define BITS_PD_CP0_ARM9_0_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
161 #define BITS_PD_CP0_ARM9_0_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
162
163 /* bits definitions for register REG_PMU_APB_PD_CP0_ARM9_1_CFG */
164 #define BIT_PD_CP0_ARM9_1_FORCE_SHUTDOWN ( BIT(25) )
165 #define BIT_PD_CP0_ARM9_1_AUTO_SHUTDOWN_EN ( BIT(24) )
166 #define BITS_PD_CP0_ARM9_1_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
167 #define BITS_PD_CP0_ARM9_1_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
168 #define BITS_PD_CP0_ARM9_1_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
169
170 /* bits definitions for register REG_PMU_APB_PD_CP0_ARM9_2_CFG */
171 #define BIT_PD_CP0_ARM9_2_FORCE_SHUTDOWN ( BIT(25) )
172 #define BIT_PD_CP0_ARM9_2_AUTO_SHUTDOWN_EN ( BIT(24) )
173 #define BITS_PD_CP0_ARM9_2_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
174 #define BITS_PD_CP0_ARM9_2_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
175 #define BITS_PD_CP0_ARM9_2_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
176
177 /* bits definitions for register REG_PMU_APB_PD_CP0_HU3GE_CFG */
178 #define BIT_PD_CP0_HU3GE_FORCE_SHUTDOWN ( BIT(25) )
179 #define BIT_PD_CP0_HU3GE_AUTO_SHUTDOWN_EN ( BIT(24) )
180 #define BITS_PD_CP0_HU3GE_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
181 #define BITS_PD_CP0_HU3GE_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
182 #define BITS_PD_CP0_HU3GE_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
183
184 /* bits definitions for register REG_PMU_APB_PD_CP0_GSM_CFG */
185 #define BIT_PD_CP0_GSM_FORCE_SHUTDOWN   ( BIT(25) )
186 #define BIT_PD_CP0_GSM_AUTO_SHUTDOWN_EN ( BIT(24) )
187 #define BITS_PD_CP0_GSM_PWR_ON_DLY(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
188 #define BITS_PD_CP0_GSM_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
189 #define BITS_PD_CP0_GSM_ISO_ON_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
190
191 /* bits definitions for register REG_PMU_APB_PD_CP0_L1RAM_CFG */
192 #define BIT_PD_CP0_L1RAM_FORCE_SHUTDOWN ( BIT(25) )
193 #define BIT_PD_CP0_L1RAM_AUTO_SHUTDOWN_EN ( BIT(24) )
194 #define BITS_PD_CP0_L1RAM_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
195 #define BITS_PD_CP0_L1RAM_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
196 #define BITS_PD_CP0_L1RAM_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
197
198 /* bits definitions for register REG_PMU_APB_PD_CP0_SYS_CFG */
199 #define BIT_CP0_FORCE_DEEP_SLEEP        ( BIT(28) )
200 #define BIT_PD_CP0_SYS_FORCE_SHUTDOWN   ( BIT(25) )
201 #define BITS_PD_CP0_SYS_PWR_ON_DLY(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
202 #define BITS_PD_CP0_SYS_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
203 #define BITS_PD_CP0_SYS_ISO_ON_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
204
205 /* bits definitions for register REG_PMU_APB_PD_CP1_ARM9_CFG */
206 #define BIT_PD_CP1_ARM9_FORCE_SHUTDOWN  ( BIT(25) )
207 #define BIT_PD_CP1_ARM9_AUTO_SHUTDOWN_EN ( BIT(24) )
208 #define BITS_PD_CP1_ARM9_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
209 #define BITS_PD_CP1_ARM9_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
210 #define BITS_PD_CP1_ARM9_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
211
212 /* bits definitions for register REG_PMU_APB_PD_CP1_GSM_CFG */
213 #define BIT_PD_CP1_GSM_FORCE_SHUTDOWN   ( BIT(25) )
214 #define BIT_PD_CP1_GSM_AUTO_SHUTDOWN_EN ( BIT(24) )
215 #define BITS_PD_CP1_GSM_PWR_ON_DLY(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
216 #define BITS_PD_CP1_GSM_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
217 #define BITS_PD_CP1_GSM_ISO_ON_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
218
219 /* bits definitions for register REG_PMU_APB_PD_CP1_TD_CFG */
220 #define BIT_PD_CP1_TD_FORCE_SHUTDOWN    ( BIT(25) )
221 #define BIT_PD_CP1_TD_AUTO_SHUTDOWN_EN  ( BIT(24) )
222 #define BITS_PD_CP1_TD_PWR_ON_DLY(_x_)  ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
223 #define BITS_PD_CP1_TD_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
224 #define BITS_PD_CP1_TD_ISO_ON_DLY(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
225
226 /* bits definitions for register REG_PMU_APB_PD_CP1_L1RAM_CFG */
227 #define BIT_PD_CP1_L1RAM_FORCE_SHUTDOWN ( BIT(25) )
228 #define BIT_PD_CP1_L1RAM_AUTO_SHUTDOWN_EN ( BIT(24) )
229 #define BITS_PD_CP1_L1RAM_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
230 #define BITS_PD_CP1_L1RAM_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
231 #define BITS_PD_CP1_L1RAM_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
232
233 /* bits definitions for register REG_PMU_APB_PD_CP1_SYS_CFG */
234 #define BIT_CP1_FORCE_DEEP_SLEEP        ( BIT(28) )
235 #define BIT_PD_CP1_SYS_FORCE_SHUTDOWN   ( BIT(25) )
236 #define BITS_PD_CP1_SYS_PWR_ON_DLY(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
237 #define BITS_PD_CP1_SYS_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
238 #define BITS_PD_CP1_SYS_ISO_ON_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
239
240 /* bits definitions for register REG_PMU_APB_PD_CP2_ARM9_CFG */
241 #define BIT_PD_CP2_ARM9_FORCE_SHUTDOWN  ( BIT(25) )
242 #define BIT_PD_CP2_ARM9_AUTO_SHUTDOWN_EN ( BIT(24) )
243 #define BITS_PD_CP2_ARM9_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
244 #define BITS_PD_CP2_ARM9_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
245 #define BITS_PD_CP2_ARM9_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
246
247 /* bits definitions for register REG_PMU_APB_PD_CP2_WIFI_CFG */
248 #define BIT_PD_CP2_WIFI_FORCE_SHUTDOWN  ( BIT(25) )
249 #define BIT_PD_CP2_WIFI_AUTO_SHUTDOWN_EN ( BIT(24) )
250 #define BITS_PD_CP2_WIFI_PWR_ON_DLY(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
251 #define BITS_PD_CP2_WIFI_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
252 #define BITS_PD_CP2_WIFI_ISO_ON_DLY(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
253
254 /* bits definitions for register REG_PMU_APB_AP_WAKEUP_POR_CFG */
255 #define BIT_AP_WAKEUP_POR_N             ( BIT(0) )
256
257 /* bits definitions for register REG_PMU_APB_PD_CP2_SYS_CFG */
258 #define BIT_CP2_FORCE_DEEP_SLEEP        ( BIT(28) )
259 #define BIT_PD_CP2_SYS_FORCE_SHUTDOWN   ( BIT(25) )
260 #define BITS_PD_CP2_SYS_PWR_ON_DLY(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
261 #define BITS_PD_CP2_SYS_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
262 #define BITS_PD_CP2_SYS_ISO_ON_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
263
264 /* bits definitions for register REG_PMU_APB_PD_PUB_SYS_CFG */
265 #define BIT_PD_PUB_SYS_FORCE_SHUTDOWN   ( BIT(25) )
266 #define BIT_PD_PUB_SYS_AUTO_SHUTDOWN_EN ( BIT(24) )
267 #define BITS_PD_PUB_SYS_PWR_ON_DLY(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
268 #define BITS_PD_PUB_SYS_PWR_ON_SEQ_DLY(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
269 #define BITS_PD_PUB_SYS_ISO_ON_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
270
271 /* bits definitions for register REG_PMU_APB_XTL_WAIT_CNT */
272 #define BITS_XTL1_WAIT_CNT(_x_)         ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
273 #define BITS_XTL0_WAIT_CNT(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
274
275 /* bits definitions for register REG_PMU_APB_XTLBUF_WAIT_CNT */
276 #define BITS_XTLBUF1_WAIT_CNT(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
277 #define BITS_XTLBUF0_WAIT_CNT(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
278
279 /* bits definitions for register REG_PMU_APB_PLL_WAIT_CNT1 */
280 #define BITS_WPLL_WAIT_CNT(_x_)         ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
281 #define BITS_TDPLL_WAIT_CNT(_x_)        ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
282 #define BITS_DPLL_WAIT_CNT(_x_)         ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
283 #define BITS_MPLL_WAIT_CNT(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
284
285 /* bits definitions for register REG_PMU_APB_PLL_WAIT_CNT2 */
286 #define BITS_WIFIPLL2_WAIT_CNT(_x_)     ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
287 #define BITS_WIFIPLL1_WAIT_CNT(_x_)     ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
288 #define BITS_CPLL_WAIT_CNT(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
289
290 /* bits definitions for register REG_PMU_APB_XTL0_REL_CFG */
291 #define BIT_XTL0_CP2_SEL                ( BIT(3) )
292 #define BIT_XTL0_CP1_SEL                ( BIT(2) )
293 #define BIT_XTL0_CP0_SEL                ( BIT(1) )
294 #define BIT_XTL0_AP_SEL                 ( BIT(0) )
295
296 /* bits definitions for register REG_PMU_APB_XTL1_REL_CFG */
297 #define BIT_XTL1_CP2_SEL                ( BIT(3) )
298 #define BIT_XTL1_CP1_SEL                ( BIT(2) )
299 #define BIT_XTL1_CP0_SEL                ( BIT(1) )
300 #define BIT_XTL1_AP_SEL                 ( BIT(0) )
301
302 /* bits definitions for register REG_PMU_APB_XTL2_REL_CFG */
303 #define BIT_XTL2_CP2_SEL                ( BIT(3) )
304 #define BIT_XTL2_CP1_SEL                ( BIT(2) )
305 #define BIT_XTL2_CP0_SEL                ( BIT(1) )
306 #define BIT_XTL2_AP_SEL                 ( BIT(0) )
307
308 /* bits definitions for register REG_PMU_APB_XTLBUF0_REL_CFG */
309 #define BIT_XTLBUF0_CP2_SEL             ( BIT(3) )
310 #define BIT_XTLBUF0_CP1_SEL             ( BIT(2) )
311 #define BIT_XTLBUF0_CP0_SEL             ( BIT(1) )
312 #define BIT_XTLBUF0_AP_SEL              ( BIT(0) )
313
314 /* bits definitions for register REG_PMU_APB_XTLBUF1_REL_CFG */
315 #define BIT_XTLBUF1_CP2_SEL             ( BIT(3) )
316 #define BIT_XTLBUF1_CP1_SEL             ( BIT(2) )
317 #define BIT_XTLBUF1_CP0_SEL             ( BIT(1) )
318 #define BIT_XTLBUF1_AP_SEL              ( BIT(0) )
319
320 /* bits definitions for register REG_PMU_APB_MPLL_REL_CFG */
321 #define BIT_MPLL_REF_SEL                ( BIT(4) )
322 #define BIT_MPLL_CP2_SEL                ( BIT(3) )
323 #define BIT_MPLL_CP1_SEL                ( BIT(2) )
324 #define BIT_MPLL_CP0_SEL                ( BIT(1) )
325 #define BIT_MPLL_AP_SEL                 ( BIT(0) )
326
327 /* bits definitions for register REG_PMU_APB_DPLL_REL_CFG */
328 #define BIT_DPLL_REF_SEL                ( BIT(4) )
329 #define BIT_DPLL_CP2_SEL                ( BIT(3) )
330 #define BIT_DPLL_CP1_SEL                ( BIT(2) )
331 #define BIT_DPLL_CP0_SEL                ( BIT(1) )
332 #define BIT_DPLL_AP_SEL                 ( BIT(0) )
333
334 /* bits definitions for register REG_PMU_APB_TDPLL_REL_CFG */
335 #define BIT_TDPLL_REF_SEL               ( BIT(4) )
336 #define BIT_TDPLL_CP2_SEL               ( BIT(3) )
337 #define BIT_TDPLL_CP1_SEL               ( BIT(2) )
338 #define BIT_TDPLL_CP0_SEL               ( BIT(1) )
339 #define BIT_TDPLL_AP_SEL                ( BIT(0) )
340
341 /* bits definitions for register REG_PMU_APB_WPLL_REL_CFG */
342 #define BIT_WPLL_REF_SEL                ( BIT(4) )
343 #define BIT_WPLL_CP2_SEL                ( BIT(3) )
344 #define BIT_WPLL_CP1_SEL                ( BIT(2) )
345 #define BIT_WPLL_CP0_SEL                ( BIT(1) )
346 #define BIT_WPLL_AP_SEL                 ( BIT(0) )
347
348 /* bits definitions for register REG_PMU_APB_CPLL_REL_CFG */
349 #define BIT_CPLL_REF_SEL                ( BIT(4) )
350 #define BIT_CPLL_CP2_SEL                ( BIT(3) )
351 #define BIT_CPLL_CP1_SEL                ( BIT(2) )
352 #define BIT_CPLL_CP0_SEL                ( BIT(1) )
353 #define BIT_CPLL_AP_SEL                 ( BIT(0) )
354
355 /* bits definitions for register REG_PMU_APB_WIFIPLL1_REL_CFG */
356 #define BIT_WIFIPLL1_REF_SEL            ( BIT(4) )
357 #define BIT_WIFIPLL1_CP2_SEL            ( BIT(3) )
358 #define BIT_WIFIPLL1_CP1_SEL            ( BIT(2) )
359 #define BIT_WIFIPLL1_CP0_SEL            ( BIT(1) )
360 #define BIT_WIFIPLL1_AP_SEL             ( BIT(0) )
361
362 /* bits definitions for register REG_PMU_APB_WIFIPLL2_REL_CFG */
363 #define BIT_WIFIPLL2_REF_SEL            ( BIT(4) )
364 #define BIT_WIFIPLL2_CP2_SEL            ( BIT(3) )
365 #define BIT_WIFIPLL2_CP1_SEL            ( BIT(2) )
366 #define BIT_WIFIPLL2_CP0_SEL            ( BIT(1) )
367 #define BIT_WIFIPLL2_AP_SEL             ( BIT(0) )
368
369 /* bits definitions for register REG_PMU_APB_CP_SOFT_RST */
370 #define BIT_PUB_SOFT_RST                ( BIT(6) )
371 #define BIT_AP_SOFT_RST                 ( BIT(5) )
372 #define BIT_GPU_SOFT_RST                ( BIT(4) )
373 #define BIT_MM_SOFT_RST                 ( BIT(3) )
374 #define BIT_CP2_SOFT_RST                ( BIT(2) )
375 #define BIT_CP1_SOFT_RST                ( BIT(1) )
376 #define BIT_CP0_SOFT_RST                ( BIT(0) )
377
378 /* bits definitions for register REG_PMU_APB_CP_SLP_STATUS_DBG0 */
379 #define BITS_CP1_DEEP_SLP_DBG(_x_)      ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)|BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
380 #define BITS_CP0_DEEP_SLP_DBG(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
381
382 /* bits definitions for register REG_PMU_APB_CP_SLP_STATUS_DBG1 */
383 #define BITS_CP2_DEEP_SLP_DBG(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
384
385 /* bits definitions for register REG_PMU_APB_PWR_STATUS0_DBG */
386 #define BITS_PD_MM_TOP_STATE(_x_)       ( (_x_) << 28 & (BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
387 #define BITS_PD_GPU_TOP_STATE(_x_)      ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
388 #define BITS_PD_CA7_C3_STATE(_x_)       ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
389 #define BITS_PD_CA7_C2_STATE(_x_)       ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
390 #define BITS_PD_CA7_C1_STATE(_x_)       ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
391 #define BITS_PD_CA7_C0_STATE(_x_)       ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
392 #define BITS_PD_CA7_TOP_STATE(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
393
394 /* bits definitions for register REG_PMU_APB_PWR_STATUS1_DBG */
395 #define BITS_PD_CP0_SYS_STATE(_x_)      ( (_x_) << 28 & (BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
396 #define BITS_PD_CP0_L1RAM_STATE(_x_)    ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
397 #define BITS_PD_CP0_GSM_STATE(_x_)      ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
398 #define BITS_PD_CP0_HU3GE_STATE(_x_)    ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
399 #define BITS_PD_CP0_ARM9_2_STATE(_x_)   ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
400 #define BITS_PD_CP0_ARM9_1_STATE(_x_)   ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
401 #define BITS_PD_CP0_ARM9_0_STATE(_x_)   ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
402 #define BITS_PD_AP_SYS_STATE(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
403
404 /* bits definitions for register REG_PMU_APB_PWR_STATUS2_DBG */
405 #define BITS_PD_CP2_WIFI_STATE(_x_)     ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
406 #define BITS_PD_CP2_ARM9_STATE(_x_)     ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
407 #define BITS_PD_CP1_SYS_STATE(_x_)      ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
408 #define BITS_PD_CP1_L1RAM_STATE(_x_)    ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
409 #define BITS_PD_CP1_TD_STATE(_x_)       ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
410 #define BITS_PD_CP1_GSM_STATE(_x_)      ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
411 #define BITS_PD_CP1_ARM9_STATE(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
412
413 /* bits definitions for register REG_PMU_APB_PWR_STATUS3_DBG */
414 #define BITS_PD_PUB_SYS_STATE(_x_)      ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
415 #define BITS_PD_CP2_SYS_STATE(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
416
417 /* bits definitions for register REG_PMU_APB_SLEEP_CTRL */
418 #define BIT_CP2_SLEEP_XTL_ON            ( BIT(11) )
419 #define BIT_CP1_SLEEP_XTL_ON            ( BIT(10) )
420 #define BIT_CP0_SLEEP_XTL_ON            ( BIT(9) )
421 #define BIT_AP_SLEEP_XTL_ON             ( BIT(8) )
422 #define BIT_DISP_DEEP_SLEEP             ( BIT(6) )
423 #define BIT_GPU_DEEP_SLEEP              ( BIT(5) )
424 #define BIT_MM_DEEP_SLEEP               ( BIT(4) )
425 #define BIT_CP2_DEEP_SLEEP              ( BIT(3) )
426 #define BIT_CP1_DEEP_SLEEP              ( BIT(2) )
427 #define BIT_CP0_DEEP_SLEEP              ( BIT(1) )
428 #define BIT_AP_DEEP_SLEEP               ( BIT(0) )
429
430 /* bits definitions for register REG_PMU_APB_DDR_SLEEP_CTRL */
431 #define BIT_DDR_PUBL_APB_SOFT_RST       ( BIT(12) )
432 #define BIT_DDR_UMCTL_APB_SOFT_RST      ( BIT(11) )
433 #define BIT_DDR_PUBL_SOFT_RST           ( BIT(10) )
434 #define BIT_DDR_UMCTL_SOFT_RST          ( BIT(9) )
435 #define BIT_DDR_PHY_SOFT_RST            ( BIT(8) )
436 #define BIT_DDR_PHY_AUTO_GATE_EN        ( BIT(6) )
437 #define BIT_DDR_PUBL_AUTO_GATE_EN       ( BIT(5) )
438 #define BIT_DDR_UMCTL_AUTO_GATE_EN      ( BIT(4) )
439 #define BIT_DDR_PHY_EB                  ( BIT(2) )
440 #define BIT_DDR_UMCTL_EB                ( BIT(1) )
441 #define BIT_DDR_PUBL_EB                 ( BIT(0) )
442
443 /* bits definitions for register REG_PMU_APB_SLEEP_STATUS */
444 #define BITS_CP2_SLP_STATUS(_x_)        ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
445 #define BITS_CP1_SLP_STATUS(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
446 #define BITS_CP0_SLP_STATUS(_x_)        ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
447 #define BITS_AP_SLP_STATUS(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
448
449 /* bits definitions for register REG_PMU_APB_PLL_DIV_AUTO_GATE_EN */
450 #define BIT_WIFIPLL2_DIV_AUTO_GATE_EN   ( BIT(6) )
451 #define BIT_WIFIPLL1_DIV_AUTO_GATE_EN   ( BIT(5) )
452 #define BIT_WPLL_DIV_AUTO_GATE_EN       ( BIT(4) )
453 #define BIT_TDPLL_DIV_AUTO_GATE_EN      ( BIT(3) )
454 #define BIT_CPLL_DIV_AUTO_GATE_EN       ( BIT(2) )
455 #define BIT_DPLL_DIV_AUTO_GATE_EN       ( BIT(1) )
456 #define BIT_MPLL_DIV_AUTO_GATE_EN       ( BIT(0) )
457
458 /* bits definitions for register REG_PMU_APB_PLL_DIV_EN1 */
459 #define BIT_WIFIPLL2_80M_EN             ( BIT(31) )
460 #define BIT_WIFIPLL2_160M_EN            ( BIT(30) )
461 #define BIT_WIFIPLL2_120M_EN            ( BIT(29) )
462 #define BIT_WIFIPLL1_20M_EN             ( BIT(28) )
463 #define BIT_WIFIPLL1_40M_EN             ( BIT(27) )
464 #define BIT_WIFIPLL1_80M_EN             ( BIT(26) )
465 #define BIT_WIFIPLL1_44M_EN             ( BIT(25) )
466 #define BIT_WPLL_76M8_EN                ( BIT(24) )
467 #define BIT_WPLL_51M2_EN                ( BIT(23) )
468 #define BIT_WPLL_102M4_EN               ( BIT(22) )
469 #define BIT_WPLL_307M2_EN               ( BIT(21) )
470 #define BIT_WPLL_460M8_EN               ( BIT(20) )
471 #define BIT_CPLL_52M_EN                 ( BIT(19) )
472 #define BIT_CPLL_104M_EN                ( BIT(18) )
473 #define BIT_CPLL_208M_EN                ( BIT(17) )
474 #define BIT_CPLL_312M_EN                ( BIT(16) )
475 #define BIT_TDPLL_38M4_EN               ( BIT(15) )
476 #define BIT_TDPLL_76M8_EN               ( BIT(14) )
477 #define BIT_TDPLL_51M2_EN               ( BIT(13) )
478 #define BIT_TDPLL_153M6_EN              ( BIT(12) )
479 #define BIT_TDPLL_64M_EN                ( BIT(11) )
480 #define BIT_TDPLL_128M_EN               ( BIT(10) )
481 #define BIT_TDPLL_256M_EN               ( BIT(9) )
482 #define BIT_TDPLL_12M_EN                ( BIT(8) )
483 #define BIT_TDPLL_24M_EN                ( BIT(7) )
484 #define BIT_TDPLL_48M_EN                ( BIT(6) )
485 #define BIT_TDPLL_96M_EN                ( BIT(5) )
486 #define BIT_TDPLL_192M_EN               ( BIT(4) )
487 #define BIT_TDPLL_384M_EN               ( BIT(3) )
488 #define BIT_DPLL_44M_EN                 ( BIT(2) )
489 #define BIT_MPLL_37M5_EN                ( BIT(1) )
490 #define BIT_MPLL_300M_EN                ( BIT(0) )
491
492 /* bits definitions for register REG_PMU_APB_PLL_DIV_EN2 */
493 #define BIT_WIFIPLL2_20M_EN             ( BIT(1) )
494 #define BIT_WIFIPLL2_40M_EN             ( BIT(0) )
495
496 /* bits definitions for register REG_PMU_APB_CA7_TOP_CFG */
497 #define BIT_CA7_L2RSTDISABLE            ( BIT(0) )
498
499 /* bits definitions for register REG_PMU_APB_CA7_C0_CFG */
500 #define BIT_CA7_VINITHI_C0              ( BIT(0) )
501
502 /* bits definitions for register REG_PMU_APB_CA7_C1_CFG */
503 #define BIT_CA7_VINITHI_C1              ( BIT(0) )
504
505 /* bits definitions for register REG_PMU_APB_CA7_C2_CFG */
506 #define BIT_CA7_VINITHI_C2              ( BIT(0) )
507
508 /* bits definitions for register REG_PMU_APB_CA7_C3_CFG */
509 #define BIT_CA7_VINITHI_C3              ( BIT(0) )
510
511 /* bits definitions for register REG_PMU_APB_DDR_CHN_SLEEP_CTRL0 */
512 #define BIT_DDR_CHN9_AXI_LP_EN          ( BIT(25) )
513 #define BIT_DDR_CHN8_AXI_LP_EN          ( BIT(24) )
514 #define BIT_DDR_CHN7_AXI_LP_EN          ( BIT(23) )
515 #define BIT_DDR_CHN6_AXI_LP_EN          ( BIT(22) )
516 #define BIT_DDR_CHN5_AXI_LP_EN          ( BIT(21) )
517 #define BIT_DDR_CHN4_AXI_LP_EN          ( BIT(20) )
518 #define BIT_DDR_CHN3_AXI_LP_EN          ( BIT(19) )
519 #define BIT_DDR_CHN2_AXI_LP_EN          ( BIT(18) )
520 #define BIT_DDR_CHN1_AXI_LP_EN          ( BIT(17) )
521 #define BIT_DDR_CHN0_AXI_LP_EN          ( BIT(16) )
522 #define BIT_DDR_CHN9_CGM_SEL            ( BIT(9) )
523 #define BIT_DDR_CHN8_CGM_SEL            ( BIT(8) )
524 #define BIT_DDR_CHN7_CGM_SEL            ( BIT(7) )
525 #define BIT_DDR_CHN6_CGM_SEL            ( BIT(6) )
526 #define BIT_DDR_CHN5_CGM_SEL            ( BIT(5) )
527 #define BIT_DDR_CHN4_CGM_SEL            ( BIT(4) )
528 #define BIT_DDR_CHN3_CGM_SEL            ( BIT(3) )
529 #define BIT_DDR_CHN2_CGM_SEL            ( BIT(2) )
530 #define BIT_DDR_CHN1_CGM_SEL            ( BIT(1) )
531 #define BIT_DDR_CHN0_CGM_SEL            ( BIT(0) )
532
533 /* bits definitions for register REG_PMU_APB_DDR_CHN_SLEEP_CTRL1 */
534 #define BIT_DDR_CHN9_AXI_STOP_SEL       ( BIT(9) )
535 #define BIT_DDR_CHN8_AXI_STOP_SEL       ( BIT(8) )
536 #define BIT_DDR_CHN7_AXI_STOP_SEL       ( BIT(7) )
537 #define BIT_DDR_CHN6_AXI_STOP_SEL       ( BIT(6) )
538 #define BIT_DDR_CHN5_AXI_STOP_SEL       ( BIT(5) )
539 #define BIT_DDR_CHN4_AXI_STOP_SEL       ( BIT(4) )
540 #define BIT_DDR_CHN3_AXI_STOP_SEL       ( BIT(3) )
541 #define BIT_DDR_CHN2_AXI_STOP_SEL       ( BIT(2) )
542 #define BIT_DDR_CHN1_AXI_STOP_SEL       ( BIT(1) )
543 #define BIT_DDR_CHN0_AXI_STOP_SEL       ( BIT(0) )
544
545 /* bits definitions for register REG_PMU_APB_BISR_CFG */
546 #define BIT_PD_CP1_TD_BISR_DONE         ( BIT(29) )
547 #define BIT_PD_CP1_SYS_BISR_DONE        ( BIT(28) )
548 #define BIT_PD_CP0_HU3GE_BISR_DONE      ( BIT(27) )
549 #define BIT_PD_CP0_SYS_BISR_DONE        ( BIT(26) )
550 #define BIT_PD_MM_TOP_BISR_DONE         ( BIT(25) )
551 #define BIT_PD_GPU_TOP_BISR_DONE        ( BIT(24) )
552 #define BIT_PD_CP1_TD_BISR_BUSY         ( BIT(21) )
553 #define BIT_PD_CP1_SYS_BISR_BUSY        ( BIT(20) )
554 #define BIT_PD_CP0_HU3GE_BISR_BUSY      ( BIT(19) )
555 #define BIT_PD_CP0_SYS_BISR_BUSY        ( BIT(18) )
556 #define BIT_PD_MM_TOP_BISR_BUSY         ( BIT(17) )
557 #define BIT_PD_GPU_TOP_BISR_BUSY        ( BIT(16) )
558 #define BIT_PD_CP1_TD_BISR_FORCE_EN     ( BIT(13) )
559 #define BIT_PD_CP1_SYS_BISR_FORCE_EN    ( BIT(12) )
560 #define BIT_PD_CP0_HU3GE_BISR_FORCE_EN  ( BIT(11) )
561 #define BIT_PD_CP0_SYS_BISR_FORCE_EN    ( BIT(10) )
562 #define BIT_PD_MM_TOP_BISR_FORCE_EN     ( BIT(9) )
563 #define BIT_PD_GPU_TOP_BISR_FORCE_EN    ( BIT(8) )
564 #define BIT_PD_CP1_TD_BISR_FORCE_BYP    ( BIT(5) )
565 #define BIT_PD_CP1_SYS_BISR_FORCE_BYP   ( BIT(4) )
566 #define BIT_PD_CP0_HU3GE_BISR_FORCE_BYP ( BIT(3) )
567 #define BIT_PD_CP0_SYS_BISR_FORCE_BYP   ( BIT(2) )
568 #define BIT_PD_MM_TOP_BISR_FORCE_BYP    ( BIT(1) )
569 #define BIT_PD_GPU_TOP_BISR_FORCE_BYP   ( BIT(0) )
570
571 /* bits definitions for register REG_PMU_APB_CGM_AP_AUTO_GATE_EN */
572 #define BIT_CGM_12M_AP_AUTO_GATE_EN     ( BIT(19) )
573 #define BIT_CGM_24M_AP_AUTO_GATE_EN     ( BIT(18) )
574 #define BIT_CGM_48M_AP_AUTO_GATE_EN     ( BIT(17) )
575 #define BIT_CGM_51M2_AP_AUTO_GATE_EN    ( BIT(16) )
576 #define BIT_CGM_64M_AP_AUTO_GATE_EN     ( BIT(15) )
577 #define BIT_CGM_76M8_AP_AUTO_GATE_EN    ( BIT(14) )
578 #define BIT_CGM_96M_AP_AUTO_GATE_EN     ( BIT(13) )
579 #define BIT_CGM_128M_AP_AUTO_GATE_EN    ( BIT(12) )
580 #define BIT_CGM_153M6_AP_AUTO_GATE_EN   ( BIT(11) )
581 #define BIT_CGM_192M_AP_AUTO_GATE_EN    ( BIT(10) )
582 #define BIT_CGM_256M_AP_AUTO_GATE_EN    ( BIT(9) )
583 #define BIT_CGM_384M_AP_AUTO_GATE_EN    ( BIT(8) )
584 #define BIT_CGM_312M_AP_AUTO_GATE_EN    ( BIT(7) )
585 #define BIT_CGM_MPLL_AP_AUTO_GATE_EN    ( BIT(6) )
586 #define BIT_CGM_WPLL_AP_AUTO_GATE_EN    ( BIT(5) )
587 #define BIT_CGM_WIFIPLL1_AP_AUTO_GATE_EN ( BIT(4) )
588 #define BIT_CGM_TDPLL_AP_AUTO_GATE_EN   ( BIT(3) )
589 #define BIT_CGM_CPLL_AP_AUTO_GATE_EN    ( BIT(2) )
590 #define BIT_CGM_DPLL_AP_AUTO_GATE_EN    ( BIT(1) )
591 #define BIT_CGM_26M_AP_AUTO_GATE_EN     ( BIT(0) )
592
593 /* bits definitions for register REG_PMU_APB_CGM_GPU_MM_AUTO_GATE_EN */
594 #define BIT_CGM_12M_MM_AUTO_GATE_EN     ( BIT(26) )
595 #define BIT_CGM_24M_MM_AUTO_GATE_EN     ( BIT(25) )
596 #define BIT_CGM_48M_MM_AUTO_GATE_EN     ( BIT(24) )
597 #define BIT_CGM_64M_MM_AUTO_GATE_EN     ( BIT(23) )
598 #define BIT_CGM_76M8_MM_AUTO_GATE_EN    ( BIT(22) )
599 #define BIT_CGM_96M_MM_AUTO_GATE_EN     ( BIT(21) )
600 #define BIT_CGM_128M_MM_AUTO_GATE_EN    ( BIT(20) )
601 #define BIT_CGM_153M6_MM_AUTO_GATE_EN   ( BIT(19) )
602 #define BIT_CGM_192M_MM_AUTO_GATE_EN    ( BIT(18) )
603 #define BIT_CGM_256M_MM_AUTO_GATE_EN    ( BIT(17) )
604 #define BIT_CGM_26M_MM_AUTO_GATE_EN     ( BIT(16) )
605 #define BIT_CGM_256M_GPU_AUTO_GATE_EN   ( BIT(3) )
606 #define BIT_CGM_208M_GPU_AUTO_GATE_EN   ( BIT(2) )
607 #define BIT_CGM_312M_GPU_AUTO_GATE_EN   ( BIT(1) )
608 #define BIT_CGM_300M_GPU_AUTO_GATE_EN   ( BIT(0) )
609
610 /* bits definitions for register REG_PMU_APB_CGM_CP0_AUTO_GATE_EN */
611 #define BIT_CGM_460M8_CP0W_AUTO_GATE_EN ( BIT(13) )
612 #define BIT_CGM_307M2_CP0W_AUTO_GATE_EN ( BIT(12) )
613 #define BIT_CGM_51M2_CP0W_AUTO_GATE_EN  ( BIT(11) )
614 #define BIT_CGM_76M8_CP0W_AUTO_GATE_EN  ( BIT(10) )
615 #define BIT_CGM_102M4_CP0W_AUTO_GATE_EN ( BIT(9) )
616 #define BIT_CGM_192M_CP0_AUTO_GATE_EN   ( BIT(8) )
617 #define BIT_CGM_51M2_CP0_AUTO_GATE_EN   ( BIT(7) )
618 #define BIT_CGM_76M8_CP0_AUTO_GATE_EN   ( BIT(6) )
619 #define BIT_CGM_153M6_CP0_AUTO_GATE_EN  ( BIT(5) )
620 #define BIT_CGM_48M_CP0_AUTO_GATE_EN    ( BIT(4) )
621 #define BIT_CGM_64M_CP0_AUTO_GATE_EN    ( BIT(3) )
622 #define BIT_CGM_96M_CP0_AUTO_GATE_EN    ( BIT(2) )
623 #define BIT_CGM_128M_CP0_AUTO_GATE_EN   ( BIT(1) )
624 #define BIT_CGM_26M_CP0_AUTO_GATE_EN    ( BIT(0) )
625
626 /* bits definitions for register REG_PMU_APB_CGM_CP1_AUTO_GATE_EN */
627 #define BIT_CGM_312M_CP1_AUTO_GATE_EN   ( BIT(10) )
628 #define BIT_CGM_256M_CP1_AUTO_GATE_EN   ( BIT(9) )
629 #define BIT_CGM_192M_CP1_AUTO_GATE_EN   ( BIT(8) )
630 #define BIT_CGM_51M2_CP1_AUTO_GATE_EN   ( BIT(7) )
631 #define BIT_CGM_76M8_CP1_AUTO_GATE_EN   ( BIT(6) )
632 #define BIT_CGM_153M6_CP1_AUTO_GATE_EN  ( BIT(5) )
633 #define BIT_CGM_48M_CP1_AUTO_GATE_EN    ( BIT(4) )
634 #define BIT_CGM_96M_CP1_AUTO_GATE_EN    ( BIT(3) )
635 #define BIT_CGM_64M_CP1_AUTO_GATE_EN    ( BIT(2) )
636 #define BIT_CGM_128M_CP1_AUTO_GATE_EN   ( BIT(1) )
637 #define BIT_CGM_26M_CP1_AUTO_GATE_EN    ( BIT(0) )
638
639 /* bits definitions for register REG_PMU_APB_CGM_CP2_AUTO_GATE_EN */
640 #define BIT_CGM_20M_CP2WF2_AUTO_GATE_EN ( BIT(11) )
641 #define BIT_CGM_80M_CP2WF2_AUTO_GATE_EN ( BIT(10) )
642 #define BIT_CGM_120M_CP2WF2_AUTO_GATE_EN ( BIT(9) )
643 #define BIT_CGM_160M_CP2WF2_AUTO_GATE_EN ( BIT(8) )
644 #define BIT_CGM_20M_CP2WF1_AUTO_GATE_EN ( BIT(7) )
645 #define BIT_CGM_44M_CP2WF1_AUTO_GATE_EN ( BIT(6) )
646 #define BIT_CGM_80M_CP2WF1_AUTO_GATE_EN ( BIT(5) )
647 #define BIT_CGM_256M_CP2_AUTO_GATE_EN   ( BIT(4) )
648 #define BIT_CGM_104M_CP2_AUTO_GATE_EN   ( BIT(3) )
649 #define BIT_CGM_208M_CP2_AUTO_GATE_EN   ( BIT(2) )
650 #define BIT_CGM_312M_CP2_AUTO_GATE_EN   ( BIT(1) )
651 #define BIT_CGM_26M_CP2_AUTO_GATE_EN    ( BIT(0) )
652
653 /* bits definitions for register REG_PMU_APB_CGM_AP_EN */
654 #define BIT_CGM_12M_AP_EN               ( BIT(19) )
655 #define BIT_CGM_24M_AP_EN               ( BIT(18) )
656 #define BIT_CGM_48M_AP_EN               ( BIT(17) )
657 #define BIT_CGM_51M2_AP_EN              ( BIT(16) )
658 #define BIT_CGM_64M_AP_EN               ( BIT(15) )
659 #define BIT_CGM_76M8_AP_EN              ( BIT(14) )
660 #define BIT_CGM_96M_AP_EN               ( BIT(13) )
661 #define BIT_CGM_128M_AP_EN              ( BIT(12) )
662 #define BIT_CGM_153M6_AP_EN             ( BIT(11) )
663 #define BIT_CGM_192M_AP_EN              ( BIT(10) )
664 #define BIT_CGM_256M_AP_EN              ( BIT(9) )
665 #define BIT_CGM_384M_AP_EN              ( BIT(8) )
666 #define BIT_CGM_312M_AP_EN              ( BIT(7) )
667 #define BIT_CGM_MPLL_AP_EN              ( BIT(6) )
668 #define BIT_CGM_WPLL_AP_EN              ( BIT(5) )
669 #define BIT_CGM_WIFIPLL1_AP_EN          ( BIT(4) )
670 #define BIT_CGM_TDPLL_AP_EN             ( BIT(3) )
671 #define BIT_CGM_CPLL_AP_EN              ( BIT(2) )
672 #define BIT_CGM_DPLL_AP_EN              ( BIT(1) )
673 #define BIT_CGM_26M_AP_EN               ( BIT(0) )
674
675 /* bits definitions for register REG_PMU_APB_CGM_GPU_MM_EN */
676 #define BIT_CGM_12M_MM_EN               ( BIT(26) )
677 #define BIT_CGM_24M_MM_EN               ( BIT(25) )
678 #define BIT_CGM_48M_MM_EN               ( BIT(24) )
679 #define BIT_CGM_64M_MM_EN               ( BIT(23) )
680 #define BIT_CGM_76M8_MM_EN              ( BIT(22) )
681 #define BIT_CGM_96M_MM_EN               ( BIT(21) )
682 #define BIT_CGM_128M_MM_EN              ( BIT(20) )
683 #define BIT_CGM_153M6_MM_EN             ( BIT(19) )
684 #define BIT_CGM_192M_MM_EN              ( BIT(18) )
685 #define BIT_CGM_256M_MM_EN              ( BIT(17) )
686 #define BIT_CGM_26M_MM_EN               ( BIT(16) )
687 #define BIT_CGM_256M_GPU_EN             ( BIT(3) )
688 #define BIT_CGM_208M_GPU_EN             ( BIT(2) )
689 #define BIT_CGM_312M_GPU_EN             ( BIT(1) )
690 #define BIT_CGM_300M_GPU_EN             ( BIT(0) )
691
692 /* bits definitions for register REG_PMU_APB_CGM_CP0_EN */
693 #define BIT_CGM_460M8_CP0W_EN           ( BIT(13) )
694 #define BIT_CGM_307M2_CP0W_EN           ( BIT(12) )
695 #define BIT_CGM_51M2_CP0W_EN            ( BIT(11) )
696 #define BIT_CGM_76M8_CP0W_EN            ( BIT(10) )
697 #define BIT_CGM_102M4_CP0W_EN           ( BIT(9) )
698 #define BIT_CGM_192M_CP0_EN             ( BIT(8) )
699 #define BIT_CGM_51M2_CP0_EN             ( BIT(7) )
700 #define BIT_CGM_76M8_CP0_EN             ( BIT(6) )
701 #define BIT_CGM_153M6_CP0_EN            ( BIT(5) )
702 #define BIT_CGM_48M_CP0_EN              ( BIT(4) )
703 #define BIT_CGM_64M_CP0_EN              ( BIT(3) )
704 #define BIT_CGM_96M_CP0_EN              ( BIT(2) )
705 #define BIT_CGM_128M_CP0_EN             ( BIT(1) )
706 #define BIT_CGM_26M_CP0_EN              ( BIT(0) )
707
708 /* bits definitions for register REG_PMU_APB_CGM_CP1_EN */
709 #define BIT_CGM_312M_CP1_EN             ( BIT(10) )
710 #define BIT_CGM_256M_CP1_EN             ( BIT(9) )
711 #define BIT_CGM_192M_CP1_EN             ( BIT(8) )
712 #define BIT_CGM_51M2_CP1_EN             ( BIT(7) )
713 #define BIT_CGM_76M8_CP1_EN             ( BIT(6) )
714 #define BIT_CGM_153M6_CP1_EN            ( BIT(5) )
715 #define BIT_CGM_48M_CP1_EN              ( BIT(4) )
716 #define BIT_CGM_96M_CP1_EN              ( BIT(3) )
717 #define BIT_CGM_64M_CP1_EN              ( BIT(2) )
718 #define BIT_CGM_128M_CP1_EN             ( BIT(1) )
719 #define BIT_CGM_26M_CP1_EN              ( BIT(0) )
720
721 /* bits definitions for register REG_PMU_APB_CGM_CP2_EN */
722 #define BIT_CGM_20M_CP2WF2_EN           ( BIT(11) )
723 #define BIT_CGM_80M_CP2WF2_EN           ( BIT(10) )
724 #define BIT_CGM_120M_CP2WF2_EN          ( BIT(9) )
725 #define BIT_CGM_160M_CP2WF2_EN          ( BIT(8) )
726 #define BIT_CGM_20M_CP2WF1_EN           ( BIT(7) )
727 #define BIT_CGM_44M_CP2WF1_EN           ( BIT(6) )
728 #define BIT_CGM_80M_CP2WF1_EN           ( BIT(5) )
729 #define BIT_CGM_256M_CP2_EN             ( BIT(4) )
730 #define BIT_CGM_104M_CP2_EN             ( BIT(3) )
731 #define BIT_CGM_208M_CP2_EN             ( BIT(2) )
732 #define BIT_CGM_312M_CP2_EN             ( BIT(1) )
733 #define BIT_CGM_26M_CP2_EN              ( BIT(0) )
734
735 /* bits definitions for register REG_PMU_APB_DDR_OP_MODE_CFG */
736 #define BIT_DDR_UMCTL_RET_EN            ( BIT(25) )
737 #define BIT_DDR_PHY_AUTO_RET_EN         ( BIT(24) )
738 #define BITS_DDR_OPERATE_MODE_CNT_LMT(_x_)( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
739 #define BITS_DDR_OPERATE_MODE(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)) )
740 #define BITS_DDR_OPERATE_MODE_IDLE(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)) )
741
742 /* bits definitions for register REG_PMU_APB_DDR_PHY_RET_CFG */
743 #define BIT_DDR_PHY_RET_EN              ( BIT(0) )
744
745 /* vars definitions for controller REGS_PMU_APB */
746
747 #endif //__REGS_PMU_APB_H__