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