tizen 2.4 release
[kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc9630 / chip_x35l / __regs_sc2723_ana_glb.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 __ANA_REGS_GLB_H__
12 #define __ANA_REGS_GLB_H__
13
14 #define ANA_REGS_GLB
15
16 /* registers definitions for controller ANA_REGS_GLB */
17 #define ANA_REG_GLB_ARM_MODULE_EN       SCI_ADDR(ANA_REGS_GLB_BASE, 0x0000)
18 #define ANA_REG_GLB_ARM_CLK_EN          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0004)
19 #define ANA_REG_GLB_RTC_CLK_EN          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0008)
20 #define ANA_REG_GLB_ARM_RST             SCI_ADDR(ANA_REGS_GLB_BASE, 0x000C)
21 #define ANA_REG_GLB_LDO_DCDC_PD         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0010)
22 #define ANA_REG_GLB_LDO_PD_CTRL         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0014)
23 #define ANA_REG_GLB_LDO_V_CTRL0         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0018)
24 #define ANA_REG_GLB_LDO_V_CTRL1         SCI_ADDR(ANA_REGS_GLB_BASE, 0x001C)
25 #define ANA_REG_GLB_LDO_V_CTRL2         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0020)
26 #define ANA_REG_GLB_LDO_V_CTRL3         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0024)
27 #define ANA_REG_GLB_LDO_V_CTRL4         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0028)
28 #define ANA_REG_GLB_LDO_V_CTRL5         SCI_ADDR(ANA_REGS_GLB_BASE, 0x002C)
29 #define ANA_REG_GLB_LDO_V_CTRL6         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0030)
30 #define ANA_REG_GLB_LDO_V_CTRL7         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0034)
31 #define ANA_REG_GLB_LDO_V_CTRL8         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0038)
32 #define ANA_REG_GLB_LDO_V_CTRL9         SCI_ADDR(ANA_REGS_GLB_BASE, 0x003C)
33 #define ANA_REG_GLB_LDO_V_CTRL10        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0040)
34 #define ANA_REG_GLB_LDO_V_CTRL11        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0044)
35 #define ANA_REG_GLB_LDO_LP_CTRL         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0048)
36 #define ANA_REG_GLB_DCDC_CTRL0          SCI_ADDR(ANA_REGS_GLB_BASE, 0x004C)
37 #define ANA_REG_GLB_DCDC_CTRL1          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0050)
38 #define ANA_REG_GLB_DCDC_CTRL2          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0054)
39 #define ANA_REG_GLB_DCDC_CTRL3          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0058)
40 #define ANA_REG_GLB_DCDC_CTRL4          SCI_ADDR(ANA_REGS_GLB_BASE, 0x005C)
41 #define ANA_REG_GLB_DCDC_CTRL5          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0060)
42 #define ANA_REG_GLB_DCDC_CTRL6          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0064)
43 #define ANA_REG_GLB_DCDC_CTRL7          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0068)
44 #define ANA_REG_GLB_DCDC_CTRL8          SCI_ADDR(ANA_REGS_GLB_BASE, 0x006C)
45 #define ANA_REG_GLB_DCDC_CTRL9          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0070)
46 #define ANA_REG_GLB_DCDC_CTRL10         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0074)
47 #define ANA_REG_GLB_DCDC_CTRL11         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0078)
48 #define ANA_REG_GLB_DCDC_CTRL12         SCI_ADDR(ANA_REGS_GLB_BASE, 0x007C)
49 #define ANA_REG_GLB_DCDC_CTRL13         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0080)
50 #define ANA_REG_GLB_DCDC_CTRL14         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0084)
51 #define ANA_REG_GLB_DCDC_CTRL15         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0088)
52 #define ANA_REG_GLB_SLP_WAIT_DCDCARM    SCI_ADDR(ANA_REGS_GLB_BASE, 0x008C)
53 #define ANA_REG_GLB_PWR_SLP_CTRL0       SCI_ADDR(ANA_REGS_GLB_BASE, 0x0090)
54 #define ANA_REG_GLB_PWR_SLP_CTRL1       SCI_ADDR(ANA_REGS_GLB_BASE, 0x0094)
55 #define ANA_REG_GLB_PWR_SLP_CTRL2       SCI_ADDR(ANA_REGS_GLB_BASE, 0x0098)
56 #define ANA_REG_GLB_PWR_SLP_CTRL3       SCI_ADDR(ANA_REGS_GLB_BASE, 0x009C)
57 #define ANA_REG_GLB_PWR_SLP_CTRL4       SCI_ADDR(ANA_REGS_GLB_BASE, 0x00A0)
58 #define ANA_REG_GLB_AUD_SLP_CTRL        SCI_ADDR(ANA_REGS_GLB_BASE, 0x00A4)
59 #define ANA_REG_GLB_DCDC_SLP_CTRL0      SCI_ADDR(ANA_REGS_GLB_BASE, 0x00A8)
60 #define ANA_REG_GLB_DCDC_SLP_CTRL1      SCI_ADDR(ANA_REGS_GLB_BASE, 0x00AC)
61 #define ANA_REG_GLB_DCDC_SLP_CTRL2      SCI_ADDR(ANA_REGS_GLB_BASE, 0x00B0)
62 #define ANA_REG_GLB_DCDC_SLP_CTRL3      SCI_ADDR(ANA_REGS_GLB_BASE, 0x00B4)
63 #define ANA_REG_GLB_DCDC_SLP_CTRL4      SCI_ADDR(ANA_REGS_GLB_BASE, 0x00B8)
64 #define ANA_REG_GLB_DCDC_SLP_CTRL5      SCI_ADDR(ANA_REGS_GLB_BASE, 0x00BC)
65 #define ANA_REG_GLB_PWR_SEL             SCI_ADDR(ANA_REGS_GLB_BASE, 0x00C0)
66 #define ANA_REG_GLB_PWR_XTL_EN0         SCI_ADDR(ANA_REGS_GLB_BASE, 0x00C4)
67 #define ANA_REG_GLB_PWR_XTL_EN1         SCI_ADDR(ANA_REGS_GLB_BASE, 0x00C8)
68 #define ANA_REG_GLB_PWR_XTL_EN2         SCI_ADDR(ANA_REGS_GLB_BASE, 0x00CC)
69 #define ANA_REG_GLB_PWR_XTL_EN3         SCI_ADDR(ANA_REGS_GLB_BASE, 0x00D0)
70 #define ANA_REG_GLB_32KLESS_CTRL0       SCI_ADDR(ANA_REGS_GLB_BASE, 0x00D4)
71 #define ANA_REG_GLB_32KLESS_CTRL1       SCI_ADDR(ANA_REGS_GLB_BASE, 0x00D8)
72 #define ANA_REG_GLB_32KLESS_CTRL2       SCI_ADDR(ANA_REGS_GLB_BASE, 0x00DC)
73 #define ANA_REG_GLB_32KLESS_CTRL3       SCI_ADDR(ANA_REGS_GLB_BASE, 0x00E0)
74 #define ANA_REG_GLB_AUXAD_CTL           SCI_ADDR(ANA_REGS_GLB_BASE, 0x00E4)
75 #define ANA_REG_GLB_XTL_WAIT_CTRL       SCI_ADDR(ANA_REGS_GLB_BASE, 0x00E8)
76 #define ANA_REG_GLB_RGB_CTRL            SCI_ADDR(ANA_REGS_GLB_BASE, 0x00EC)
77 #define ANA_REG_GLB_WHTLED_CTRL         SCI_ADDR(ANA_REGS_GLB_BASE, 0x00F0)
78 #define ANA_REG_GLB_KPLED_CTRL          SCI_ADDR(ANA_REGS_GLB_BASE, 0x00F4)
79 #define ANA_REG_GLB_VIBR_CTRL0          SCI_ADDR(ANA_REGS_GLB_BASE, 0x00F8)
80 #define ANA_REG_GLB_AUDIO_CTRL0         SCI_ADDR(ANA_REGS_GLB_BASE, 0x00FC)
81 #define ANA_REG_GLB_AUDIO_CTRL1         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0100)
82 #define ANA_REG_GLB_CHGR_CTRL0          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0104)
83 #define ANA_REG_GLB_CHGR_CTRL1          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0108)
84 #define ANA_REG_GLB_CHGR_CTRL2          SCI_ADDR(ANA_REGS_GLB_BASE, 0x010C)
85 #define ANA_REG_GLB_CHGR_DET_FGU_CTRL   SCI_ADDR(ANA_REGS_GLB_BASE, 0x0110)
86 #define ANA_REG_GLB_CHGR_STATUS         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0114)
87 #define ANA_REG_GLB_MIXED_CTRL0         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0118)
88 #define ANA_REG_GLB_MIXED_CTRL1         SCI_ADDR(ANA_REGS_GLB_BASE, 0x011C)
89 #define ANA_REG_GLB_SWRST_CTRL          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0120)
90 #define ANA_REG_GLB_POR_RST_MONITOR     SCI_ADDR(ANA_REGS_GLB_BASE, 0x0124)
91 #define ANA_REG_GLB_WDG_RST_MONITOR     SCI_ADDR(ANA_REGS_GLB_BASE, 0x0128)
92 #define ANA_REG_GLB_POR_PIN_RST_MONITOR SCI_ADDR(ANA_REGS_GLB_BASE, 0x012C)
93 #define ANA_REG_GLB_POR_SRC_FLAG        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0130)
94 #define ANA_REG_GLB_POR_7S_CTRL         SCI_ADDR(ANA_REGS_GLB_BASE, 0x0134)
95 #define ANA_REG_GLB_HWRST_RTC           SCI_ADDR(ANA_REGS_GLB_BASE, 0x0138)
96 #define ANA_REG_GLB_CHIP_ID_LOW         SCI_ADDR(ANA_REGS_GLB_BASE, 0x013C)
97 #define ANA_REG_GLB_CHIP_ID_HIGH        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0140)
98 #define ANA_REG_GLB_ARM_MF_REG          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0144)
99 #define ANA_REG_GLB_ARCH_EN             SCI_ADDR(ANA_REGS_GLB_BASE, 0x0148)
100 #define ANA_REG_GLB_MCU_WR_PROT_VALUE   SCI_ADDR(ANA_REGS_GLB_BASE, 0x014C)
101 #define ANA_REG_GLB_PWR_WR_PROT_VALUE   SCI_ADDR(ANA_REGS_GLB_BASE, 0x0150)
102 #define ANA_REG_GLB_SMPL_CTRL0          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0154)
103 #define ANA_REG_GLB_SMPL_CTRL1          SCI_ADDR(ANA_REGS_GLB_BASE, 0x0158)
104 #define ANA_REG_GLB_RTC_RST0            SCI_ADDR(ANA_REGS_GLB_BASE, 0x015C)
105 #define ANA_REG_GLB_RTC_RST1            SCI_ADDR(ANA_REGS_GLB_BASE, 0x0160)
106 #define ANA_REG_GLB_RTC_RST2            SCI_ADDR(ANA_REGS_GLB_BASE, 0x0164)
107 #define ANA_REG_GLB_LDO_SHPT_PD1        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0188)
108 #define ANA_REG_GLB_LDO_SHPT_PD2        SCI_ADDR(ANA_REGS_GLB_BASE, 0x018C)
109 #define ANA_REG_GLB_BATDET_CUR_CTRL     SCI_ADDR(ANA_REGS_GLB_BASE, 0x0190)
110 #define ANA_REG_GLB_RTC_CLK_STOP        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0194)
111 #define ANA_REG_GLB_VBAT_DROP_CNT       SCI_ADDR(ANA_REGS_GLB_BASE, 0x0198)
112 #define ANA_REG_GLB_DCDC_DISCHRG        SCI_ADDR(ANA_REGS_GLB_BASE, 0x019C)
113 #define ANA_REG_GLB_DCDC_CORE_ADI       SCI_ADDR(ANA_REGS_GLB_BASE, 0x0200)
114 #define ANA_REG_GLB_DCDC_ARM_ADI        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0204)
115 #define ANA_REG_GLB_DCDC_MEM_ADI        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0208)
116 #define ANA_REG_GLB_DCDC_GEN_ADI        SCI_ADDR(ANA_REGS_GLB_BASE, 0x020C)
117 #define ANA_REG_GLB_DCDC_WPA_ADI        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0210)
118 #define ANA_REG_GLB_DCDC_WPA_DCM_ADI    SCI_ADDR(ANA_REGS_GLB_BASE, 0x0214)
119 #define ANA_REG_GLB_DCDC_CON_ADI        SCI_ADDR(ANA_REGS_GLB_BASE, 0x0218)
120 #define ANA_REG_GLB_DCDC_RF_ADI         SCI_ADDR(ANA_REGS_GLB_BASE, 0x021C)
121
122 /* bits definitions for register ANA_REG_GLB_ARM_MODULE_EN */
123 #define BIT_ANA_IMPD_ADC_EN             ( BIT(12) )
124 #define BIT_ANA_THM_EN                  ( BIT(11) )
125 #define BIT_ANA_BLTC_EN                 ( BIT(10) )
126 #define BIT_ANA_PINREG_EN               ( BIT(9) )
127 #define BIT_ANA_FGU_EN                  ( BIT(8) )
128 #define BIT_ANA_EFS_EN                  ( BIT(7) )
129 #define BIT_ANA_ADC_EN                  ( BIT(6) )
130 #define BIT_ANA_HDT_EN                  ( BIT(5) )
131 #define BIT_ANA_AUD_EN                  ( BIT(4) )
132 #define BIT_ANA_EIC_EN                  ( BIT(3) )
133 #define BIT_ANA_WDG_EN                  ( BIT(2) )
134 #define BIT_ANA_RTC_EN                  ( BIT(1) )
135 #define BIT_ANA_CAL_EN                  ( BIT(0) )
136
137 /* bits definitions for register ANA_REG_GLB_ARM_CLK_EN */
138 #define BIT_CLK_IMPD_ADC_EN             ( BIT(10) )
139 #define BIT_CLK_AUXAD_EN                ( BIT(9) )
140 #define BIT_CLK_AUXADC_EN               ( BIT(8) )
141 #define BITS_CLK_CAL_SRC_SEL(_x_)       ( (_x_) << 6 & (BIT(6)|BIT(7)) )
142 #define BIT_CLK_CAL_EN                  ( BIT(5) )
143 #define BIT_CLK_AUD_HID_EN              ( BIT(4) )
144 #define BIT_CLK_AUD_HBD_EN              ( BIT(3) )
145 #define BIT_CLK_AUD_LOOP_EN             ( BIT(2) )
146 #define BIT_CLK_AUD_6P5M_EN             ( BIT(1) )
147 #define BIT_CLK_AUDIF_EN                ( BIT(0) )
148
149 /* bits definitions for register ANA_REG_GLB_RTC_CLK_EN */
150 #define BIT_RTC_EFS_EN                  ( BIT(12) )
151 #define BIT_RTC_THMA_AUTO_EN            ( BIT(11) )
152 #define BIT_RTC_THMA_EN                 ( BIT(10) )
153 #define BIT_RTC_THM_EN                  ( BIT(9) )
154 #define BIT_RTC_BLTC_EN                 ( BIT(8) )
155 #define BIT_RTC_FGU_EN                  ( BIT(7) )
156 #define BIT_RTC_FGUA_EN                 ( BIT(6) )
157 #define BIT_RTC_VIBR_EN                 ( BIT(5) )
158 #define BIT_RTC_AUD_EN                  ( BIT(4) )
159 #define BIT_RTC_EIC_EN                  ( BIT(3) )
160 #define BIT_RTC_WDG_EN                  ( BIT(2) )
161 #define BIT_RTC_RTC_EN                  ( BIT(1) )
162 #define BIT_RTC_ARCH_EN                 ( BIT(0) )
163
164 /* bits definitions for register ANA_REG_GLB_ARM_RST */
165 #define BIT_ANA_THMA_SOFT_RST           ( BIT(15) )
166 #define BIT_ANA_THM_SOFT_RST            ( BIT(14) )
167 #define BIT_ANA_BLTC_SOFT_RST           ( BIT(13) )
168 #define BIT_ANA_AUD_32K_SOFT_RST        ( BIT(12) )
169 #define BIT_ANA_AUDTX_SOFT_RST          ( BIT(11) )
170 #define BIT_ANA_AUDRX_SOFT_RST          ( BIT(10) )
171 #define BIT_ANA_AUD_SOFT_RST            ( BIT(9) )
172 #define BIT_ANA_AUD_HDT_SOFT_RST        ( BIT(8) )
173 #define BIT_ANA_EFS_SOFT_RST            ( BIT(7) )
174 #define BIT_ANA_ADC_SOFT_RST            ( BIT(6) )
175 #define BIT_ANA_PWM0_SOFT_RST           ( BIT(5) )
176 #define BIT_ANA_FGU_SOFT_RST            ( BIT(4) )
177 #define BIT_ANA_EIC_SOFT_RST            ( BIT(3) )
178 #define BIT_ANA_WDG_SOFT_RST            ( BIT(2) )
179 #define BIT_ANA_RTC_SOFT_RST            ( BIT(1) )
180 #define BIT_ANA_CAL_SOFT_RST            ( BIT(0) )
181
182 /* bits definitions for register ANA_REG_GLB_LDO_DCDC_PD */
183 #define BIT_LDO_EMM_PD                  ( BIT(15) )
184 #define BIT_DCDC_TOPCLK6M_PD            ( BIT(14) )
185 #define BIT_DCDC_RF_PD                  ( BIT(13) )
186 #define BIT_DCDC_GEN_PD                 ( BIT(12) )
187 #define BIT_DCDC_MEM_PD                 ( BIT(11) )
188 #define BIT_DCDC_ARM_PD                 ( BIT(10) )
189 #define BIT_DCDC_CORE_PD                ( BIT(9) )
190 #define BIT_LDO_RF0_PD                  ( BIT(8) )
191 #define BIT_LDO_EMMCCORE_PD             ( BIT(7) )
192 #define BIT_LDO_GEN1_PD                 ( BIT(6) )
193 #define BIT_LDO_DCXO_PD                 ( BIT(5) )
194 #define BIT_LDO_GEN0_PD                 ( BIT(4) )
195 #define BIT_LDO_VDD25_PD                ( BIT(3) )
196 #define BIT_LDO_VDD28_PD                ( BIT(2) )
197 #define BIT_LDO_VDD18_PD                ( BIT(1) )
198 #define BIT_BG_PD                       ( BIT(0) )
199
200 /* bits definitions for register ANA_REG_GLB_LDO_PD_CTRL */
201 #define BIT_LDO_LPREF_PD_SW             ( BIT(15) )
202 #define BIT_DCDC_WPA_PD                 ( BIT(14) )
203 #define BIT_DCDC_CON_PD                 ( BIT(13) )
204 #define BIT_LDO_WIFIPA_PD               ( BIT(11) )
205 #define BIT_LDO_SDCORE_PD               ( BIT(10) )
206 #define BIT_LDO_USB_PD                  ( BIT(8) )
207 #define BIT_LDO_CAMMOT_PD               ( BIT(7) )
208 #define BIT_LDO_CAMIO_PD                ( BIT(6) )
209 #define BIT_LDO_CAMD_PD                 ( BIT(5) )
210 #define BIT_LDO_CAMA_PD                 ( BIT(4) )
211 #define BIT_LDO_SIM2_PD                 ( BIT(3) )
212 #define BIT_LDO_SIM1_PD                 ( BIT(2) )
213 #define BIT_LDO_SIM0_PD                 ( BIT(1) )
214 #define BIT_LDO_SDIO_PD                 ( BIT(0) )
215
216 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL0 */
217 #define BITS_LDO_RF0_V(_x_)             ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
218 #define BITS_LDO_WIFIPA_V(_x_)          ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
219
220 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL1 */
221 #define BITS_LDO_CAMIO_V(_x_)           ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
222 #define BITS_LDO_CAMD_V(_x_)            ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)) )
223
224 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL2 */
225 #define BITS_LDO_GEN0_V(_x_)            ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)) )
226
227 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL3 */
228 #define BITS_LDO_GEN1_V(_x_)            ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
229 #define BITS_LDO_VDD28_V(_x_)           ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
230
231 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL4 */
232 #define BITS_LDO_SIM0_V(_x_)            ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
233 #define BITS_LDO_SDIO_V(_x_)            ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
234
235 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL5 */
236 #define BITS_LDO_SIM2_V(_x_)            ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
237 #define BITS_LDO_SIM1_V(_x_)            ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
238
239 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL6 */
240 #define BITS_LDO_SDCORE_V(_x_)          ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
241 #define BITS_LDO_CAMA_V(_x_)            ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
242
243 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL7 */
244 #define BITS_LDO_EMMCCORE_V(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
245 #define BITS_LDO_CAMMOT_V(_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 ANA_REG_GLB_LDO_V_CTRL8 */
248 #define BITS_LDO_DCXO_V(_x_)            ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
249 #define BITS_LDO_DCXO_LP_V(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
250
251 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL9 */
252 #define BITS_LDO_VDD18_V(_x_)           ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
253 #define BITS_LDO_USB_V(_x_)             ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
254
255 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL10 */
256 #define BITS_LDO_VDD25_V(_x_)           ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
257
258 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL11 */
259 #define BITS_VBATBK_V(_x_)              ( (_x_) << 12 & (BIT(12)|BIT(13)) )
260 #define BITS_LDOB_CAL_SEL(_x_)          ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)) )
261 #define BITS_LDOA_CAL_SEL                   (_x_)( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)) )
262 #define BITS_LDOD_CAL_SEL(_x_)          ( (_x_) << 3 & (BIT(3)|BIT(4)) )
263 #define BITS_LDODCDC_CAL_SEL(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)) )
264
265 /* bits definitions for register ANA_REG_GLB_LDO_LP_CTRL */
266 #define BITS_LDOB_LP_CAL(_x_)           ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
267 #define BITS_LDOA_LP_CAL(_x_)           ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
268 #define BITS_LDODCDC_LP_CAL(_x_)        ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
269
270 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL0 */
271 #define BITS_DCDC_CORE_DEADTIME(_x_)    ( (_x_) << 14 & (BIT(14)|BIT(15)) )
272 #define BITS_DCDC_CORE_STBOP(_x_)       ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
273 #define BITS_DCDC_CORE_PDRSLOW(_x_)     ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
274 #define BIT_DCDC_CORE_QKRSPS            ( BIT(3) )
275 #define BIT_DCDC_CORE_PFM               ( BIT(2) )
276 #define BIT_DCDC_CORE_DCM               ( BIT(1) )
277 #define BIT_DCDC_CORE_LP_EN             ( BIT(0) )
278
279 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL1 */
280 #define BITS_DCDC_MEM_DEADTIME(_x_)     ( (_x_) << 14 & (BIT(14)|BIT(15)) )
281 #define BITS_DCDC_MEM_STBOP(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
282 #define BITS_DCDC_MEM_PDRSLOW(_x_)      ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
283 #define BIT_DCDC_MEM_QKRSPS             ( BIT(3) )
284 #define BIT_DCDC_MEM_PFM                ( BIT(2) )
285 #define BIT_DCDC_MEM_DCM                ( BIT(1) )
286 #define BIT_DCDC_MEM_LP_EN              ( BIT(0) )
287
288 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL2 */
289 #define BITS_DCDC_GEN_DEADTIME(_x_)     ( (_x_) << 14 & (BIT(14)|BIT(15)) )
290 #define BITS_DCDC_GEN_STBOP(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
291 #define BITS_DCDC_GEN_PDRSLOW(_x_)      ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
292 #define BIT_DCDC_GEN_QKRSPS             ( BIT(3) )
293 #define BIT_DCDC_GEN_PFM                ( BIT(2) )
294 #define BIT_DCDC_GEN_DCM                ( BIT(1) )
295 #define BIT_DCDC_GEN_LP_EN              ( BIT(0) )
296
297 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL3 */
298 #define BITS_DCDC_ARM_DEADTIME(_x_)     ( (_x_) << 14 & (BIT(14)|BIT(15)) )
299 #define BITS_DCDC_ARM_STBOP(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
300 #define BITS_DCDC_ARM_PDRSLOW(_x_)      ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
301 #define BIT_DCDC_ARM_QKRSPS             ( BIT(3) )
302 #define BIT_DCDC_ARM_PFM                ( BIT(2) )
303 #define BIT_DCDC_ARM_DCM                ( BIT(1) )
304 #define BIT_DCDC_ARM_LP_EN              ( BIT(0) )
305
306 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL4 */
307 #define BITS_DCDC_WPA_DEADTIME(_x_)     ( (_x_) << 14 & (BIT(14)|BIT(15)) )
308 #define BITS_DCDC_WPA_STBOP(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
309 #define BITS_DCDC_WPA_PDRSLOW(_x_)      ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
310 #define BIT_DCDC_WPA_QKRSPS             ( BIT(3) )
311 #define BIT_DCDC_WPA_PFM                ( BIT(2) )
312 #define BIT_DCDC_WPA_LP_EN              ( BIT(0) )
313
314 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL5 */
315 #define BITS_DCDC_RF_DEADTIME(_x_)      ( (_x_) << 14 & (BIT(14)|BIT(15)) )
316 #define BITS_DCDC_RF_STBOP(_x_)         ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
317 #define BITS_DCDC_RF_PDRSLOW(_x_)       ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
318 #define BIT_DCDC_RF_QKRSPS              ( BIT(3) )
319 #define BIT_DCDC_RF_PFM                 ( BIT(2) )
320 #define BIT_DCDC_RF_DCM                 ( BIT(1) )
321 #define BIT_DCDC_RF_LP_EN               ( BIT(0) )
322
323 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL6 */
324 #define BITS_DCDC_CON_DEADTIME(_x_)     ( (_x_) << 14 & (BIT(14)|BIT(15)) )
325 #define BITS_DCDC_CON_STBOP(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
326 #define BITS_DCDC_CON_PDRSLOW(_x_)      ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
327 #define BIT_DCDC_CON_QKRSPS             ( BIT(3) )
328 #define BIT_DCDC_CON_PFM                ( BIT(2) )
329 #define BIT_DCDC_CON_DCM                ( BIT(1) )
330 #define BIT_DCDC_CON_LP_EN              ( BIT(0) )
331
332 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL7 */
333 #define BITS_DCDC_MEM_CF(_x_)           ( (_x_) << 12 & (BIT(12)|BIT(13)) )
334 #define BITS_DCDC_MEM_PFMAD(_x_)        ( (_x_) << 10 & (BIT(10)|BIT(11)) )
335 #define BITS_DCDC_MEM_CL_CTRL(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)) )
336 #define BIT_DCDC_CORE_DUALSEL           ( BIT(7) )
337 #define BIT_DCDC_CORE_MERGEEN           ( BIT(6) )
338 #define BITS_DCDC_CORE_CF(_x_)          ( (_x_) << 4 & (BIT(4)|BIT(5)) )
339 #define BITS_DCDC_CORE_PFMAD(_x_)       ( (_x_) << 2 & (BIT(2)|BIT(3)) )
340 #define BITS_DCDC_CORE_CL_CTRL(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)) )
341
342 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL8 */
343 #define BIT_DCDC_ARM_DUALSEL            ( BIT(15) )
344 #define BIT_DCDC_ARM_MERGEEN            ( BIT(14) )
345 #define BITS_DCDC_ARM_CF(_x_)           ( (_x_) << 12 & (BIT(12)|BIT(13)) )
346 #define BITS_DCDC_ARM_PFMAD(_x_)        ( (_x_) << 10 & (BIT(10)|BIT(11)) )
347 #define BITS_DCDC_ARM_CL_CTRL(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)) )
348 #define BITS_DCDC_GEN_CF(_x_)           ( (_x_) << 4 & (BIT(4)|BIT(5)) )
349 #define BITS_DCDC_GEN_PFMAD(_x_)        ( (_x_) << 2 & (BIT(2)|BIT(3)) )
350 #define BITS_DCDC_GEN_CL_CTRL(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)) )
351
352 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL9 */
353 #define BIT_DCDC_CON_MERGEEN            ( BIT(14) )
354 #define BITS_DCDC_CON_CF(_x_)           ( (_x_) << 12 & (BIT(12)|BIT(13)) )
355 #define BITS_DCDC_CON_PFMAD(_x_)        ( (_x_) << 10 & (BIT(10)|BIT(11)) )
356 #define BITS_DCDC_CON_CL_CTRL(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)) )
357 #define BIT_DCDC_RF_MERGEEN             ( BIT(6) )
358 #define BITS_DCDC_RF_CF(_x_)            ( (_x_) << 4 & (BIT(4)|BIT(5)) )
359 #define BITS_DCDC_RF_PFMAD(_x_)         ( (_x_) << 2 & (BIT(2)|BIT(3)) )
360 #define BITS_DCDC_RF_CL_CTRL(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)) )
361
362 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL10 */
363 #define BIT_DCDC_WPA_BPOUT_SOFTW        ( BIT(15) )
364 #define BITS_DCDC_WPA_VBAT_DIV(_x_)     ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)) )
365 #define BIT_DCDC_WPA_BPEN               ( BIT(11) )
366 #define BIT_DCDC_WPA_BPMODE             ( BIT(10) )
367 #define BIT_DCDC_WPA_DEGEN              ( BIT(9) )
368 #define BIT_DCDC_WPA_APTEN              ( BIT(8) )
369 #define BITS_DCDC_WPA_DEBC_SEL(_x_)     ( (_x_) << 6 & (BIT(6)|BIT(7)) )
370 #define BITS_DCDC_WPA_CF(_x_)           ( (_x_) << 4 & (BIT(4)|BIT(5)) )
371 #define BITS_DCDC_WPA_PFMAD(_x_)        ( (_x_) << 2 & (BIT(2)|BIT(3)) )
372 #define BITS_DCDC_WPA_CL_CTRL(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)) )
373
374 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL11 */
375 #define BIT_DCDC_3MCLKCAL_EN            ( BIT(13) )
376 #define BIT_DCDC_2MCLKCAL_EN            ( BIT(12) )
377 #define BITS_DCDC_6MFRECAL_SW(_x_)      ( (_x_) << 7 & (BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
378 #define BITS_DCDC_4MFRECAL_SW(_x_)      ( (_x_) << 2 & (BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)) )
379 #define BIT_DCDC_CLK_SP_SEL             ( BIT(1) )
380 #define BIT_DCDC_CLK_SP_EN              ( BIT(0) )
381
382 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL12 */
383 #define BIT_DCDC_CORE_OSCSYCEN_SW       ( BIT(15) )
384 #define BIT_DCDC_CORE_OSCSYCEN_HW_EN    ( BIT(14) )
385 #define BIT_DCDC_CORE_OSCSYC_DIV_EN     ( BIT(13) )
386 #define BITS_DCDC_CORE_OSCSYC_DIV(_x_)  ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
387 #define BIT_DCDC_ARM_OSCSYCEN_SW        ( BIT(7) )
388 #define BIT_DCDC_ARM_OSCSYCEN_HW_EN     ( BIT(6) )
389 #define BIT_DCDC_ARM_OSCSYC_DIV_EN      ( BIT(5) )
390 #define BITS_DCDC_ARM_OSCSYC_DIV(_x_)   ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
391
392 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL13 */
393 #define BIT_DCDC_MEM_OSCSYCEN_SW        ( BIT(15) )
394 #define BIT_DCDC_MEM_OSCSYCEN_HW_EN     ( BIT(14) )
395 #define BIT_DCDC_MEM_OSCSYC_DIV_EN      ( BIT(13) )
396 #define BITS_DCDC_MEM_OSCSYC_DIV(_x_)   ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
397 #define BIT_DCDC_GEN_OSCSYCEN_SW        ( BIT(7) )
398 #define BIT_DCDC_GEN_OSCSYCEN_HW_EN     ( BIT(6) )
399 #define BIT_DCDC_GEN_OSCSYC_DIV_EN      ( BIT(5) )
400 #define BITS_DCDC_GEN_OSCSYC_DIV(_x_)   ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
401
402 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL14 */
403 #define BIT_DCDC_WPA_OSCSYCEN_SW        ( BIT(15) )
404 #define BIT_DCDC_WPA_OSCSYCEN_HW_EN     ( BIT(14) )
405 #define BIT_DCDC_WPA_OSCSYC_DIV_EN      ( BIT(13) )
406 #define BITS_DCDC_WPA_OSCSYC_DIV(_x_)   ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
407 #define BIT_DCDC_RF_OSCSYCEN_SW         ( BIT(7) )
408 #define BIT_DCDC_RF_OSCSYCEN_HW_EN      ( BIT(6) )
409 #define BIT_DCDC_RF_OSCSYC_DIV_EN       ( BIT(5) )
410 #define BITS_DCDC_RF_OSCSYC_DIV(_x_)    ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
411
412 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL15 */
413 #define BITS_DCDC_CAL_SEL(_x_)          ( (_x_) << 13 & (BIT(13)|BIT(14)|BIT(15)) )
414 #define BIT_DCDC_CON_OSCSYCEN_SW        ( BIT(7) )
415 #define BIT_DCDC_CON_OSCSYCEN_HW_EN     ( BIT(6) )
416 #define BIT_DCDC_CON_OSCSYC_DIV_EN      ( BIT(5) )
417 #define BITS_DCDC_CON_OSCSYC_DIV(_x_)   ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
418
419 /* bits definitions for register ANA_REG_GLB_SLP_WAIT_DCDCARM */
420 #define BITS_SLP_IN_WAIT_DCDCARM(_x_)   ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
421 #define BITS_SLP_OUT_WAIT_DCDCARM(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
422
423 /* bits definitions for register ANA_REG_GLB_PWR_SLP_CTRL0 */
424 #define BIT_SLP_IO_EN                   ( BIT(15) )
425 #define BIT_SLP_DCDCRF_PD_EN            ( BIT(13) )
426 #define BIT_SLP_DCDCCON_PD_EN           ( BIT(12) )
427 #define BIT_SLP_DCDCGEN_PD_EN           ( BIT(11) )
428 #define BIT_SLP_DCDCWPA_PD_EN           ( BIT(10) )
429 #define BIT_SLP_DCDCARM_PD_EN           ( BIT(9) )
430 #define BIT_SLP_LDOVDD25_PD_EN          ( BIT(8) )
431 #define BIT_SLP_LDORF0_PD_EN            ( BIT(7) )
432 #define BIT_SLP_LDOEMMCCORE_PD_EN       ( BIT(6) )
433 #define BIT_SLP_LDOGEN0_PD_EN           ( BIT(5) )
434 #define BIT_SLP_LDODCXO_PD_EN           ( BIT(4) )
435 #define BIT_SLP_LDOGEN1_PD_EN           ( BIT(3) )
436 #define BIT_SLP_LDOWIFIPA_PD_EN         ( BIT(2) )
437 #define BIT_SLP_LDOVDD28_PD_EN          ( BIT(1) )
438 #define BIT_SLP_LDOVDD18_PD_EN          ( BIT(0) )
439
440 /* bits definitions for register ANA_REG_GLB_PWR_SLP_CTRL1 */
441 #define BIT_SLP_LDO_PD_EN               ( BIT(15) )
442 #define BIT_SLP_LDOLPREF_PD_EN          ( BIT(14) )
443 #define BIT_SLP_LDOSDCORE_PD_EN         ( BIT(9) )
444 #define BIT_SLP_LDOUSB_PD_EN            ( BIT(8) )
445 #define BIT_SLP_LDOCAMMOT_PD_EN         ( BIT(7) )
446 #define BIT_SLP_LDOCAMIO_PD_EN          ( BIT(6) )
447 #define BIT_SLP_LDOCAMD_PD_EN           ( BIT(5) )
448 #define BIT_SLP_LDOCAMA_PD_EN           ( BIT(4) )
449 #define BIT_SLP_LDOSIM2_PD_EN           ( BIT(3) )
450 #define BIT_SLP_LDOSIM1_PD_EN           ( BIT(2) )
451 #define BIT_SLP_LDOSIM0_PD_EN           ( BIT(1) )
452 #define BIT_SLP_LDOSDIO_PD_EN           ( BIT(0) )
453
454 /* bits definitions for register ANA_REG_GLB_PWR_SLP_CTRL2 */
455 #define BIT_SLP_DCDCRF_LP_EN            ( BIT(14) )
456 #define BIT_SLP_DCDCCON_LP_EN           ( BIT(13) )
457 #define BIT_SLP_DCDCCORE_LP_EN          ( BIT(12) )
458 #define BIT_SLP_DCDCMEM_LP_EN           ( BIT(11) )
459 #define BIT_SLP_DCDCARM_LP_EN           ( BIT(10) )
460 #define BIT_SLP_DCDCGEN_LP_EN           ( BIT(9) )
461 #define BIT_SLP_DCDCWPA_LP_EN           ( BIT(8) )
462 #define BIT_SLP_LDORF0_LP_EN            ( BIT(7) )
463 #define BIT_SLP_LDOEMMCCORE_LP_EN       ( BIT(6) )
464 #define BIT_SLP_LDOGEN0_LP_EN           ( BIT(5) )
465 #define BIT_SLP_LDODCXO_LP_EN           ( BIT(4) )
466 #define BIT_SLP_LDOGEN1_LP_EN           ( BIT(3) )
467 #define BIT_SLP_LDOWIFIPA_LP_EN         ( BIT(2) )
468 #define BIT_SLP_LDOVDD28_LP_EN          ( BIT(1) )
469 #define BIT_SLP_LDOVDD18_LP_EN          ( BIT(0) )
470
471 /* bits definitions for register ANA_REG_GLB_PWR_SLP_CTRL3 */
472 #define BIT_SLP_BG_LP_EN                ( BIT(15) )
473 #define BIT_LDOVDD25_LP_EN_SW           ( BIT(14) )
474 #define BIT_LDOSDCORE_LP_EN_SW          ( BIT(13) )
475 #define BIT_LDOUSB_LP_EN_SW             ( BIT(12) )
476 #define BIT_SLP_LDOVDD25_LP_EN          ( BIT(10) )
477 #define BIT_SLP_LDOSDCORE_LP_EN         ( BIT(9) )
478 #define BIT_SLP_LDOUSB_LP_EN            ( BIT(8) )
479 #define BIT_SLP_LDOCAMMOT_LP_EN         ( BIT(7) )
480 #define BIT_SLP_LDOCAMIO_LP_EN          ( BIT(6) )
481 #define BIT_SLP_LDOCAMD_LP_EN           ( BIT(5) )
482 #define BIT_SLP_LDOCAMA_LP_EN           ( BIT(4) )
483 #define BIT_SLP_LDOSIM2_LP_EN           ( BIT(3) )
484 #define BIT_SLP_LDOSIM1_LP_EN           ( BIT(2) )
485 #define BIT_SLP_LDOSIM0_LP_EN           ( BIT(1) )
486 #define BIT_SLP_LDOSDIO_LP_EN           ( BIT(0) )
487
488 /* bits definitions for register ANA_REG_GLB_PWR_SLP_CTRL4 */
489 #define BIT_LDOCAMIO_LP_EN_SW           ( BIT(15) )
490 #define BIT_LDOCAMMOT_LP_EN_SW          ( BIT(14) )
491 #define BIT_LDOCAMD_LP_EN_SW            ( BIT(13) )
492 #define BIT_LDOCAMA_LP_EN_SW            ( BIT(12) )
493 #define BIT_LDOSIM2_LP_EN_SW            ( BIT(11) )
494 #define BIT_LDOSIM1_LP_EN_SW            ( BIT(10) )
495 #define BIT_LDOSIM0_LP_EN_SW            ( BIT(9) )
496 #define BIT_LDOSDIO_LP_EN_SW            ( BIT(8) )
497 #define BIT_LDORF0_LP_EN_SW             ( BIT(7) )
498 #define BIT_LDOEMMCCORE_LP_EN_SW        ( BIT(6) )
499 #define BIT_LDOGEN0_LP_EN_SW            ( BIT(5) )
500 #define BIT_LDODCXO_LP_EN_SW            ( BIT(4) )
501 #define BIT_LDOGEN1_LP_EN_SW            ( BIT(3) )
502 #define BIT_LDOWIFIPA_LP_EN_SW          ( BIT(2) )
503 #define BIT_LDOVDD28_LP_EN_SW           ( BIT(1) )
504 #define BIT_LDOVDD18_LP_EN_SW           ( BIT(0) )
505
506 /* bits definitions for register ANA_REG_GLB_AUD_SLP_CTRL */
507 #define BIT_SLP_AUD_PMUR1_PD_EN         ( BIT(14) )
508 #define BIT_SLP_AUD_PA_SW_PD_EN         ( BIT(13) )
509 #define BIT_SLP_AUD_PA_LDO_PD_EN        ( BIT(12) )
510 #define BIT_SLP_AUD_PA_PD_EN            ( BIT(11) )
511 #define BIT_SLP_AUD_OVP_PD_PD_EN        ( BIT(10) )
512 #define BIT_SLP_AUD_OVP_LDO_PD_EN       ( BIT(9) )
513 #define BIT_SLP_AUD_LDOCG_PD_PD_EN      ( BIT(8) )
514 #define BIT_SLP_AUD_VB_PD_EN            ( BIT(7) )
515 #define BIT_SLP_AUD_VBO_PD_EN           ( BIT(6) )
516 #define BIT_SLP_AUD_HEADMICBIAS_PD_EN   ( BIT(5) )
517 #define BIT_SLP_AUD_HEADMIC_SLEEP_PD_EN ( BIT(4) )
518 #define BIT_SLP_AUD_PLGPD_PD_EN         ( BIT(3) )
519 #define BIT_SLP_AUD_VB_NLEAK_PD         ( BIT(2) )
520 #define BITS_SLP_AUD_PMUR0_PD_EN(_x_)   ( (_x_) << 0 & (BIT(0)|BIT(1)) )
521
522 /* bits definitions for register ANA_REG_GLB_DCDC_SLP_CTRL0 */
523 #define BITS_SLP_DCDCCORE_VOL_DROP_CNT(_x_)( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
524 #define BIT_PWR_OFF_SEQ_EN              ( BIT(2) )
525 #define BIT_DCDC_CORE_SLP_OUT_STEP_EN   ( BIT(1) )
526 #define BIT_DCDC_CORE_SLP_IN_STEP_EN    ( BIT(0) )
527
528 /* bits definitions for register ANA_REG_GLB_DCDC_SLP_CTRL1 */
529 #define BITS_DCDC_CORE_CAL_DS_SW(_x_)   ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
530 #define BITS_DCDC_CORE_CTRL_DS_SW(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
531
532 /* bits definitions for register ANA_REG_GLB_DCDC_SLP_CTRL2 */
533 #define BITS_DCDC_CORE_CTRL_SLP_STEP3(_x_)( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
534 #define BITS_DCDC_CORE_CTRL_SLP_STEP2(_x_)( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
535 #define BITS_DCDC_CORE_CTRL_SLP_STEP1(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
536
537 /* bits definitions for register ANA_REG_GLB_DCDC_SLP_CTRL3 */
538 #define BITS_DCDC_CORE_CTRL_SLP_STEP5(_x_)( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
539 #define BITS_DCDC_CORE_CTRL_SLP_STEP4(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
540
541 /* bits definitions for register ANA_REG_GLB_DCDC_SLP_CTRL4 */
542 #define BITS_DCDC_CORE_CAL_SLP_STEP3(_x_)( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
543 #define BITS_DCDC_CORE_CAL_SLP_STEP2(_x_)( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
544 #define BITS_DCDC_CORE_CAL_SLP_STEP1(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
545
546 /* bits definitions for register ANA_REG_GLB_DCDC_SLP_CTRL5 */
547 #define BITS_DCDC_CORE_CAL_SLP_STEP5(_x_)( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
548 #define BITS_DCDC_CORE_CAL_SLP_STEP4(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
549
550 /* bits definitions for register ANA_REG_GLB_PWR_SEL */
551 #define BIT_LDO_GEN0_SW_SEL             ( BIT(13) )
552 #define BIT_LDO_GEN1_SW_SEL             ( BIT(12) )
553 #define BIT_LDO_RF0_SW_SEL              ( BIT(11) )
554 #define BIT_LDO_VDD18_SW_SEL            ( BIT(10) )
555 #define BIT_LDO_VDD28_SW_SEL            ( BIT(9) )
556 #define BIT_LDO_DCXO_SW_SEL             ( BIT(8) )
557 #define BIT_LDO_EMMCCORE_SW_SEL         ( BIT(7) )
558 #define BIT_LDO_VDD25_SW_SEL            ( BIT(6) )
559 #define BIT_DCDC_RF_SW_SEL              ( BIT(5) )
560 #define BIT_DCDC_GEN_SW_SEL             ( BIT(4) )
561 #define BIT_DCDC_MEM_SW_SEL             ( BIT(3) )
562 #define BIT_DCDC_ARM_SW_SEL             ( BIT(2) )
563 #define BIT_DCDC_CORE_SLP_SW_SEL        ( BIT(1) )
564 #define BIT_DCDC_CORE_NOR_SW_SEL        ( BIT(0) )
565
566 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN0 */
567 #define BIT_LDO_XTL_EN                  ( BIT(15) )
568 #define BIT_LDO_GEN0_EXT_XTL0_EN        ( BIT(14) )
569 #define BIT_LDO_GEN0_XTL1_EN            ( BIT(13) )
570 #define BIT_LDO_GEN0_XTL0_EN            ( BIT(12) )
571 #define BIT_LDO_GEN1_EXT_XTL0_EN        ( BIT(11) )
572 #define BIT_LDO_GEN1_XTL1_EN            ( BIT(10) )
573 #define BIT_LDO_GEN1_XTL0_EN            ( BIT(9) )
574 #define BIT_LDO_DCXO_EXT_XTL0_EN        ( BIT(8) )
575 #define BIT_LDO_DCXO_XTL1_EN            ( BIT(7) )
576 #define BIT_LDO_DCXO_XTL0_EN            ( BIT(6) )
577 #define BIT_LDO_VDD18_EXT_XTL0_EN       ( BIT(5) )
578 #define BIT_LDO_VDD18_XTL1_EN           ( BIT(4) )
579 #define BIT_LDO_VDD18_XTL0_EN           ( BIT(3) )
580 #define BIT_LDO_VDD28_EXT_XTL0_EN       ( BIT(2) )
581 #define BIT_LDO_VDD28_XTL1_EN           ( BIT(1) )
582 #define BIT_LDO_VDD28_XTL0_EN           ( BIT(0) )
583
584 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN1 */
585 #define BIT_LDO_RF0_EXT_XTL0_EN         ( BIT(14) )
586 #define BIT_LDO_RF0_XTL1_EN             ( BIT(13) )
587 #define BIT_LDO_RF0_XTL0_EN             ( BIT(12) )
588 #define BIT_LDO_WIFIPA_EXT_XTL0_EN      ( BIT(11) )
589 #define BIT_LDO_WIFIPA_XTL1_EN          ( BIT(10) )
590 #define BIT_LDO_WIFIPA_XTL0_EN          ( BIT(9) )
591 #define BIT_LDO_SIM2_EXT_XTL0_EN        ( BIT(8) )
592 #define BIT_LDO_SIM2_XTL1_EN            ( BIT(7) )
593 #define BIT_LDO_SIM2_XTL0_EN            ( BIT(6) )
594 #define BIT_LDO_SIM1_EXT_XTL0_EN        ( BIT(5) )
595 #define BIT_LDO_SIM1_XTL1_EN            ( BIT(4) )
596 #define BIT_LDO_SIM1_XTL0_EN            ( BIT(3) )
597 #define BIT_LDO_SIM0_EXT_XTL0_EN        ( BIT(2) )
598 #define BIT_LDO_SIM0_XTL1_EN            ( BIT(1) )
599 #define BIT_LDO_SIM0_XTL0_EN            ( BIT(0) )
600
601 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN2 */
602 #define BIT_LDO_VDD25_EXT_XTL0_EN       ( BIT(11) )
603 #define BIT_LDO_VDD25_XTL1_EN           ( BIT(10) )
604 #define BIT_LDO_VDD25_XTL0_EN           ( BIT(9) )
605 #define BIT_DCDC_RF_EXT_XTL0_EN         ( BIT(8) )
606 #define BIT_DCDC_RF_XTL1_EN             ( BIT(7) )
607 #define BIT_DCDC_RF_XTL0_EN             ( BIT(6) )
608 #define BIT_XO_EXT_XTL0_EN              ( BIT(5) )
609 #define BIT_XO_XTL1_EN                  ( BIT(4) )
610 #define BIT_XO_XTL0_EN                  ( BIT(3) )
611 #define BIT_BG_EXT_XTL0_EN              ( BIT(2) )
612 #define BIT_BG_XTL1_EN                  ( BIT(1) )
613 #define BIT_BG_XTL0_EN                  ( BIT(0) )
614
615 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN3 */
616 #define BIT_DCDC_CON_EXT_XTL0_EN        ( BIT(14) )
617 #define BIT_DCDC_CON_XTL1_EN            ( BIT(13) )
618 #define BIT_DCDC_CON_XTL0_EN            ( BIT(12) )
619 #define BIT_DCDC_WPA_EXT_XTL0_EN        ( BIT(11) )
620 #define BIT_DCDC_WPA_XTL1_EN            ( BIT(10) )
621 #define BIT_DCDC_WPA_XTL0_EN            ( BIT(9) )
622 #define BIT_DCDC_MEM_EXT_XTL0_EN        ( BIT(8) )
623 #define BIT_DCDC_MEM_XTL1_EN            ( BIT(7) )
624 #define BIT_DCDC_MEM_XTL0_EN            ( BIT(6) )
625 #define BIT_DCDC_GEN_EXT_XTL0_EN        ( BIT(5) )
626 #define BIT_DCDC_GEN_XTL1_EN            ( BIT(4) )
627 #define BIT_DCDC_GEN_XTL0_EN            ( BIT(3) )
628 #define BIT_DCDC_CORE_EXT_XTL0_EN       ( BIT(2) )
629 #define BIT_DCDC_CORE_XTL1_EN           ( BIT(1) )
630 #define BIT_DCDC_CORE_XTL0_EN           ( BIT(0) )
631
632 /* bits definitions for register ANA_REG_GLB_32KLESS_CTRL0 */
633 #define BIT_RC_MODE_WR_ACK_FLAG         ( BIT(14) )
634 #define BIT_XO_LOW_CUR_FLAG             ( BIT(13) )
635 #define BIT_XO_LOW_CUR_FRC_RTCSET       ( BIT(12) )
636 #define BIT_XO_LOW_CUR_FRC_RTCCLR       ( BIT(11) )
637 #define BIT_RC_MODE_WR_ACK_FLAG_CLR     ( BIT(10) )
638 #define BIT_XO_LOW_CUR_FLAG_CLR         ( BIT(9) )
639 #define BIT_XO_LOW_CUR_CNT_CLR          ( BIT(8) )
640 #define BIT_LDO_DCXO_LP_PD_RTCSET       ( BIT(7) )
641 #define BIT_LDO_DCXO_LP_PD_RTCCLR       ( BIT(6) )
642 #define BIT_SLP_XO_LOW_CUR_EN           ( BIT(5) )
643 #define BIT_XO_LOW_CUR_EN               ( BIT(3) )
644 #define BIT_EXT_32K_PD                  ( BIT(2) )
645 #define BIT_RC_32K_SEL                  ( BIT(1) )
646 #define BIT_RC_32K_EN                   ( BIT(0) )
647
648 /* bits definitions for register ANA_REG_GLB_32KLESS_CTRL1 */
649 #define BITS_RC_MODE(_x_)               ( (_x_) << 0 )
650
651 /* bits definitions for register ANA_REG_GLB_32KLESS_CTRL2 */
652 #define BITS_XO_LOW_CUR_CNT_LOW(_x_)    ( (_x_) << 0 )
653
654 /* bits definitions for register ANA_REG_GLB_32KLESS_CTRL3 */
655 #define BITS_XO_LOW_CUR_CNT_HIGH(_x_)   ( (_x_) << 0 )
656
657 /* bits definitions for register ANA_REG_GLB_AUXAD_CTL */
658 #define BIT_AUXAD_CURRENTSEN_EN         ( BIT(6) )
659 #define BIT_AUXAD_CURRENTSEL            ( BIT(5) )
660 #define BITS_AUXAD_CURRENT_IBS(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
661
662 /* bits definitions for register ANA_REG_GLB_XTL_WAIT_CTRL */
663 #define BIT_SLP_XTLBUF_PD_EN            ( BIT(9) )
664 #define BIT_XTL_EN                      ( BIT(8) )
665 #define BITS_XTL_WAIT(_x_)              ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
666
667 /* bits definitions for register ANA_REG_GLB_RGB_CTRL */
668 #define BIT_RTC_PWM0_EN                 ( BIT(15) )
669 #define BIT_PWM0_EN                     ( BIT(14) )
670 #define BIT_IB_REX_EN                   ( BIT(12) )
671 #define BIT_IB_TRIM_EM_SEL              ( BIT(11) )
672 #define BITS_RGB_V(_x_)                 ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)) )
673 #define BIT_SLP_RGB_PD_EN               ( BIT(2) )
674 #define BIT_RGB_PD_HW_EN                ( BIT(1) )
675 #define BIT_RGB_PD_SW                   ( BIT(0) )
676
677 /* bits definitions for register ANA_REG_GLB_WHTLED_CTRL */
678 #define BITS_IB_TRIM(_x_)               ( (_x_) << 9 & (BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
679 #define BIT_WHTLED_SERIES_EN            ( BIT(8) )
680 #define BIT_WHTLED_PD_SEL               ( BIT(7) )
681 #define BITS_WHTLED_V(_x_)              ( (_x_) << 1 & (BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)) )
682 #define BIT_WHTLED_PD                   ( BIT(0) )
683
684 /* bits definitions for register ANA_REG_GLB_KPLED_CTRL */
685 #define BITS_KPLED_V(_x_)               ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
686 #define BIT_KPLED_PD                    ( BIT(11) )
687 #define BIT_KPLED_PULLDOWN_EN           ( BIT(10) )
688 #define BIT_SLP_LDOKPLED_PD_EN          ( BIT(9) )
689 #define BIT_LDO_KPLED_PD                ( BIT(8) )
690 #define BITS_LDO_KPLED_V(_x_)           ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
691
692 /* bits definitions for register ANA_REG_GLB_VIBR_CTRL0 */
693 #define BITS_CUR_DRV_CAL_SEL(_x_)       ( (_x_) << 12 & (BIT(12)|BIT(13)) )
694 #define BIT_VIBR_PULLDOWN_EN            ( BIT(11) )
695 #define BIT_VIBR_PULLUP_EN              ( BIT(10) )
696 #define BIT_SLP_LDOVIBR_PD_EN           ( BIT(9) )
697 #define BIT_LDO_VIBR_PD                 ( BIT(8) )
698 #define BITS_LDO_VIBR_V(_x_)            ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
699
700 /* bits definitions for register ANA_REG_GLB_AUDIO_CTRL0 */
701 #define BIT_AUD_SLP_APP_RST_EN          ( BIT(15) )
702 #define BITS_CLK_AUD_HBD_DIV(_x_)       ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
703 #define BIT_CLK_AUD_LOOP_INV_EN         ( BIT(4) )
704 #define BIT_CLK_AUDIF_TX_INV_EN         ( BIT(3) )
705 #define BIT_CLK_AUDIF_RX_INV_EN         ( BIT(2) )
706 #define BIT_CLK_AUD_6P5M_TX_INV_EN      ( BIT(1) )
707 #define BIT_CLK_AUD_6P5M_RX_INV_EN      ( BIT(0) )
708
709 /* bits definitions for register ANA_REG_GLB_AUDIO_CTRL1 */
710 #define BIT_IMPD_ADC_SOFT_RST           ( BIT(7) )
711 #define BIT_HEAD_INSERT_EIC_EN          ( BIT(6) )
712 #define BIT_AUDIO_CHP_CLK_DIV_EN        ( BIT(5) )
713 #define BITS_AUDIO_CHP_CLK_DIV(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
714
715 /* bits definitions for register ANA_REG_GLB_CHGR_CTRL0 */
716 #define BIT_CHGLDO_DIS                  ( BIT(15) )
717 #define BITS_CHGR_CV_V(_x_)             ( (_x_) << 6 & (BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
718 #define BITS_CHGR_END_V(_x_)            ( (_x_) << 4 & (BIT(4)|BIT(5)) )
719 #define BIT_CHGR_PD                     ( BIT(0) )
720
721 /* bits definitions for register ANA_REG_GLB_CHGR_CTRL1 */
722 #define BITS_CHGR_CC_I(_x_)             ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
723 #define BITS_VBAT_OVP_V(_x_)            ( (_x_) << 6 & (BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
724 #define BITS_VCHG_OVP_V(_x_)            ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)) )
725
726 /* bits definitions for register ANA_REG_GLB_CHGR_CTRL2 */
727 #define BIT_CHGR_INT_EN                 ( BIT(15) )
728 #define BIT_CHGR_DRV                    ( BIT(7) )
729 #define BIT_CHGR_OSC                    ( BIT(6) )
730 #define BITS_CHGR_DPM(_x_)              ( (_x_) << 4 & (BIT(4)|BIT(5)) )
731 #define BITS_CHGR_ITERM(_x_)            ( (_x_) << 2 & (BIT(2)|BIT(3)) )
732 #define BIT_CHGR_CC_EN                  ( BIT(1) )
733 #define BIT_RECHG                       ( BIT(0) )
734
735 /* bits definitions for register ANA_REG_GLB_CHGR_DET_FGU_CTRL */
736 #define BIT_FGUA_SOFT_RST               ( BIT(13) )
737 #define BIT_LDO_FGU_PD                  ( BIT(12) )
738 #define BIT_SD_CHOP_CAP_EN              ( BIT(8) )
739 #define BITS_SD_CLK_P(_x_)              ( (_x_) << 6 & (BIT(6)|BIT(7)) )
740 #define BIT_SD_DCOFFSET_EN              ( BIT(5) )
741 #define BIT_SD_CHOP_EN                  ( BIT(4) )
742 #define BIT_CHOP_EN                                             (BIT_SD_CHOP_EN)
743 #define BIT_DP_DM_AUX_EN                ( BIT(1) )
744 #define BIT_DP_DM_SW_EN                 ( BIT(0) )
745
746 /* bits definitions for register ANA_REG_GLB_CHGR_STATUS */
747 #define BIT_CHG_DET_DONE                ( BIT(11) )
748 #define BIT_DP_LOW                      ( BIT(10) )
749 #define BIT_DCP_DET                     ( BIT(9) )
750 #define BIT_CHG_DET                     ( BIT(8) )
751 #define BIT_SDP_INT                     ( BIT(7) )
752 #define BIT_DCP_INT                     ( BIT(6) )
753 #define BIT_CDP_INT                     ( BIT(5) )
754 #define BIT_CHGR_CV_STATUS              ( BIT(4) )
755 #define BIT_CHGR_ON                     ( BIT(3) )
756 #define BIT_CHGR_INT                    ( BIT(2) )
757 #define BIT_VBAT_OVI                    ( BIT(1) )
758 #define BIT_VCHG_OVI                    ( BIT(0) )
759
760 /* bits definitions for register ANA_REG_GLB_MIXED_CTRL0 */
761 #define BIT_PTEST_PD_RTCSET             ( BIT(15) )
762 #define BIT_DCDC_V_CTRL_MODE            ( BIT(14) )
763 #define BIT_LDO_RAMP_EN                 ( BIT(13) )
764 #define BIT_BG_LP_EN                    ( BIT(12) )
765 #define BITS_VBAT_CRASH_V(_x_)          ( (_x_) << 10 & (BIT(10)|BIT(11)) )
766 #define BIT_OVLO_EN                     ( BIT(9) )
767 #define BITS_OVLO_CAL(_x_)              ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)) )
768 #define BITS_OVLO_V(_x_)                ( (_x_) << 2 & (BIT(2)|BIT(3)) )
769 #define BITS_OVLO_T(_x_)                ( (_x_) << 0 & (BIT(0)|BIT(1)) )
770
771 /* bits definitions for register ANA_REG_GLB_MIXED_CTRL1 */
772 #define BITS_XOSC32K_CTL(_x_)           ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
773 #define BITS_BATON_T(_x_)               ( (_x_) << 10 & (BIT(10)|BIT(11)) )
774 #define BIT_BATDET_LDO_SEL              ( BIT(9) )
775 #define BIT_THM_CHIP_PD_FLAG            ( BIT(8) )
776 #define BIT_THM_CHIP_PD_FLAG_CLR        ( BIT(7) )
777 #define BITS_THM_CAL_SEL(_x_)           ( (_x_) << 5 & (BIT(5)|BIT(6)) )
778 #define BIT_THM_AUTO_PD_EN              ( BIT(4) )
779 #define BIT_ALL_GPI_DEB                 ( BIT(3) )
780 #define BIT_GPI_DEBUG_EN                ( BIT(2) )
781 #define BIT_ALL_INT_DEB                 ( BIT(1) )
782 #define BIT_INT_DEBUG_EN                ( BIT(0) )
783
784 /* bits definitions for register ANA_REG_GLB_SWRST_CTRL */
785 #define BIT_POR_RTC_PD                  ( BIT(15) )
786 #define BITS_POR_RTC_I(_x_)             ( (_x_) << 13 & (BIT(13)|BIT(14)) )
787 #define BIT_SW_RST_GEN1_PD_EN           ( BIT(12) )
788 #define BIT_SW_RST_GEN0_PD_EN           ( BIT(11) )
789 #define BIT_EXT_RSTN_PD_EN              ( BIT(10) )
790 #define BIT_PB_7S_RST_PD_EN             ( BIT(9) )
791 #define BIT_SW_RST_EMMCCORE_PD_EN       ( BIT(8) )
792 #define BIT_KEY2_7S_RST_EN              ( BIT(7) )
793 #define BIT_WDG_RST_PD_EN               ( BIT(6) )
794 #define BITS_SW_RST_PD_THRESHOLD(_x_)   ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
795
796 /* bits definitions for register ANA_REG_GLB_POR_RST_MONITOR */
797 #define BITS_POR_RST_MONITOR(_x_)       ( (_x_) << 0 )
798
799 /* bits definitions for register ANA_REG_GLB_WDG_RST_MONITOR */
800 #define BITS_WDG_RST_MONITOR(_x_)       ( (_x_) << 0 )
801
802 /* bits definitions for register ANA_REG_GLB_POR_PIN_RST_MONITOR */
803 #define BITS_POR_PIN_RST_MONITOR(_x_)   ( (_x_) << 0 )
804
805 /* bits definitions for register ANA_REG_GLB_POR_SRC_FLAG */
806 #define BIT_POR_SW_FORCE_ON             ( BIT(15) )
807 #define BITS_POR_SRC_FLAG(_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)) )
808
809 /* bits definitions for register ANA_REG_GLB_POR_7S_CTRL */
810 #define BIT_PBINT_7S_FLAG_CLR           ( BIT(15) )
811 #define BIT_EXT_RSTN_FLAG_CLR           ( BIT(14) )
812 #define BIT_CHGR_INT_FLAG_CLR           ( BIT(13) )
813 #define BIT_PBINT2_FLAG_CLR             ( BIT(12) )
814 #define BIT_PBINT_FLAG_CLR              ( BIT(11) )
815 #define BIT_PBINT_7S_RST_SWMODE         ( BIT(8) )
816 #define BITS_PBINT_7S_RST_THRESHOLD(_x_)( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
817 #define BIT_PBINT_7S_AUTO_ON_EN         ( BIT(2) )
818 #define BIT_PBINT_7S_RST_DISABLE        ( BIT(1) )
819 #define BIT_PBINT_7S_RST_MODE           ( BIT(0) )
820
821 /* bits definitions for register ANA_REG_GLB_HWRST_RTC */
822 #define BITS_HWRST_RTC_REG_STS(_x_)     ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
823 #define BITS_HWRST_RTC_REG_SET(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
824
825 /* bits definitions for register ANA_REG_GLB_CHIP_ID_LOW */
826 #define BITS_CHIP_ID_LOW(_x_)           ( (_x_) << 0 )
827
828 /* bits definitions for register ANA_REG_GLB_CHIP_ID_HIGH */
829 #define BITS_CHIP_ID_HIGH(_x_)          ( (_x_) << 0 )
830
831 /* bits definitions for register ANA_REG_GLB_ARM_MF_REG */
832 #define BITS_ARM_MF_REG(_x_)            ( (_x_) << 0 )
833
834 /* bits definitions for register ANA_REG_GLB_ARCH_EN */
835 #define BIT_ARCH_EN                     ( BIT(0) )
836
837 /* bits definitions for register ANA_REG_GLB_MCU_WR_PROT_VALUE */
838 #define BIT_MCU_WR_PROT                 ( BIT(15) )
839 #define BITS_MCU_WR_PROT_VALUE(_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)) )
840
841 /* bits definitions for register ANA_REG_GLB_PWR_WR_PROT_VALUE */
842 #define BIT_PWR_WR_PROT                 ( BIT(15) )
843 #define BITS_PWR_WR_PROT_VALUE(_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)) )
844
845 /* bits definitions for register ANA_REG_GLB_SMPL_CTRL0 */
846 #define BITS_SMPL_ENABLE(_X_)                         ( (_X_) & (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)) )
847
848 /* bits definitions for register ANA_REG_GLB_SMPL_CTRL1 */
849 #define BIT_SMPL_PWR_ON_FLAG            ( BIT(15) )
850 #define BIT_SMPL_MODE_WR_ACK_FLAG       ( BIT(14) )
851 #define BIT_SMPL_PWR_ON_FLAG_CLR        ( BIT(13) )
852 #define BIT_SMPL_MODE_WR_ACK_FLAG_CLR   ( BIT(12) )
853 #define BIT_SMPL_PWR_ON_SET             ( BIT(11) )
854 #define BIT_SMPL_EN                     ( BIT(0) )
855
856 /* bits definitions for register ANA_REG_GLB_RTC_RST0 */
857 #define BITS_RTC_CLK_FLAG_SET(_x_)      ( (_x_) << 15 & (BIT(15)) )
858
859 /* bits definitions for register ANA_REG_GLB_RTC_RST1 */
860 #define BITS_RTC_CLK_FLAG_CLR(_x_)      ( (_x_) << 15 & (BIT(15)) )
861
862 /* bits definitions for register ANA_REG_GLB_RTC_RST2 */
863 #define BITS_RTC_CLK_FLAG_RTC(_x_)      ( (_x_) << 15 & (BIT(15)) )
864
865 /* bits definitions for register ANA_REG_GLB_LDO_SHPT_PD1 */
866 #define BIT_LDO_USB_SHPT_PD             ( BIT(12) )
867 #define BIT_LDO_DCXO_SHPT_PD            ( BIT(11) )
868 #define BIT_LDO_WIFIPA_SHPT_PD          ( BIT(10) )
869 #define BIT_LDO_VDD25_SHPT_PD           ( BIT(9) )
870 #define BIT_LDO_VDD28_SHPT_PD           ( BIT(8) )
871 #define BIT_LDO_SDIO_SHPT_PD            ( BIT(7) )
872 #define BIT_LDO_SDCORE_SHPT_PD          ( BIT(6) )
873 #define BIT_LDO_EMMCCORE_SHPT_PD        ( BIT(5) )
874 #define BIT_LDO_SIM2_SHPT_PD            ( BIT(4) )
875 #define BIT_LDO_SIM1_SHPT_PD            ( BIT(3) )
876 #define BIT_LDO_SIM0_SHPT_PD            ( BIT(2) )
877 #define BIT_LDO_CAMMOT_SHPT_PD          ( BIT(1) )
878 #define BIT_LDO_CAMA_SHPT_PD            ( BIT(0) )
879
880 /* bits definitions for register ANA_REG_GLB_LDO_SHPT_PD2 */
881 #define BIT_LDO_RF0_SHPT_PD             ( BIT(7) )
882 #define BIT_LDO_GEN1_SHPT_PD            ( BIT(6) )
883 #define BIT_LDO_GEN0_SHPT_PD            ( BIT(5) )
884 #define BIT_LDO_CAMD_SHPT_PD            ( BIT(4) )
885 #define BIT_LDO_VDD18_SHPT_PD           ( BIT(3) )
886 #define BIT_LDO_CAMIO_SHPT_PD           ( BIT(2) )
887 #define BIT_LDO_KPLED_SHPT_PD           ( BIT(1) )
888 #define BIT_LDO_VIBR_SHPT_PD            ( BIT(0) )
889
890 /* bits definitions for register ANA_REG_GLB_BATDET_CUR_CTRL */
891 #define BIT_BATDET_CUR_EN               ( BIT(4) )
892 #define BITS_BATDET_CUR_I(_x_)          ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
893
894 /* bits definitions for register ANA_REG_GLB_RTC_CLK_STOP */
895 #define BIT_RTC_CLK_STOP_FLAG           ( BIT(7) )
896 #define BITS_RTC_CLK_STOP_THRESHOLD(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)) )
897
898 /* bits definitions for register ANA_REG_GLB_VBAT_DROP_CNT */
899 #define BITS_VBAT_DROP_CNT(_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)) )
900
901 /* bits definitions for register ANA_REG_GLB_DCDC_DISCHRG */
902 #define BITS_DCDC_ARM_DISCHRG(_x_)      ( (_x_) << 12 & (BIT(12)|BIT(13)) )
903 #define BITS_DCDC_CORE_DISCHRG(_x_)     ( (_x_) << 10 & (BIT(10)|BIT(11)) )
904 #define BITS_DCDC_MEM_DISCHRG(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)) )
905 #define BITS_DCDC_GEN_DISCHRG(_x_)      ( (_x_) << 6 & (BIT(6)|BIT(7)) )
906 #define BITS_DCDC_RF_DISCHRG(_x_)       ( (_x_) << 4 & (BIT(4)|BIT(5)) )
907 #define BITS_DCDC_CON_DISCHRG(_x_)      ( (_x_) << 2 & (BIT(2)|BIT(3)) )
908 #define BITS_DCDC_WPA_DISCHRG(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)) )
909
910 /* bits definitions for register ANA_REG_GLB_DCDC_CORE_ADI */
911 #define BITS_DCDC_CORE_CTL_SW_ADI(_x_)  ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
912 #define BITS_DCDC_CORE_CAL_SW_ADI(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
913
914 /* bits definitions for register ANA_REG_GLB_DCDC_ARM_ADI */
915 #define BITS_DCDC_ARM_CTL_ADI(_x_)      ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
916 #define BITS_DCDC_ARM_CAL_ADI(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
917
918 /* bits definitions for register ANA_REG_GLB_DCDC_MEM_ADI */
919 #define BITS_DCDC_MEM_CTRL_ADI(_x_)     ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
920 #define BITS_DCDC_MEM_CAL_ADI(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
921
922 /* bits definitions for register ANA_REG_GLB_DCDC_GEN_ADI */
923 #define BITS_DCDC_GEN_CTRL_ADI(_x_)     ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
924 #define BITS_DCDC_GEN_CAL_ADI(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
925
926 /* bits definitions for register ANA_REG_GLB_DCDC_WPA_ADI */
927 #define BITS_DCDC_WPA_CAL_ADI(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)) )
928
929 /* bits definitions for register ANA_REG_GLB_DCDC_WPA_DCM_ADI */
930 #define BIT_DCDC_WPA_DCM_ADI            ( BIT(0) )
931
932 /* bits definitions for register ANA_REG_GLB_DCDC_CON_ADI */
933 #define BITS_DCDC_CON_CTRL_ADI(_x_)     ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
934 #define BITS_DCDC_CON_CAL_ADI(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
935
936 /* bits definitions for register ANA_REG_GLB_DCDC_RF_ADI */
937 #define BITS_DCDC_RF_CTRL_ADI(_x_)      ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
938 #define BITS_DCDC_RF_CAL_ADI(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
939
940 /* vars definitions for controller ANA_REGS_GLB */
941
942 #endif /* __ANA_REGS_GLB_H__ */