2 * Copyright (C) 2014-2015 Spreadtrum Communications Inc.
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
11 #ifndef __ANA_REGS_GLB_H__
12 #define __ANA_REGS_GLB_H__
14 //#ifndef __SCI_GLB_REGS_H__
15 //#error "Don't include this file directly, include <mach/sci_glb_regs.h>"
20 /* registers definitions for controller ANA_REGS_GLB */
21 #define ANA_REG_GLB_ARM_MODULE_EN SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0000)
22 #define ANA_REG_GLB_ARM_CLK_EN SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0004)
23 #define ANA_REG_GLB_RTC_CLK_EN SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0008)
24 #define ANA_REG_GLB_ARM_RST SCI_ADDR(ANA_REGS_GLB_PHYS, 0x000C)
25 #define ANA_REG_GLB_LDO_DCDC_PD_RTCSET SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0010)
26 #define ANA_REG_GLB_LDO_DCDC_PD_RTCCLR SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0014)
27 #define ANA_REG_GLB_RTC_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0018)
28 #define ANA_REG_GLB_LDO_PD_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x001C)
29 #define ANA_REG_GLB_LDO_V_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0020)
30 #define ANA_REG_GLB_LDO_V_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0024)
31 #define ANA_REG_GLB_LDO_V_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0028)
32 #define ANA_REG_GLB_LDO_CAL_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x002C)
33 #define ANA_REG_GLB_LDO_CAL_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0030)
34 #define ANA_REG_GLB_LDO_CAL_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0034)
35 #define ANA_REG_GLB_LDO_CAL_CTRL3 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0038)
36 #define ANA_REG_GLB_LDO_CAL_CTRL4 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x003C)
37 #define ANA_REG_GLB_LDO_CAL_CTRL5 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0040)
38 #define ANA_REG_GLB_LDO_CAL_CTRL6 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0044)
39 #define ANA_REG_GLB_AUXAD_CTL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0048)
40 #define ANA_REG_GLB_DCDC_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x004C)
41 #define ANA_REG_GLB_DCDC_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0050)
42 #define ANA_REG_GLB_DCDC_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0054)
43 #define ANA_REG_GLB_DCDC_CTRL3 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0058)
44 #define ANA_REG_GLB_DCDC_CTRL4 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x005C)
45 #define ANA_REG_GLB_DCDC_CTRL5 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0060)
46 #define ANA_REG_GLB_DCDC_CTRL6 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0064)
47 #define ANA_REG_GLB_DDR2_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0068)
48 #define ANA_REG_GLB_SLP_WAIT_DCDCARM SCI_ADDR(ANA_REGS_GLB_PHYS, 0x006C)
49 #define ANA_REG_GLB_LDO1828_XTL_CTL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0070)
50 #define ANA_REG_GLB_LDO_SLP_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0074)
51 #define ANA_REG_GLB_LDO_SLP_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0078)
52 #define ANA_REG_GLB_LDO_SLP_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x007C)
53 #define ANA_REG_GLB_LDO_SLP_CTRL3 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0080)
54 #define ANA_REG_GLB_AUD_SLP_CTRL4 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0084)
55 #define ANA_REG_GLB_DCDC_SLP_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0088)
56 #define ANA_REG_GLB_XTL_WAIT_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x008C)
57 #define ANA_REG_GLB_FLASH_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0090)
58 #define ANA_REG_GLB_WHTLED_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0094)
59 #define ANA_REG_GLB_WHTLED_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0098)
60 #define ANA_REG_GLB_WHTLED_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x009C)
61 #define ANA_REG_GLB_ANA_DRV_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00A0)
62 #define ANA_REG_GLB_VIBR_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00A4)
63 #define ANA_REG_GLB_VIBR_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00A8)
64 #define ANA_REG_GLB_VIBR_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00AC)
65 #define ANA_REG_GLB_VIBR_WR_PROT_VALUE SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00B0)
66 #define ANA_REG_GLB_AUDIO_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00B4)
67 #define ANA_REG_GLB_CHGR_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00B8)
68 #define ANA_REG_GLB_CHGR_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00BC)
69 #define ANA_REG_GLB_CHGR_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00C0)
70 #define ANA_REG_GLB_CHGR_STATUS SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00C4)
71 #define ANA_REG_GLB_ANA_MIXED_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00C8)
72 #define ANA_REG_GLB_PWR_XTL_EN0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00CC)
73 #define ANA_REG_GLB_PWR_XTL_EN1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00D0)
74 #define ANA_REG_GLB_PWR_XTL_EN2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00D4)
75 #define ANA_REG_GLB_PWR_XTL_EN3 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00D8)
76 #define ANA_REG_GLB_PWR_XTL_EN4 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00DC)
77 #define ANA_REG_GLB_PWR_XTL_EN5 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00E0)
78 #define ANA_REG_GLB_ANA_STATUS SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00E4)
79 #define ANA_REG_GLB_POR_RST_MONITOR SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00E8)
80 #define ANA_REG_GLB_WDG_RST_MONITOR SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00EC)
81 #define ANA_REG_GLB_POR_PIN_RST_MONITOR SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00F0)
82 #define ANA_REG_GLB_POR_SRC_FLAG SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00F4)
83 #define ANA_REG_GLB_POR_7S_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00F8)
84 #define ANA_REG_GLB_INT_DEBUG SCI_ADDR(ANA_REGS_GLB_PHYS, 0x00FC)
85 #define ANA_REG_GLB_GPI_DEBUG SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0100)
86 #define ANA_REG_GLB_HWRST_RTC SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0104)
87 #define ANA_REG_GLB_CHIP_ID_LOW SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0108)
88 #define ANA_REG_GLB_CHIP_ID_HIGH SCI_ADDR(ANA_REGS_GLB_PHYS, 0x010C)
89 #define ANA_REG_GLB_ARM_MF_REG SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0110)
90 #define ANA_REG_GLB_AFUSE_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0114)
91 #define ANA_REG_GLB_AFUSE_OUT0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0118)
92 #define ANA_REG_GLB_AFUSE_OUT1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x011C)
93 #define ANA_REG_GLB_AFUSE_OUT2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0120)
94 #define ANA_REG_GLB_AFUSE_OUT3 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0124)
95 #define ANA_REG_GLB_CA_CTRL4 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0128)
96 #define ANA_REG_GLB_MCU_WR_PROT_VALUE SCI_ADDR(ANA_REGS_GLB_PHYS, 0x012C)
97 #define ANA_REG_GLB_MP_PWR_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0130)
98 #define ANA_REG_GLB_MP_PWR_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0134)
99 #define ANA_REG_GLB_MP_PWR_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0138)
100 #define ANA_REG_GLB_MP_PWR_CTRL3 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x013C)
101 #define ANA_REG_GLB_MP_LDO_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0140)
102 #define ANA_REG_GLB_MP_CHG_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0144)
103 #define ANA_REG_GLB_MP_MISC_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0148)
104 #define ANA_REG_GLB_MP_DCDC_DEDT_CTRL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x014C)
105 #define ANA_REG_GLB_CA_CTRL0 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0150)
106 #define ANA_REG_GLB_CA_CTRL1 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0154)
107 #define ANA_REG_GLB_CA_CTRL2 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0158)
108 #define ANA_REG_GLB_CA_CTRL3 SCI_ADDR(ANA_REGS_GLB_PHYS, 0x015C)
109 #define ANA_REG_GLB_DCDC_CORE_ADI SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0160)
110 #define ANA_REG_GLB_DCDC_ARM_ADI SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0164)
111 #define ANA_REG_GLB_DCDC_MEM_ADI SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0168)
112 #define ANA_REG_GLB_DCDC_GEN_ADI SCI_ADDR(ANA_REGS_GLB_PHYS, 0x016C)
113 #define ANA_REG_GLB_DCDC_WRF_ADI SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0170)
114 #define ANA_REG_GLB_DCDC_WPA_ADI SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0174)
115 #define ANA_REG_GLB_DCDC_WPA_DCM_ADI SCI_ADDR(ANA_REGS_GLB_PHYS, 0x017C)
117 #define ANA_REG_GLB_LDO_CAL_SEL SCI_ADDR(ANA_REGS_GLB_PHYS, 0x0044)
119 /* bits definitions for register ANA_REG_GLB_ARM_MODULE_EN */
120 #define BIT_ANA_THM_EN ( BIT(12) )
121 #define BIT_ANA_BLTC_EN ( BIT(10) )
122 #define BIT_ANA_PINREG_EN ( BIT(9) )
123 #define BIT_ANA_FGU_EN ( BIT(8) )
124 #define BIT_ANA_GPIO_EN ( BIT(7) )
125 #define BIT_ANA_ADC_EN ( BIT(6) )
126 #define BIT_ANA_HDT_EN ( BIT(5) )
127 #define BIT_ANA_AUD_EN ( BIT(4) )
128 #define BIT_ANA_EIC_EN ( BIT(3) )
129 #define BIT_ANA_WDG_EN ( BIT(2) )
130 #define BIT_ANA_RTC_EN ( BIT(1) )
132 /* bits definitions for register ANA_REG_GLB_ARM_CLK_EN */
133 #define BIT_CLK_AUXAD_EN ( BIT(9) )
134 #define BIT_CLK_AUXADC_EN ( BIT(8) )
135 #define BIT_CLK_AUD_HID_EN ( BIT(5) )
136 #define BIT_CLK_AUD_HBD_EN ( BIT(4) )
137 #define BIT_CLK_AUD_LOOP_EN ( BIT(3) )
138 #define BIT_CLK_AUD_6P5M_EN ( BIT(2) )
139 #define BIT_CLK_AUDIF_EN ( BIT(1) )
141 /* bits definitions for register ANA_REG_GLB_RTC_CLK_EN */
142 #define BIT_RTC_FLASH_EN ( BIT(13) )
143 #define BIT_RTC_THMA_AUTO_EN ( BIT(12) )
144 #define BIT_RTC_THMA_EN ( BIT(11) )
145 #define BIT_RTC_THM_EN ( BIT(10) )
146 #define BIT_RTC_BLTC_EN ( BIT(8) )
147 #define BIT_RTC_FGU_EN ( BIT(7) )
148 #define BIT_RTC_FGUA_EN ( BIT(6) )
149 #define BIT_RTC_VIBR_EN ( BIT(5) )
150 #define BIT_RTC_AUD_EN ( BIT(4) )
151 #define BIT_RTC_EIC_EN ( BIT(3) )
152 #define BIT_RTC_WDG_EN ( BIT(2) )
153 #define BIT_RTC_RTC_EN ( BIT(1) )
154 #define BIT_RTC_ARCH_EN ( BIT(0) )
156 /* bits definitions for register ANA_REG_GLB_ARM_RST */
157 #define BIT_ANA_THMA_SOFT_RST ( BIT(14) )
158 #define BIT_ANA_THM_SOFT_RST ( BIT(13) )
159 #define BIT_ANA_AUD_32K_SOFT_RST ( BIT(12) )
160 #define BIT_ANA_AUDTX_SOFT_RST ( BIT(11) )
161 #define BIT_ANA_AUDRX_SOFT_RST ( BIT(10) )
162 #define BIT_ANA_AUD_SOFT_RST ( BIT(9) )
163 #define BIT_ANA_AUD_HDT_SOFT_RST ( BIT(8) )
164 #define BIT_ANA_GPIO_SOFT_RST ( BIT(7) )
165 #define BIT_ANA_ADC_SOFT_RST ( BIT(6) )
166 #define BIT_ANA_PWM0_SOFT_RST ( BIT(5) )
167 #define BIT_ANA_FGU_SOFT_RST ( BIT(4) )
168 #define BIT_ANA_EIC_SOFT_RST ( BIT(3) )
169 #define BIT_ANA_WDG_SOFT_RST ( BIT(2) )
170 #define BIT_ANA_RTC_SOFT_RST ( BIT(1) )
171 #define BIT_ANA_BLTC_SOFT_RST ( BIT(0) )
173 /* bits definitions for register ANA_REG_GLB_LDO_DCDC_PD_RTCSET */
174 #define BIT_LDO_AVDD18_PD_RTCSET ( BIT(15) )
175 #define BIT_DCDC_OTP_PD_RTCSET ( BIT(14) )
176 #define BIT_DCDC_WRF_PD_RTCSET ( BIT(13) )
177 #define BIT_DCDC_GEN_PD_RTCSET ( BIT(12) )
178 #define BIT_DCDC_MEM_PD_RTCSET ( BIT(11) )
179 #define BIT_DCDC_ARM_PD_RTCSET ( BIT(10) )
180 #define BIT_DCDC_CORE_PD_RTCSET ( BIT(9) )
181 #define BIT_LDO_EMMCCORE_PD_RTCSET ( BIT(8) )
182 #define BIT_LDO_EMMCIO_PD_RTCSET ( BIT(7) )
183 #define BIT_LDO_RF2_PD_RTCSET ( BIT(6) )
184 #define BIT_LDO_RF1_PD_RTCSET ( BIT(5) )
185 #define BIT_LDO_RF0_PD_RTCSET ( BIT(4) )
186 #define BIT_LDO_VDD25_PD_RTCSET ( BIT(3) )
187 #define BIT_LDO_VDD28_PD_RTCSET ( BIT(2) )
188 #define BIT_LDO_VDD18_PD_RTCSET ( BIT(1) )
189 #define BIT_BG_PD_RTCSET ( BIT(0) )
191 /* bits definitions for register ANA_REG_GLB_LDO_DCDC_PD_RTCCLR */
192 #define BIT_LDO_AVDD18_PD_RTCCLR ( BIT(15) )
193 #define BIT_DCDC_OTP_PD_RTCCLR ( BIT(14) )
194 #define BIT_DCDC_WRF_PD_RTCCLR ( BIT(13) )
195 #define BIT_DCDC_GEN_PD_RTCCLR ( BIT(12) )
196 #define BIT_DCDC_MEM_PD_RTCCLR ( BIT(11) )
197 #define BIT_DCDC_ARM_PD_RTCCLR ( BIT(10) )
198 #define BIT_DCDC_CORE_PD_RTCCLR ( BIT(9) )
199 #define BIT_LDO_EMMCCORE_PD_RTCCLR ( BIT(8) )
200 #define BIT_LDO_EMMCIO_PD_RTCCLR ( BIT(7) )
201 #define BIT_LDO_RF2_PD_RTCCLR ( BIT(6) )
202 #define BIT_LDO_RF1_PD_RTCCLR ( BIT(5) )
203 #define BIT_LDO_RF0_PD_RTCCLR ( BIT(4) )
204 #define BIT_LDO_VDD25_PD_RTCCLR ( BIT(3) )
205 #define BIT_LDO_VDD28_PD_RTCCLR ( BIT(2) )
206 #define BIT_LDO_VDD18_PD_RTCCLR ( BIT(1) )
207 #define BIT_BG_PD_RTCCLR ( BIT(0) )
209 /* bits definitions for register ANA_REG_GLB_RTC_CTRL */
210 #define BITS_XOSC32K_CTL_STS(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
211 #define BIT_XOSC32K_CTL_B3_RTCCLR ( BIT(7) )
212 #define BIT_XOSC32K_CTL_B2_RTCCLR ( BIT(6) )
213 #define BIT_XOSC32K_CTL_B1_RTCCLR ( BIT(5) )
214 #define BIT_XOSC32K_CTL_B0_RTCCLR ( BIT(4) )
215 #define BIT_XOSC32K_CTL_B3_RTCSET ( BIT(3) )
216 #define BIT_XOSC32K_CTL_B2_RTCSET ( BIT(2) )
217 #define BIT_XOSC32K_CTL_B1_RTCSET ( BIT(1) )
218 #define BIT_XOSC32K_CTL_B0_RTCSET ( BIT(0) )
220 /* bits definitions for register ANA_REG_GLB_LDO_PD_CTRL */
221 #define BIT_LDO_LPREF_PD_SW ( BIT(12) )
222 #define BIT_DCDC_WPA_PD ( BIT(11) )
223 #define BIT_LDO_CLSG_PD ( BIT(10) )
224 #define BIT_LDO_USB_PD ( BIT(9) )
225 #define BIT_LDO_CAMMOT_PD ( BIT(8) )
226 #define BIT_LDO_CAMIO_PD ( BIT(7) )
227 #define BIT_LDO_CAMD_PD ( BIT(6) )
228 #define BIT_LDO_CAMA_PD ( BIT(5) )
229 #define BIT_LDO_SIM2_PD ( BIT(4) )
230 #define BIT_LDO_SIM1_PD ( BIT(3) )
231 #define BIT_LDO_SIM0_PD ( BIT(2) )
232 #define BIT_LDO_SD_PD ( BIT(1) )
234 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL0 */
235 #define BITS_LDO_EMMCCORE_V(_x_) ( (_x_) << 14 & (BIT(14)|BIT(15)) )
236 #define BITS_LDO_EMMCIO_V(_x_) ( (_x_) << 12 & (BIT(12)|BIT(13)) )
237 #define BITS_LDO_RF2_V(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)) )
238 #define BITS_LDO_RF1_V(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)) )
239 #define BITS_LDO_RF0_V(_x_) ( (_x_) << 6 & (BIT(6)|BIT(7)) )
240 #define BITS_LDO_VDD25_V(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)) )
241 #define BITS_LDO_VDD28_V(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)) )
242 #define BITS_LDO_VDD18_V(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)) )
244 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL1 */
245 #define BITS_LDO_SIM2_V(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)) )
246 #define BITS_LDO_SIM1_V(_x_) ( (_x_) << 6 & (BIT(6)|BIT(7)) )
247 #define BITS_LDO_SIM0_V(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)) )
248 #define BITS_LDO_SD_V(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)) )
249 #define BITS_LDO_AVDD18_V(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)) )
251 /* bits definitions for register ANA_REG_GLB_LDO_V_CTRL2 */
252 #define BITS_VBATBK_RES(_x_) ( (_x_) << 14 & (BIT(14)|BIT(15)) )
253 #define BITS_VBATBK_V(_x_) ( (_x_) << 12 & (BIT(12)|BIT(13)) )
254 #define BITS_LDO_CLSG_V(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)) )
255 #define BITS_LDO_USB_V(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)) )
256 #define BITS_LDO_CAMMOT_V(_x_) ( (_x_) << 6 & (BIT(6)|BIT(7)) )
257 #define BITS_LDO_CAMIO_V(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)) )
258 #define BITS_LDO_CAMD_V(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)) )
259 #define BITS_LDO_CAMA_V(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)) )
261 /* bits definitions for register ANA_REG_GLB_LDO_CAL_CTRL0 */
262 #define BITS_LDO_VDD25_CAL(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
263 #define BITS_LDO_VDD28_CAL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
264 #define BITS_LDO_VDD18_CAL(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
266 /* bits definitions for register ANA_REG_GLB_LDO_CAL_CTRL1 */
267 #define BITS_LDO_RF2_CAL(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
268 #define BITS_LDO_RF1_CAL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
269 #define BITS_LDO_RF0_CAL(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
271 /* bits definitions for register ANA_REG_GLB_LDO_CAL_CTRL2 */
272 #define BITS_LDO_USB_CAL(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
273 #define BITS_LDO_EMMCCORE_CAL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
274 #define BITS_LDO_EMMCIO_CAL(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
276 /* bits definitions for register ANA_REG_GLB_LDO_CAL_CTRL3 */
277 #define BITS_LDO_SD_CAL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
278 #define BITS_LDO_AVDD18_CAL(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
280 /* bits definitions for register ANA_REG_GLB_LDO_CAL_CTRL4 */
281 #define BITS_LDO_CAMA_CAL(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
282 #define BITS_LDO_SIM2_CAL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
283 #define BITS_LDO_SIM_CAL(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
285 /* bits definitions for register ANA_REG_GLB_LDO_CAL_CTRL5 */
286 #define BITS_LDO_CAMMOT_CAL(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
287 #define BITS_LDO_CAMIO_CAL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
288 #define BITS_LDO_CAMD_CAL(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
290 /* bits definitions for register ANA_REG_GLB_LDO_CAL_CTRL6 */
291 #define BITS_LDOA_CAL_SEL(_x_) ( (_x_) << 11 & (BIT(11)|BIT(12)|BIT(13)) )
292 #define BITS_LDOD_CAL_SEL(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)) )
293 #define BITS_LDODCDC_CAL_SEL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)) )
294 #define BITS_LDO_CLSG_CAL(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
296 /* bits definitions for register ANA_REG_GLB_AUXAD_CTL */
297 #define BIT_AUXAD_CURRENTSEN_EN ( BIT(6) )
298 #define BIT_AUXAD_CURRENTSEL ( BIT(5) )
299 #define BITS_AUXAD_CURRENT_IBS(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
301 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL0 */
302 #define BIT_DCDC_CORE_LP_EN ( BIT(15) )
303 #define BIT_DCDC_CORE_CL_CTRL ( BIT(14) )
304 #define BITS_DCDC_CORE_PDRSLOW(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
305 #define BIT_DCDC_CORE_PFM ( BIT(9) )
306 #define BIT_DCDC_CORE_DCM ( BIT(8) )
307 #define BIT_DCDC_ARM_LP_EN ( BIT(7) )
308 #define BIT_DCDC_ARM_CL_CTRL ( BIT(6) )
309 #define BITS_DCDC_ARM_PDRSLOW(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)|BIT(4)|BIT(5)) )
310 #define BIT_DCDC_ARM_PFM ( BIT(1) )
311 #define BIT_DCDC_ARM_DCM ( BIT(0) )
313 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL1 */
314 #define BIT_DCDC_MEM_LP_EN ( BIT(15) )
315 #define BIT_DCDC_MEM_CL_CTRL ( BIT(14) )
316 #define BITS_DCDC_MEM_PDRSLOW(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
317 #define BIT_DCDC_MEM_PFM ( BIT(9) )
318 #define BIT_DCDC_MEM_DCM ( BIT(8) )
319 #define BIT_DCDC_GEN_LP_EN ( BIT(7) )
320 #define BIT_DCDC_GEN_CL_CTRL ( BIT(6) )
321 #define BITS_DCDC_GEN_PDRSLOW(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)|BIT(4)|BIT(5)) )
322 #define BIT_DCDC_GEN_PFM ( BIT(1) )
323 #define BIT_DCDC_GEN_DCM ( BIT(0) )
325 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL2 */
326 #define BIT_DCDC_BG_LP_EN ( BIT(15) )
327 #define BIT_DCDC_OTP_CHIP_PD_FLAG_CLR ( BIT(14) )
328 #define BIT_DCDC_OTP_CHIP_PD_FLAG ( BIT(13) )
329 #define BIT_DCDC_OTP_AUTO_PD_EN ( BIT(12) )
330 #define BIT_DCDC_OTP_VBEOP ( BIT(11) )
331 #define BITS_DCDC_OTP_S(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)) )
332 #define BIT_DCDC_WRF_LP_EN ( BIT(7) )
333 #define BIT_DCDC_WRF_CL_CTRL ( BIT(6) )
334 #define BITS_DCDC_WRF_PDRSLOW(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)|BIT(4)|BIT(5)) )
335 #define BIT_DCDC_WRF_PFM ( BIT(1) )
336 #define BIT_DCDC_WRF_DCM ( BIT(0) )
338 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL3 */
339 #define BIT_DCDC_WPA_LP_EN ( BIT(8) )
340 #define BIT_DCDC_WPA_CL_CTRL ( BIT(7) )
341 #define BIT_DCDC_WPA_ZXOP ( BIT(6) )
342 #define BITS_DCDC_WPA_PDRSLOW(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)|BIT(4)|BIT(5)) )
343 #define BIT_DCDC_WPA_PFM ( BIT(1) )
344 #define BIT_DCDC_WPA_APTEN ( BIT(0) )
346 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL4 */
347 #define BIT_DCDC_CORE_OSCSYCEN_SW ( BIT(15) )
348 #define BIT_DCDC_CORE_OSCSYCEN_HW_EN ( BIT(14) )
349 #define BIT_DCDC_CORE_OSCSYC_DIV_EN ( BIT(13) )
350 #define BITS_DCDC_CORE_OSCSYC_DIV(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
351 #define BIT_DCDC_ARM_OSCSYCEN_SW ( BIT(7) )
352 #define BIT_DCDC_ARM_OSCSYCEN_HW_EN ( BIT(6) )
353 #define BIT_DCDC_ARM_OSCSYC_DIV_EN ( BIT(5) )
354 #define BITS_DCDC_ARM_OSCSYC_DIV(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
356 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL5 */
357 #define BIT_DCDC_MEM_OSCSYCEN_SW ( BIT(15) )
358 #define BIT_DCDC_MEM_OSCSYCEN_HW_EN ( BIT(14) )
359 #define BIT_DCDC_MEM_OSCSYC_DIV_EN ( BIT(13) )
360 #define BITS_DCDC_MEM_OSCSYC_DIV(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
361 #define BIT_DCDC_GEN_OSCSYCEN_SW ( BIT(7) )
362 #define BIT_DCDC_GEN_OSCSYCEN_HW_EN ( BIT(6) )
363 #define BIT_DCDC_GEN_OSCSYC_DIV_EN ( BIT(5) )
364 #define BITS_DCDC_GEN_OSCSYC_DIV(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
366 /* bits definitions for register ANA_REG_GLB_DCDC_CTRL6 */
367 #define BIT_DCDC_WPA_OSCSYCEN_SW ( BIT(15) )
368 #define BIT_DCDC_WPA_OSCSYCEN_HW_EN ( BIT(14) )
369 #define BIT_DCDC_WPA_OSCSYC_DIV_EN ( BIT(13) )
370 #define BITS_DCDC_WPA_OSCSYC_DIV(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
371 #define BIT_DCDC_WRF_OSCSYCEN_SW ( BIT(7) )
372 #define BIT_DCDC_WRF_OSCSYCEN_HW_EN ( BIT(6) )
373 #define BIT_DCDC_WRF_OSCSYC_DIV_EN ( BIT(5) )
374 #define BITS_DCDC_WRF_OSCSYC_DIV(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
376 /* bits definitions for register ANA_REG_GLB_DDR2_CTRL */
377 #define BIT_DDR2_BUF_PD_HW ( BIT(9) )
378 #define BITS_DDR2_BUF_S_DS(_x_) ( (_x_) << 7 & (BIT(7)|BIT(8)) )
379 #define BITS_DDR2_BUF_CHNS_DS(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)) )
380 #define BIT_DDR2_BUF_PD ( BIT(4) )
381 #define BITS_DDR2_BUF_S(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)) )
382 #define BITS_DDR2_BUF_CHNS(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)) )
384 /* bits definitions for register ANA_REG_GLB_SLP_WAIT_DCDCARM */
385 #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)) )
386 #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)) )
388 /* bits definitions for register ANA_REG_GLB_LDO1828_XTL_CTL */
389 #define BIT_LDO_VDD18_EXT_XTL2_EN ( BIT(11) )
390 #define BIT_LDO_VDD18_EXT_XTL1_EN ( BIT(10) )
391 #define BIT_LDO_VDD18_EXT_XTL0_EN ( BIT(9) )
392 #define BIT_LDO_VDD18_XTL2_EN ( BIT(8) )
393 #define BIT_LDO_VDD18_XTL1_EN ( BIT(7) )
394 #define BIT_LDO_VDD18_XTL0_EN ( BIT(6) )
395 #define BIT_LDO_VDD28_EXT_XTL2_EN ( BIT(5) )
396 #define BIT_LDO_VDD28_EXT_XTL1_EN ( BIT(4) )
397 #define BIT_LDO_VDD28_EXT_XTL0_EN ( BIT(3) )
398 #define BIT_LDO_VDD28_XTL2_EN ( BIT(2) )
399 #define BIT_LDO_VDD28_XTL1_EN ( BIT(1) )
400 #define BIT_LDO_VDD28_XTL0_EN ( BIT(0) )
402 /* bits definitions for register ANA_REG_GLB_LDO_SLP_CTRL0 */
403 #define BIT_SLP_IO_EN ( BIT(15) )
404 #define BIT_SLP_DCDC_OTP_PD_EN ( BIT(13) )
405 #define BIT_SLP_DCDCGEN_PD_EN ( BIT(12) )
406 #define BIT_SLP_DCDCWPA_PD_EN ( BIT(11) )
407 #define BIT_SLP_DCDCWRF_PD_EN ( BIT(10) )
408 #define BIT_SLP_DCDCARM_PD_EN ( BIT(9) )
409 #define BIT_SLP_LDOEMMCCORE_PD_EN ( BIT(7) )
410 #define BIT_SLP_LDOEMMCIO_PD_EN ( BIT(6) )
411 #define BIT_SLP_LDORF2_PD_EN ( BIT(5) )
412 #define BIT_SLP_LDORF1_PD_EN ( BIT(4) )
413 #define BIT_SLP_LDORF0_PD_EN ( BIT(3) )
414 #define BIT_SLP_LDOVDD25_PD_EN ( BIT(2) )
415 #define BIT_SLP_LDOVDD28_PD_EN ( BIT(1) )
416 #define BIT_SLP_LDOVDD18_PD_EN ( BIT(0) )
418 /* bits definitions for register ANA_REG_GLB_LDO_SLP_CTRL1 */
419 #define BIT_SLP_LDO_PD_EN ( BIT(12) )
420 #define BIT_SLP_LDOLPREF_PD_EN ( BIT(11) )
421 #define BIT_SLP_LDOCLSG_PD_EN ( BIT(10) )
422 #define BIT_SLP_LDOUSB_PD_EN ( BIT(9) )
423 #define BIT_SLP_LDOCAMMOT_PD_EN ( BIT(8) )
424 #define BIT_SLP_LDOCAMIO_PD_EN ( BIT(7) )
425 #define BIT_SLP_LDOCAMD_PD_EN ( BIT(6) )
426 #define BIT_SLP_LDOCAMA_PD_EN ( BIT(5) )
427 #define BIT_SLP_LDOSIM2_PD_EN ( BIT(4) )
428 #define BIT_SLP_LDOSIM1_PD_EN ( BIT(3) )
429 #define BIT_SLP_LDOSIM0_PD_EN ( BIT(2) )
430 #define BIT_SLP_LDOSD_PD_EN ( BIT(1) )
431 #define BIT_SLP_LDOAVDD18_PD_EN ( BIT(0) )
433 /* bits definitions for register ANA_REG_GLB_LDO_SLP_CTRL2 */
434 #define BIT_SLP_DCDC_BG_LP_EN ( BIT(15) )
435 #define BIT_SLP_DCDCCORE_LP_EN ( BIT(11) )
436 #define BIT_SLP_DCDCMEM_LP_EN ( BIT(10) )
437 #define BIT_SLP_DCDCARM_LP_EN ( BIT(9) )
438 #define BIT_SLP_DCDCGEN_LP_EN ( BIT(8) )
439 #define BIT_SLP_DCDCWPA_LP_EN ( BIT(6) )
440 #define BIT_SLP_DCDCWRF_LP_EN ( BIT(5) )
441 #define BIT_SLP_LDOEMMCCORE_LP_EN ( BIT(4) )
442 #define BIT_SLP_LDOEMMCIO_LP_EN ( BIT(3) )
443 #define BIT_SLP_LDORF2_LP_EN ( BIT(2) )
444 #define BIT_SLP_LDORF1_LP_EN ( BIT(1) )
445 #define BIT_SLP_LDORF0_LP_EN ( BIT(0) )
447 /* bits definitions for register ANA_REG_GLB_LDO_SLP_CTRL3 */
448 #define BIT_SLP_BG_LP_EN ( BIT(15) )
449 #define BIT_SLP_LDOVDD25_LP_EN ( BIT(13) )
450 #define BIT_SLP_LDOVDD28_LP_EN ( BIT(12) )
451 #define BIT_SLP_LDOVDD18_LP_EN ( BIT(11) )
452 #define BIT_SLP_LDOCLSG_LP_EN ( BIT(10) )
453 #define BIT_SLP_LDOUSB_LP_EN ( BIT(9) )
454 #define BIT_SLP_LDOCAMMOT_LP_EN ( BIT(8) )
455 #define BIT_SLP_LDOCAMIO_LP_EN ( BIT(7) )
456 #define BIT_SLP_LDOCAMD_LP_EN ( BIT(6) )
457 #define BIT_SLP_LDOCAMA_LP_EN ( BIT(5) )
458 #define BIT_SLP_LDOSIM2_LP_EN ( BIT(4) )
459 #define BIT_SLP_LDOSIM1_LP_EN ( BIT(3) )
460 #define BIT_SLP_LDOSIM0_LP_EN ( BIT(2) )
461 #define BIT_SLP_LDOSD_LP_EN ( BIT(1) )
462 #define BIT_SLP_LDOAVDD18_LP_EN ( BIT(0) )
464 /* bits definitions for register ANA_REG_GLB_AUD_SLP_CTRL4 */
465 #define BIT_SLP_AUD_PA_SW_PD_EN ( BIT(15) )
466 #define BIT_SLP_AUD_PA_LDO_PD_EN ( BIT(14) )
467 #define BIT_SLP_AUD_PA_PD_EN ( BIT(13) )
468 #define BIT_SLP_AUD_OVP_PD_PD_EN ( BIT(9) )
469 #define BIT_SLP_AUD_OVP_LDO_PD_EN ( BIT(8) )
470 #define BIT_SLP_AUD_VB_PD_EN ( BIT(7) )
471 #define BIT_SLP_AUD_VBO_PD_EN ( BIT(6) )
472 #define BIT_SLP_AUD_HEADMICBIAS_PD_EN ( BIT(5) )
473 #define BIT_SLP_AUD_MICBIAS_HV_PD_EN ( BIT(2) )
474 #define BIT_SLP_AUD_HEADMIC_PD_EN ( BIT(1) )
475 #define BIT_SLP_AUD_PMUR1_PD_EN ( BIT(0) )
477 /* bits definitions for register ANA_REG_GLB_DCDC_SLP_CTRL */
478 #define BITS_SLP_DCDCCORE_VOL_DROP_CNT(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
479 #define BITS_DCDC_CORE_CTL_DS(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)) )
481 /* bits definitions for register ANA_REG_GLB_XTL_WAIT_CTRL */
482 #define BIT_SLP_XTLBUF_PD_EN ( BIT(9) )
483 #define BIT_XTL_EN ( BIT(8) )
484 #define BITS_XTL_WAIT(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
486 /* bits definitions for register ANA_REG_GLB_FLASH_CTRL */
487 #define BIT_FLASH_PON ( BIT(15) )
488 #define BIT_FLASH_V_HW_EN ( BIT(6) )
489 #define BITS_FLASH_V_HW_STEP(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)) )
490 #define BITS_FLASH_V_SW(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
492 /* bits definitions for register ANA_REG_GLB_WHTLED_CTRL0 */
493 #define BIT_WHTLED_PD_STS ( BIT(15) )
494 #define BITS_WHTLED_DC(_x_) ( (_x_) << 9 & (BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
495 #define BIT_WHTLED_BOOST_EN ( BIT(8) )
496 #define BIT_WHTLED_SERIES_EN ( BIT(7) )
497 #define BITS_WHTLED_V(_x_) ( (_x_) << 1 & (BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)) )
498 #define BIT_WHTLED_PD ( BIT(0) )
500 /* bits definitions for register ANA_REG_GLB_WHTLED_CTRL1 */
501 #define BIT_LCM_CABC_PWM_SEL ( BIT(15) )
502 #define BIT_RTC_PWM0_EN ( BIT(14) )
503 #define BIT_PWM0_EN ( BIT(13) )
504 #define BITS_WHTLED_ISET(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
505 #define BITS_WHTLED_FRE_AD(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)|BIT(4)) )
506 #define BITS_WHTLED_CLMIT_OP(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)) )
508 /* bits definitions for register ANA_REG_GLB_WHTLED_CTRL2 */
509 #define BIT_WHTLED_DIMMING_SEL ( BIT(15) )
510 #define BIT_WHTLED_PD_SEL ( BIT(14) )
511 #define BIT_WHTLED_DIS_OVST ( BIT(13) )
512 #define BIT_WHTLED_DIM_SEL ( BIT(12) )
513 #define BIT_WHTLED_DE_BIAS ( BIT(11) )
514 #define BIT_WHTLED_BUFF_SHT ( BIT(10) )
515 #define BITS_WHTLED_STB_OP(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)) )
516 #define BIT_WHTLED_CAP_OPTION ( BIT(7) )
517 #define BIT_WHTLED_OVP_DIS ( BIT(6) )
518 #define BITS_WHTLED_REF_DC(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)) )
520 /* bits definitions for register ANA_REG_GLB_ANA_DRV_CTRL */
521 #define BIT_SLP_RGB_PD_EN ( BIT(14) )
522 #define BIT_RGB_PD_HW_EN ( BIT(13) )
523 #define BITS_RGB_V(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
524 #define BITS_KPLED_V(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
525 #define BIT_RGB_PD_SW ( BIT(2) )
526 #define BIT_KPLED_PD ( BIT(1) )
527 #define BIT_KPLED_PD_STS ( BIT(0) )
529 /* bits definitions for register ANA_REG_GLB_VIBR_CTRL0 */
530 #define BITS_VIBR_STABLE_V_HW(_x_) ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
531 #define BITS_VIBR_INIT_V_HW(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
532 #define BITS_VIBR_V_SW(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
533 #define BIT_VIBR_PON ( BIT(2) )
534 #define BIT_VIBR_SW_EN ( BIT(1) )
536 /* bits definitions for register ANA_REG_GLB_VIBR_CTRL1 */
537 #define BITS_VIBR_V_CONVERT_CNT_HW(_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)|BIT(13)|BIT(14)|BIT(15)) )
539 /* bits definitions for register ANA_REG_GLB_VIBR_CTRL2 */
540 #define BIT_VIBR_PWR_ON_STS ( BIT(15) )
541 #define BIT_VIBR_HW_FLOW_ERR1 ( BIT(14) )
542 #define BIT_VIBR_HW_FLOW_ERR1_CLR ( BIT(0) )
544 /* bits definitions for register ANA_REG_GLB_VIBR_WR_PROT_VALUE */
545 #define BIT_VIBR_WR_PROT ( BIT(15) )
546 #define BITS_VIBR_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)) )
548 /* bits definitions for register ANA_REG_GLB_AUDIO_CTRL */
549 #define BIT_AUD_SLP_APP_RST_EN ( BIT(10) )
550 #define BITS_CLK_AUD_HBD_DIV(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
551 #define BIT_CLK_AUD_LOOP_INV_EN ( BIT(4) )
552 #define BIT_CLK_AUDIF_TX_INV_EN ( BIT(3) )
553 #define BIT_CLK_AUDIF_RX_INV_EN ( BIT(2) )
554 #define BIT_CLK_AUD_6P5M_TX_INV_EN ( BIT(1) )
555 #define BIT_CLK_AUD_6P5M_RX_INV_EN ( BIT(0) )
557 /* bits definitions for register ANA_REG_GLB_CHGR_CTRL0 */
558 #define BIT_CHGR_PD_STS ( BIT(15) )
559 #define BITS_CHGR_CV_V(_x_) ( (_x_) << 6 & (BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
560 #define BITS_CHGR_END_V(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)) )
561 #define BITS_CHG_PUMP_V(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)) )
562 #define BIT_CHGR_PD_RTCCLR ( BIT(1) )
563 #define BIT_CHGR_PD_RTCSET ( BIT(0) )
565 /* bits definitions for register ANA_REG_GLB_CHGR_CTRL1 */
566 #define BIT_DP_DM_SW_EN ( BIT(15) )
567 #define BITS_CHGR_CC_I(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
568 #define BITS_VBAT_OVP_V(_x_) ( (_x_) << 6 & (BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
569 #define BITS_VCHG_OVP_V(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)) )
571 /* bits definitions for register ANA_REG_GLB_CHGR_CTRL2 */
572 #define BITS_CHG_PUMP_CAL(_x_) ( (_x_) << 9 & (BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
573 #define BIT_CHG_PUMP_PD ( BIT(8) )
574 #define BIT_CHGR_CC_EN ( BIT(1) )
575 #define BIT_RECHG ( BIT(0) )
577 /* bits definitions for register ANA_REG_GLB_CHGR_STATUS */
578 #define BIT_CHG_DET_DONE ( BIT(11) )
579 #define BIT_DP_LOW ( BIT(10) )
580 #define BIT_DCP_DET ( BIT(9) )
581 #define BIT_CHG_DET ( BIT(8) )
582 #define BIT_SDP_INT ( BIT(7) )
583 #define BIT_DCP_INT ( BIT(6) )
584 #define BIT_CDP_INT ( BIT(5) )
585 #define BIT_CHGR_CV_STATUS ( BIT(4) )
586 #define BIT_CHGR_ON ( BIT(3) )
587 #define BIT_CHGR_INT ( BIT(2) )
588 #define BIT_VBAT_OVI ( BIT(1) )
589 #define BIT_VCHG_OVI ( BIT(0) )
591 /* bits definitions for register ANA_REG_GLB_ANA_MIXED_CTRL */
592 #define BIT_PTEST_PD_RTCSET ( BIT(15) )
593 #define BIT_THM_CHIP_PD_FLAG ( BIT(8) )
594 #define BIT_THM_CHIP_PD_FLAG_CLR ( BIT(7) )
595 #define BITS_THM_CAL_SEL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)) )
596 #define BIT_THM_AUTO_PD_EN ( BIT(4) )
597 #define BIT_BG_LP_EN ( BIT(3) )
598 #define BITS_UVHO_T(_x_) ( (_x_) << 1 & (BIT(1)|BIT(2)) )
599 #define BIT_UVHO_EN ( BIT(0) )
601 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN0 */
602 #define BIT_LDO_XTL_EN ( BIT(15) )
603 #define BIT_LDO_RF1_EXT_XTL2_EN ( BIT(11) )
604 #define BIT_LDO_RF1_EXT_XTL1_EN ( BIT(10) )
605 #define BIT_LDO_RF1_EXT_XTL0_EN ( BIT(9) )
606 #define BIT_LDO_RF1_XTL2_EN ( BIT(8) )
607 #define BIT_LDO_RF1_XTL1_EN ( BIT(7) )
608 #define BIT_LDO_RF1_XTL0_EN ( BIT(6) )
609 #define BIT_LDO_RF0_EXT_XTL2_EN ( BIT(5) )
610 #define BIT_LDO_RF0_EXT_XTL1_EN ( BIT(4) )
611 #define BIT_LDO_RF0_EXT_XTL0_EN ( BIT(3) )
612 #define BIT_LDO_RF0_XTL2_EN ( BIT(2) )
613 #define BIT_LDO_RF0_XTL1_EN ( BIT(1) )
614 #define BIT_LDO_RF0_XTL0_EN ( BIT(0) )
616 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN1 */
617 #define BIT_LDO_VDD25_EXT_XTL2_EN ( BIT(11) )
618 #define BIT_LDO_VDD25_EXT_XTL1_EN ( BIT(10) )
619 #define BIT_LDO_VDD25_EXT_XTL0_EN ( BIT(9) )
620 #define BIT_LDO_VDD25_XTL2_EN ( BIT(8) )
621 #define BIT_LDO_VDD25_XTL1_EN ( BIT(7) )
622 #define BIT_LDO_VDD25_XTL0_EN ( BIT(6) )
623 #define BIT_LDO_RF2_EXT_XTL2_EN ( BIT(5) )
624 #define BIT_LDO_RF2_EXT_XTL1_EN ( BIT(4) )
625 #define BIT_LDO_RF2_EXT_XTL0_EN ( BIT(3) )
626 #define BIT_LDO_RF2_XTL2_EN ( BIT(2) )
627 #define BIT_LDO_RF2_XTL1_EN ( BIT(1) )
628 #define BIT_LDO_RF2_XTL0_EN ( BIT(0) )
630 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN2 */
631 #define BIT_LDO_AVDD18_EXT_XTL2_EN ( BIT(11) )
632 #define BIT_LDO_AVDD18_EXT_XTL1_EN ( BIT(10) )
633 #define BIT_LDO_AVDD18_EXT_XTL0_EN ( BIT(9) )
634 #define BIT_LDO_AVDD18_XTL2_EN ( BIT(8) )
635 #define BIT_LDO_AVDD18_XTL1_EN ( BIT(7) )
636 #define BIT_LDO_AVDD18_XTL0_EN ( BIT(6) )
637 #define BIT_LDO_SIM2_EXT_XTL2_EN ( BIT(5) )
638 #define BIT_LDO_SIM2_EXT_XTL1_EN ( BIT(4) )
639 #define BIT_LDO_SIM2_EXT_XTL0_EN ( BIT(3) )
640 #define BIT_LDO_SIM2_XTL2_EN ( BIT(2) )
641 #define BIT_LDO_SIM2_XTL1_EN ( BIT(1) )
642 #define BIT_LDO_SIM2_XTL0_EN ( BIT(0) )
644 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN3 */
645 #define BIT_DCDC_BG_EXT_XTL2_EN ( BIT(11) )
646 #define BIT_DCDC_BG_EXT_XTL1_EN ( BIT(10) )
647 #define BIT_DCDC_BG_EXT_XTL0_EN ( BIT(9) )
648 #define BIT_DCDC_BG_XTL2_EN ( BIT(8) )
649 #define BIT_DCDC_BG_XTL1_EN ( BIT(7) )
650 #define BIT_DCDC_BG_XTL0_EN ( BIT(6) )
651 #define BIT_BG_EXT_XTL2_EN ( BIT(5) )
652 #define BIT_BG_EXT_XTL1_EN ( BIT(4) )
653 #define BIT_BG_EXT_XTL0_EN ( BIT(3) )
654 #define BIT_BG_XTL2_EN ( BIT(2) )
655 #define BIT_BG_XTL1_EN ( BIT(1) )
656 #define BIT_BG_XTL0_EN ( BIT(0) )
658 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN4 */
659 #define BIT_DCDC_WRF_XTL2_EN ( BIT(14) )
660 #define BIT_DCDC_WRF_XTL1_EN ( BIT(13) )
661 #define BIT_DCDC_WRF_XTL0_EN ( BIT(12) )
662 #define BIT_DCDC_WPA_XTL2_EN ( BIT(11) )
663 #define BIT_DCDC_WPA_XTL1_EN ( BIT(10) )
664 #define BIT_DCDC_WPA_XTL0_EN ( BIT(9) )
665 #define BIT_DCDC_MEM_XTL2_EN ( BIT(8) )
666 #define BIT_DCDC_MEM_XTL1_EN ( BIT(7) )
667 #define BIT_DCDC_MEM_XTL0_EN ( BIT(6) )
668 #define BIT_DCDC_GEN_XTL2_EN ( BIT(5) )
669 #define BIT_DCDC_GEN_XTL1_EN ( BIT(4) )
670 #define BIT_DCDC_GEN_XTL0_EN ( BIT(3) )
671 #define BIT_DCDC_CORE_XTL2_EN ( BIT(2) )
672 #define BIT_DCDC_CORE_XTL1_EN ( BIT(1) )
673 #define BIT_DCDC_CORE_XTL0_EN ( BIT(0) )
675 /* bits definitions for register ANA_REG_GLB_PWR_XTL_EN5 */
676 #define BIT_DCDC_WRF_EXT_XTL2_EN ( BIT(14) )
677 #define BIT_DCDC_WRF_EXT_XTL1_EN ( BIT(13) )
678 #define BIT_DCDC_WRF_EXT_XTL0_EN ( BIT(12) )
679 #define BIT_DCDC_WPA_EXT_XTL2_EN ( BIT(11) )
680 #define BIT_DCDC_WPA_EXT_XTL1_EN ( BIT(10) )
681 #define BIT_DCDC_WPA_EXT_XTL0_EN ( BIT(9) )
682 #define BIT_DCDC_MEM_EXT_XTL2_EN ( BIT(8) )
683 #define BIT_DCDC_MEM_EXT_XTL1_EN ( BIT(7) )
684 #define BIT_DCDC_MEM_EXT_XTL0_EN ( BIT(6) )
685 #define BIT_DCDC_GEN_EXT_XTL2_EN ( BIT(5) )
686 #define BIT_DCDC_GEN_EXT_XTL1_EN ( BIT(4) )
687 #define BIT_DCDC_GEN_EXT_XTL0_EN ( BIT(3) )
688 #define BIT_DCDC_CORE_EXT_XTL2_EN ( BIT(2) )
689 #define BIT_DCDC_CORE_EXT_XTL1_EN ( BIT(1) )
690 #define BIT_DCDC_CORE_EXT_XTL0_EN ( BIT(0) )
692 /* bits definitions for register ANA_REG_GLB_ANA_STATUS */
693 #define BIT_BONDOPT6 ( BIT(6) )
694 #define BIT_BONDOPT5 ( BIT(5) )
695 #define BIT_BONDOPT4 ( BIT(4) )
696 #define BIT_BONDOPT3 ( BIT(3) )
697 #define BIT_BONDOPT2 ( BIT(2) )
698 #define BIT_BONDOPT1 ( BIT(1) )
699 #define BIT_BONDOPT0 ( BIT(0) )
701 /* bits definitions for register ANA_REG_GLB_POR_RST_MONITOR */
702 #define BITS_POR_RST_MONITOR(_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)|BIT(13)|BIT(14)|BIT(15)) )
704 /* bits definitions for register ANA_REG_GLB_WDG_RST_MONITOR */
705 #define BITS_WDG_RST_MONITOR(_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)|BIT(13)|BIT(14)|BIT(15)) )
707 /* bits definitions for register ANA_REG_GLB_POR_PIN_RST_MONITOR */
708 #define BITS_POR_PIN_RST_MONITOR(_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)|BIT(13)|BIT(14)|BIT(15)) )
710 /* bits definitions for register ANA_REG_GLB_POR_SRC_FLAG */
711 #define BIT_POR_SW_FORCE_ON ( BIT(15) )
712 #define BIT_POR_SW_FORCE_RESET ( BIT(12) )
713 #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)) )
715 /* bits definitions for register ANA_REG_GLB_POR_7S_CTRL */
716 #define BIT_PBINT_7S_FLAG_CLR ( BIT(15) )
717 #define BIT_EXT_RSTN_FLAG_CLR ( BIT(14) )
718 #define BIT_CHGR_INT_FLAG_CLR ( BIT(13) )
719 #define BIT_PBINT2_FLAG_CLR ( BIT(12) )
720 #define BIT_PBINT_FLAG_CLR ( BIT(11) )
721 #define BIT_PBINT_7S_RST_SWMODE_RTCSTS ( BIT(10) )
722 #define BIT_PBINT_7S_RST_SWMODE_RTCCLR ( BIT(9) )
723 #define BIT_PBINT_7S_RST_SWMODE_RTCSET ( BIT(8) )
724 #define BITS_PBINT_7S_RST_THRESHOLD(_x_)( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
725 #define BIT_PBINT_7S_RST_DISABLE ( BIT(3) )
726 #define BIT_PBINT_7S_RST_MODE_RTCSTS ( BIT(2) )
727 #define BIT_PBINT_7S_RST_MODE_RTCCLR ( BIT(1) )
728 #define BIT_PBINT_7S_RST_MODE_RTCSET ( BIT(0) )
730 /* bits definitions for register ANA_REG_GLB_INT_DEBUG */
731 #define BIT_OTP_INT_DEB ( BIT(10) )
732 #define BIT_THM_INT_DEB ( BIT(9) )
733 #define BIT_AUD_PROT_INT_DEB ( BIT(8) )
734 #define BIT_AUD_HEADBTN_INT_DEB ( BIT(7) )
735 #define BIT_EIC_INT_DEB ( BIT(6) )
736 #define BIT_FGU_INT_DEB ( BIT(5) )
737 #define BIT_WDG_INT_DEB ( BIT(4) )
738 #define BIT_RTC_INT_DEB ( BIT(3) )
739 #define BIT_GPIO_INT_DEB ( BIT(2) )
740 #define BIT_ADC_INT_DEB ( BIT(1) )
741 #define BIT_INT_DEBUG_EN ( BIT(0) )
743 /* bits definitions for register ANA_REG_GLB_GPI_DEBUG */
744 #define BIT_HEAD_INSERT2_DEB ( BIT(9) )
745 #define BIT_HEAD_INSERT_DEB ( BIT(8) )
746 #define BIT_HEAD_BUTTON_DEB ( BIT(7) )
747 #define BIT_PBINT2_DEB ( BIT(6) )
748 #define BIT_PBINT_DEB ( BIT(5) )
749 #define BIT_VCHG_OVI_DEB ( BIT(4) )
750 #define BIT_VBAT_OVI_DEB ( BIT(3) )
751 #define BIT_CHGR_INT_DEB ( BIT(2) )
752 #define BIT_GPI_DEBUG_EN ( BIT(0) )
754 /* bits definitions for register ANA_REG_GLB_HWRST_RTC */
755 #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)) )
756 #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)) )
758 /* bits definitions for register ANA_REG_GLB_CHIP_ID_LOW */
759 #define BITS_CHIP_ID_LOW(_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)|BIT(13)|BIT(14)|BIT(15)) )
761 /* bits definitions for register ANA_REG_GLB_CHIP_ID_HIGH */
762 #define BITS_CHIP_ID_HIGH(_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)|BIT(13)|BIT(14)|BIT(15)) )
764 /* bits definitions for register ANA_REG_GLB_ARM_MF_REG */
765 #define BITS_ARM_MF_REG(_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)|BIT(13)|BIT(14)|BIT(15)) )
767 /* bits definitions for register ANA_REG_GLB_AFUSE_CTRL */
768 #define BIT_AFUSE_READ_REQ ( BIT(7) )
769 #define BITS_AFUSE_READ_DLY(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)) )
771 /* bits definitions for register ANA_REG_GLB_AFUSE_OUT0 */
772 #define BITS_AFUSE_OUT0(_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)|BIT(13)|BIT(14)|BIT(15)) )
774 /* bits definitions for register ANA_REG_GLB_AFUSE_OUT1 */
775 #define BITS_AFUSE_OUT1(_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)|BIT(13)|BIT(14)|BIT(15)) )
777 /* bits definitions for register ANA_REG_GLB_AFUSE_OUT2 */
778 #define BITS_AFUSE_OUT2(_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)|BIT(13)|BIT(14)|BIT(15)) )
780 /* bits definitions for register ANA_REG_GLB_AFUSE_OUT3 */
781 #define BITS_AFUSE_OUT3(_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)|BIT(13)|BIT(14)|BIT(15)) )
783 /* bits definitions for register ANA_REG_GLB_CA_CTRL4 */
784 #define BIT_EXT_RSTN_PD_EN ( BIT(14) )
785 #define BIT_PB_7S_RST_PD_EN ( BIT(13) )
786 #define BIT_WDG_RST_PD_EN ( BIT(12) )
787 #define BIT_SW_RST_EMMCIO_PD_EN ( BIT(11) )
788 #define BIT_SW_RST_EMMCCORE_PD_EN ( BIT(10) )
789 #define BITS_SW_RST_PD_THRESHOLD(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
791 /* bits definitions for register ANA_REG_GLB_MCU_WR_PROT_VALUE */
792 #define BIT_MCU_WR_PROT ( BIT(15) )
793 #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)) )
795 /* bits definitions for register ANA_REG_GLB_MP_PWR_CTRL0 */
796 #define BIT_LDO_SIM1_EXT_XTL2_EN ( BIT(15) )
797 #define BIT_LDO_SIM1_EXT_XTL1_EN ( BIT(14) )
798 #define BIT_LDO_SIM1_EXT_XTL0_EN ( BIT(13) )
799 #define BIT_LDO_SIM1_XTL2_EN ( BIT(12) )
800 #define BIT_LDO_SIM1_XTL1_EN ( BIT(11) )
801 #define BIT_LDO_SIM1_XTL0_EN ( BIT(10) )
802 #define BIT_LDO_SIM0_EXT_XTL2_EN ( BIT(9) )
803 #define BIT_LDO_SIM0_EXT_XTL1_EN ( BIT(8) )
804 #define BIT_LDO_SIM0_EXT_XTL0_EN ( BIT(7) )
805 #define BIT_LDO_SIM0_XTL2_EN ( BIT(6) )
806 #define BIT_LDO_SIM0_XTL1_EN ( BIT(5) )
807 #define BIT_LDO_SIM0_XTL0_EN ( BIT(4) )
808 #define BIT_PWR_OFF_SEQ_EN ( BIT(3) )
809 #define BIT_DCDC_CORE_SLP_OUT_STEP_EN ( BIT(1) )
810 #define BIT_DCDC_CORE_SLP_IN_STEP_EN ( BIT(0) )
812 /* bits definitions for register ANA_REG_GLB_MP_PWR_CTRL1 */
813 #define BITS_DCDC_CORE_CTL_SLP_STEP5(_x_) ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)) )
814 #define BITS_DCDC_CORE_CTL_SLP_STEP4(_x_) ( (_x_) << 9 & (BIT(9)|BIT(10)|BIT(11)) )
815 #define BITS_DCDC_CORE_CTL_SLP_STEP3(_x_) ( (_x_) << 6 & (BIT(6)|BIT(7)|BIT(8)) )
816 #define BITS_DCDC_CORE_CTL_SLP_STEP2(_x_) ( (_x_) << 3 & (BIT(3)|BIT(4)|BIT(5)) )
817 #define BITS_DCDC_CORE_CTL_SLP_STEP1(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)) )
819 /* bits definitions for register ANA_REG_GLB_MP_PWR_CTRL2 */
820 #define BITS_DCDC_CORE_CAL_SLP_STEP3(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
821 #define BITS_DCDC_CORE_CAL_SLP_STEP2(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
822 #define BITS_DCDC_CORE_CAL_SLP_STEP1(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
824 /* bits definitions for register ANA_REG_GLB_MP_PWR_CTRL3 */
825 #define BITS_DCDC_ARM_STBOP(_x_) ( (_x_) << 12 & (BIT(12)|BIT(13)) )
826 #define BITS_DCDC_CORE_STBOP(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)) )
827 #define BITS_DCDC_CORE_CAL_SLP_STEP5(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
828 #define BITS_DCDC_CORE_CAL_SLP_STEP4(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
830 /* bits definitions for register ANA_REG_GLB_MP_LDO_CTRL */
831 #define BITS_LDOD_LP_CAL(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)) )
832 #define BITS_LDOA_LP_CAL(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) )
833 #define BITS_LDODCDC_LP_CAL(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
835 /* bits definitions for register ANA_REG_GLB_MP_CHG_CTRL */
836 #define BIT_CHGR_INT_EN ( BIT(8) )
837 #define BIT_CHGR_DRV ( BIT(5) )
838 #define BIT_CHGR_OSC ( BIT(4) )
839 #define BITS_CHGR_DPM(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)) )
840 #define BITS_CHGR_ITERM(_x_) ( (_x_) & (BIT(0)|BIT(1)) )
842 /* bits definitions for register ANA_REG_GLB_MP_MISC_CTRL */
843 #define BITS_LDO_RF1_V_BOND(_x_) ( (_x_) << 11 & (BIT(11)|BIT(12)) )
844 #define BITS_LDO_VDD25_V_BOND(_x_) ( (_x_) << 9 & (BIT(9)|BIT(10)) )
845 #define BITS_DCDC_ARM_CTL_BOND(_x_) ( (_x_) << 6 & (BIT(6)|BIT(7)|BIT(8)) )
846 #define BITS_DCDC_CORE_CTL_BOND(_x_) ( (_x_) << 3 & (BIT(3)|BIT(4)|BIT(5)) )
847 #define BIT_DCOFFSET_EN ( BIT(2) )
848 #define BIT_CHOP_EN ( BIT(1) )
849 #define BIT_WHTLED_EXT_RES_CTRL ( BIT(0) )
851 /* bits definitions for register ANA_REG_GLB_MP_DCDC_DEDT_CTRL */
852 #define BITS_DCDC_WPA_DEDT_EN(_x_) ( (_x_) << 10 & (BIT(10)|BIT(11)) )
853 #define BITS_DCDC_WRF_DEDT_EN(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)) )
854 #define BITS_DCDC_GEN_DEDT_EN(_x_) ( (_x_) << 6 & (BIT(6)|BIT(7)) )
855 #define BITS_DCDC_MEM_DEDT_EN(_x_) ( (_x_) << 4 & (BIT(4)|BIT(5)) )
856 #define BITS_DCDC_ARM_DEDT_EN(_x_) ( (_x_) << 2 & (BIT(2)|BIT(3)) )
857 #define BITS_DCDC_CORE_DEDT_EN(_x_) ( (_x_) & (BIT(0)|BIT(1)) )
859 /* bits definitions for register ANA_REG_GLB_CA_CTRL0 */
860 #define BITS_SD_CLK_P(_x_) ( (_x_) << 14 & (BIT(14)|BIT(15)) )
861 #define BIT_SD_CHOP_CAP_EN ( BIT(13) )
862 #define BIT_LDO_CAMIO_V_B2 ( BIT(12) )
863 #define BIT_LDO_CAMIO_EXT_XTL2_EN ( BIT(11) )
864 #define BIT_LDO_CAMIO_EXT_XTL1_EN ( BIT(10) )
865 #define BIT_LDO_CAMIO_EXT_XTL0_EN ( BIT(9) )
866 #define BIT_LDO_CAMIO_XTL2_EN ( BIT(8) )
867 #define BIT_LDO_CAMIO_XTL1_EN ( BIT(7) )
868 #define BIT_LDO_CAMIO_XTL0_EN ( BIT(6) )
869 #define BIT_LDO_CAMD_EXT_XTL2_EN ( BIT(5) )
870 #define BIT_LDO_CAMD_EXT_XTL1_EN ( BIT(4) )
871 #define BIT_LDO_CAMD_EXT_XTL0_EN ( BIT(3) )
872 #define BIT_LDO_CAMD_XTL2_EN ( BIT(2) )
873 #define BIT_LDO_CAMD_XTL1_EN ( BIT(1) )
874 #define BIT_LDO_CAMD_XTL0_EN ( BIT(0) )
876 /* bits definitions for register ANA_REG_GLB_CA_CTRL1 */
877 #define BITS_SMPL_MODE(_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)|BIT(13)|BIT(14)|BIT(15)) )
879 /* bits definitions for register ANA_REG_GLB_CA_CTRL2 */
880 #define BIT_SMPL_PWR_ON_FLAG ( BIT(15) )
881 #define BIT_SMPL_MODE_WR_ACK_FLAG ( BIT(14) )
882 #define BIT_SMPL_PWR_ON_FLAG_CLR ( BIT(13) )
883 #define BIT_SMPL_MODE_WR_ACK_FLAG_CLR ( BIT(12) )
884 #define BIT_SMPL_PWR_ON_SET ( BIT(11) )
885 #define BIT_SLP_LDOKPLED_PD_EN ( BIT(9) )
886 #define BIT_LDO_KPLED_PD ( BIT(8) )
887 #define BITS_LDO_KPLED_V(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
889 /* bits definitions for register ANA_REG_GLB_CA_CTRL3 */
890 #define BITS_VBAT_CRASH_V(_x_) ( (_x_) << 14 & (BIT(14)|BIT(15)) )
891 #define BIT_PBINT_7S_AUTO_ON_EN_CLR ( BIT(13) )
892 #define BIT_PBINT_7S_AUTO_ON_EN_SET ( BIT(12) )
893 #define BIT_VIBR_LDO_EN ( BIT(10) )
894 #define BIT_SLP_LDOVIBR_PD_EN ( BIT(9) )
895 #define BIT_LDO_VIBR_PD ( BIT(8) )
896 #define BITS_LDO_VIBR_V(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
898 /* bits definitions for register ANA_REG_GLB_DCDC_CORE_ADI */
899 #define BITS_DCDC_CORE_CTL_ADI(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)) )
900 #define BITS_DCDC_CORE_CAL_ADI(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
902 /* bits definitions for register ANA_REG_GLB_DCDC_ARM_ADI */
903 #define BITS_DCDC_ARM_CTL_ADI(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)) )
904 #define BITS_DCDC_ARM_CAL_ADI(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
906 /* bits definitions for register ANA_REG_GLB_DCDC_MEM_ADI */
907 #define BIT_DCDC_MEM_CTL_ADI ( BIT(5) )
908 #define BITS_DCDC_MEM_CAL_ADI(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
910 /* bits definitions for register ANA_REG_GLB_DCDC_GEN_ADI */
911 #define BITS_DCDC_GEN_CTL_ADI(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)) )
912 #define BITS_DCDC_GEN_CAL_ADI(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
914 /* bits definitions for register ANA_REG_GLB_DCDC_WRF_ADI */
915 #define BITS_DCDC_WRF_CTL_ADI(_x_) ( (_x_) << 5 & (BIT(5)|BIT(6)) )
916 #define BITS_DCDC_WRF_CAL_ADI(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) )
918 /* bits definitions for register ANA_REG_GLB_DCDC_WPA_ADI */
919 #define BITS_DCDC_WPA_CAL_ADI(_x_) ( (_x_) & (BIT(0)|BIT(1)|BIT(2)) )
921 /* bits definitions for register ANA_REG_GLB_DCDC_WPA_DCM_ADI */
922 #define BIT_DCDC_WPA_DCM_ADI ( BIT(0) )
924 #endif //__ANA_REGS_GLB_H__