change source file mode to 0644 instead of 0755
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8825 / regs_glb.h
1 /*
2  * Copyright (C) 2012 Spreadtrum Communications Inc.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  *************************************************
15  * Automatically generated C header: do not edit *
16  *************************************************
17  */
18
19 #ifndef __REGS_GLB_H__
20 #define __REGS_GLB_H__
21
22 #define REGS_GLB
23
24 #ifndef BIT
25 #define BIT(x) (1<<(x))
26 #endif
27
28 #ifndef SCI_ADDR
29 #define SCI_ADDR(a, b) ((u32)(a)+(b))
30 #endif
31
32 #ifndef REGS_GLB_BASE
33 #define REGS_GLB_BASE GREG_BASE
34 #endif
35
36 /* registers definitions for controller REGS_GLB */
37 #define REG_GLB_MCU_SOFT_RST            SCI_ADDR(REGS_GLB_BASE, 0x0004)
38 #define REG_GLB_GEN0                    SCI_ADDR(REGS_GLB_BASE, 0x0008)
39 #define REG_GLB_PCTRL                   SCI_ADDR(REGS_GLB_BASE, 0x000c)
40 #define REG_GLB_GEN1                    SCI_ADDR(REGS_GLB_BASE, 0x0018)
41 #define REG_GLB_GEN3                    SCI_ADDR(REGS_GLB_BASE, 0x001c)
42 #define REG_GLB_HWRST                   SCI_ADDR(REGS_GLB_BASE, 0x0020)
43 #define REG_GLB_M_PLL_CTL0              SCI_ADDR(REGS_GLB_BASE, 0x0024)
44 #define REG_GLB_PINCTL                  SCI_ADDR(REGS_GLB_BASE, 0x0028)
45 #define REG_GLB_GEN2                    SCI_ADDR(REGS_GLB_BASE, 0x002c)
46 #define REG_GLB_ARMBOOT                 SCI_ADDR(REGS_GLB_BASE, 0x0030)
47 #define REG_GLB_STC_DSP_ST              SCI_ADDR(REGS_GLB_BASE, 0x0034)
48 #define REG_GLB_TD_PLL_CTL              SCI_ADDR(REGS_GLB_BASE, 0x003c)
49 #define REG_GLB_D_PLL_CTL               SCI_ADDR(REGS_GLB_BASE, 0x0040)
50 #define REG_GLB_BUSCLK                  SCI_ADDR(REGS_GLB_BASE, 0x0044)
51 #define REG_GLB_ARCH                    SCI_ADDR(REGS_GLB_BASE, 0x0048)
52 #define REG_GLB_SOFT_RST                SCI_ADDR(REGS_GLB_BASE, 0x004c)
53 #define REG_GLB_G_PLL_CTL               SCI_ADDR(REGS_GLB_BASE, 0x0050)
54 #define REG_GLB_NFCMEMDLY               SCI_ADDR(REGS_GLB_BASE, 0x0058)
55 #define REG_GLB_CLKDLY                  SCI_ADDR(REGS_GLB_BASE, 0x005c)
56 #define REG_GLB_GEN4                    SCI_ADDR(REGS_GLB_BASE, 0x0060)
57 #define REG_GLB_A_PLLMN                 SCI_ADDR(REGS_GLB_BASE, 0x0064)
58 #define REG_GLB_POWCTL0                 SCI_ADDR(REGS_GLB_BASE, 0x0068)
59 #define REG_GLB_POWCTL1                 SCI_ADDR(REGS_GLB_BASE, 0x006c)
60 #define REG_GLB_PLL_SCR                 SCI_ADDR(REGS_GLB_BASE, 0x0070)
61 #define REG_GLB_CLK_EN                  SCI_ADDR(REGS_GLB_BASE, 0x0074)
62 #define REG_GLB_CLK26M_ANA_CTL          SCI_ADDR(REGS_GLB_BASE, 0x0078)
63 #define REG_GLB_CLK_GEN5                SCI_ADDR(REGS_GLB_BASE, 0x007c)
64 #define REG_GLB_DDR_PHY_RETENTION       SCI_ADDR(REGS_GLB_BASE, 0x0080)
65 #define REG_GLB_MM_PWR_CTL              SCI_ADDR(REGS_GLB_BASE, 0x0084)
66 #define REG_GLB_CEVA_L1RAM_PWR_CTL      SCI_ADDR(REGS_GLB_BASE, 0x0088)
67 #define REG_GLB_GSM_PWR_CTL             SCI_ADDR(REGS_GLB_BASE, 0x008c)
68 #define REG_GLB_TD_PWR_CTL              SCI_ADDR(REGS_GLB_BASE, 0x0090)
69 #define REG_GLB_PERI_PWR_CTL            SCI_ADDR(REGS_GLB_BASE, 0x0094)
70 #define REG_GLB_ARM_SYS_PWR_CTL         SCI_ADDR(REGS_GLB_BASE, 0x009c)
71 #define REG_GLB_G3D_PWR_CTL             SCI_ADDR(REGS_GLB_BASE, 0x00a0)
72 #define REG_GLB_CHIP_DSLEEP_STAT        SCI_ADDR(REGS_GLB_BASE, 0x00a4)
73 #define REG_GLB_PWR_CTRL_NUM1           SCI_ADDR(REGS_GLB_BASE, 0x00a8)
74 #define REG_GLB_PWR_CTRL_NUM2           SCI_ADDR(REGS_GLB_BASE, 0x00ac)
75 #define REG_GLB_PWR_CTRL_NUM3           SCI_ADDR(REGS_GLB_BASE, 0x00b0)
76 #define REG_GLB_PWR_CTRL_NUM4           SCI_ADDR(REGS_GLB_BASE, 0x00b4)
77 #define REG_GLB_PWR_CTRL_NUM5           SCI_ADDR(REGS_GLB_BASE, 0x00b8)
78 #define REG_GLB_ARM9_SYS_PWR_CTL        SCI_ADDR(REGS_GLB_BASE, 0x00bc)
79 #define REG_GLB_DMA_CTRL                SCI_ADDR(REGS_GLB_BASE, 0x00c0)
80 #define REG_GLB_DMA_AP_CP_SEL           SCI_ADDR(REGS_GLB_BASE, 0x00c4)
81 #define REG_GLB_SLEEP_INT_AP_SEL        SCI_ADDR(REGS_GLB_BASE, 0x00c8)
82 #define REG_GLB_SLEEP_INT_CP_SEL        SCI_ADDR(REGS_GLB_BASE, 0x00cc)
83 #define REG_GLB_TEST_CLK_CTRL           SCI_ADDR(REGS_GLB_BASE, 0x00d0)
84 #define REG_GLB_TP_DLYC_LEN             SCI_ADDR(REGS_GLB_BASE, 0x00d4)
85 #define REG_GLB_MIPI_PHY_CTRL           SCI_ADDR(REGS_GLB_BASE, 0x00d8)
86 #define REG_GLB_BOND_OPTION             SCI_ADDR(REGS_GLB_BASE, 0x0100)
87
88 /* bits definitions for register REG_GLB_MCU_SOFT_RST */
89 /* MCU soft reset the whole MCU sub-system, processor core, AHB and APB
90  * this bit will be self-cleared to zero after set
91  */
92 #define BIT_MCU_SOFT_RST                ( BIT(0) )
93
94 /* bits definitions for register REG_GLB_GEN0 */
95 #define BIT_IC3_EB                      ( BIT(31) )
96 #define BIT_IC2_EB                      ( BIT(30) )
97 #define BIT_IC1_EB                      ( BIT(29) )
98 #define BIT_RTC_TMR_EB                  ( BIT(28) )
99 #define BIT_RTC_SYST0_EB                ( BIT(27) )
100 #define BIT_RTC_KPD_EB                  ( BIT(26) )
101 #define BIT_IIS1_EB                     ( BIT(25) )
102 #define BIT_RTC_EIC_EB                  ( BIT(24) )
103 #define BIT_UART2_EB                    ( BIT(22) )
104 #define BIT_UART1_EB                    ( BIT(21) )
105 #define BIT_UART0_EB                    ( BIT(20) )
106 #define BIT_SYST0_EB                    ( BIT(19) )
107 #define BIT_SPI1_EB                     ( BIT(18) )
108 #define BIT_SPI0_EB                     ( BIT(17) )
109 #define BIT_SIM1_EB                     ( BIT(16) )
110 #define BIT_EPT_EB                      ( BIT(15) )
111 #define BIT_CCIR_MCLK_EN                ( BIT(14) )
112 #define BIT_PINREG_EB                   ( BIT(13) )
113 #define BIT_IIS0_EB                     ( BIT(12) )
114 /* MCU soft reset DSP Z-bus Accelerators, it will be self-cleared to zero after set
115  */
116 #define BIT_MCU_DSP_RST                 ( BIT(10) )
117 #define BIT_EIC_EB                      ( BIT(9) )
118 #define BIT_KPD_EB                      ( BIT(8) )
119 #define BIT_EFUSE_EB                    ( BIT(7) )
120 #define BIT_ADI_EB                      ( BIT(6) )
121 #define BIT_GPIO_EB                     ( BIT(5) )
122 #define BIT_I2C0_EB                     ( BIT(4) )
123 #define BIT_SIM0_EB                     ( BIT(3) )
124 #define BIT_TMR_EB                      ( BIT(2) )
125 #define BIT_SPI2_EB                     ( BIT(1) )
126 #define BIT_UART3_EB                    ( BIT(0) )
127
128 /* bits definitions for register REG_GLB_PCTRL */
129 #define BIT_IIS0_CTL_SEL                ( BIT(31) )
130 #define BIT_IIS1_CTL_SEL                ( BIT(30) )
131 #define BITS_CLK_AUX1_DIV(_x_)          ( (_x_) << 22 & (BIT(22)|BIT(23)|BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)|BIT(29)) )
132 #define BIT_GPLL_CNT_DONE               ( BIT(17) )
133 #define BIT_MCU_GPLL_EN                 ( BIT(16) )
134 #define BIT_ROM_FORCE_ON                ( BIT(10) )
135 /* All clock gatings will be invalid ,ad then all clock enable, for debug use */
136 #define BIT_CLK_ALL_EN                  ( BIT(9) )
137 /* Owner selection for UART1, <0: ARM control, 1: DSP control> */
138 #define BIT_UART1_CTL_SEL               ( BIT(8) )
139 /* Flag indicating MPLL is stable, active high. Only for SW debug. */
140 #define BIT_MPLL_CNT_DONE               ( BIT(7) )
141 #define BIT_TDPLL_CNT_DONE              ( BIT(6) )
142 #define BIT_DPLL_CNT_DONE               ( BIT(5) )
143 #define BIT_ARM_JTAG_EN                 ( BIT(4) )
144 #define BIT_MCU_DPLL_EN                 ( BIT(3) )
145 #define BIT_MCU_TDPLL_EN                ( BIT(2) )
146 #define BIT_MCU_MPLL_EN                 ( BIT(1) )
147 /* MCU force deepsleep. for debug use. */
148 #define BIT_MCU_FORECE_DEEP_SLEEP       ( BIT(0) )
149
150 /* bits definitions for register REG_GLB_GEN1 */
151 #define BIT_AUD_CTL_SEL                 ( BIT(22) )
152 #define BIT_AUDIF_AUTO_EN               ( BIT(21) )
153 #define BITS_AUDIF_SEL(_x_)             ( (_x_) << 19 & (BIT(19)|BIT(20)) )
154 #define BIT_RTC_ARCH_EB                 ( BIT(18) )
155 #define BIT_AUD_CLK_SEL                 ( BIT(17) )
156 #define BIT_VBC_EN                      ( BIT(14) )
157 #define BIT_AUD_TOP_EB                  ( BIT(13) )
158 #define BIT_AUD_IF_EB                   ( BIT(12) )
159 #define BIT_CLK_AUX1_EN                 ( BIT(11) )
160 #define BIT_CLK_AUX0_EN                 ( BIT(10) )
161 #define BIT_MPLL_CTL_WE                 ( BIT(9) )
162 #define BITS_CLK_AUX0_DIV(_x_)          ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
163
164 /* bits definitions for register REG_GLB_GEN3 */
165 #define BITS_CCIR_MCLK_DIV(_x_)         ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
166 #define BIT_JTAG_DAISY_EN               ( BIT(23) )
167 #define BITS_CLK_UART3_DIV(_x_)         ( (_x_) << 18 & (BIT(18)|BIT(19)|BIT(20)) )
168 #define BITS_CLK_UART3_SEL(_x_)         ( (_x_) << 16 & (BIT(16)|BIT(17)) )
169 #define BITS_CLK_IIS1_DIV(_x_)          ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
170 #define BITS_CLK_SPI2_DIV(_x_)          ( (_x_) << 5 & (BIT(5)|BIT(6)|BIT(7)) )
171 #define BITS_CLK_SPI2_SEL(_x_)          ( (_x_) << 3 & (BIT(3)|BIT(4)) )
172
173 /* bits definitions for register REG_GLB_HWRST */
174 #define BITS_HWRST(_x_)                 ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
175
176 #define SHFT_HWRST                      ( 8 )
177 #define MASK_HWRST                      ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
178
179 /* bits definitions for register REG_GLB_M_PLL_CTL0 */
180 #define BITS_MPLL_REFIN(_x_)            ( (_x_) << 16 & (BIT(16)|BIT(17)) )
181 #define BITS_MPLL_LPF(_x_)              ( (_x_) << 13 & (BIT(13)|BIT(14)|BIT(15)) )
182 #define BITS_MPLL_IBIAS(_x_)            ( (_x_) << 11 & (BIT(11)|BIT(12)) )
183 #define BITS_MPLL_N(_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)) )
184
185 #define SHFT_MPLL_REFIN                 ( 16 )
186 #define MASK_MPLL_REFIN                 ( BIT(16)|BIT(17) )
187
188 #define SHFT_MPLL_N                     ( 0 )
189 #define MASK_MPLL_N                     ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10) )
190
191 /* bits definitions for register REG_GLB_PINCTL */
192 #define BITS_AJTAG_PIN_IN_SEL(_x_)      ( (_x_) << 19 & (BIT(19)|BIT(20)) )
193 #define BITS_CCIRCK_PIN_IN_SEL(_x_)     ( (_x_) << 17 & (BIT(17)|BIT(18)) )
194 #define BIT_CP_VBC_BYPASS_EN            ( BIT(16) )
195 #define BIT_FM_VBC_BYPASS_EN            ( BIT(15) )
196 #define BIT_UART_LOOP_SEL               ( BIT(14) )
197 #define BIT_PCM_LOOP_SEL                ( BIT(13) )
198 #define BIT_DJTAG_PIN_IN_SEL            ( BIT(12) )
199 #define BIT_SPI1_PIN_IN_SEL             ( BIT(11) )
200 #define BIT_FMARK_POL_INV               ( BIT(6) )
201 #define BIT_SIM1_PIN_IN_SEL             ( BIT(5) )
202 #define BIT_SIM0_PIN_IN_SEL             ( BIT(4) )
203
204 /* bits definitions for register REG_GLB_GEN2 */
205 #define BITS_CLK_IIS0_DIV(_x_)          ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
206 #define BITS_CLK_SPI0_DIV(_x_)          ( (_x_) << 21 & (BIT(21)|BIT(22)|BIT(23)) )
207 #define BITS_CLK_GPU_AXI_DIV(_x_)       ( (_x_) << 14 & (BIT(14)|BIT(15)|BIT(16)) )
208 #define BITS_CLK_SPI1_DIV(_x_)          ( (_x_) << 11 & (BIT(11)|BIT(12)|BIT(13)) )
209 #define BITS_CLK_NFC_DIV(_x_)           ( (_x_) << 6 & (BIT(6)|BIT(7)|BIT(8)) )
210 #define BITS_CLK_NFC_SEL(_x_)           ( (_x_) << 4 & (BIT(4)|BIT(5)) )
211 #define BITS_CLK_GPU_AXI_SEL(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)) )
212
213 /* bits definitions for register REG_GLB_ARMBOOT */
214 #define BITS_ARMBOOT_ADDR(_x_)          ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
215
216 #define SHFT_ARMBOOT_ADDR               ( 0 )
217 #define MASK_ARMBOOT_ADDR               ( 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) )
218
219 /* bits definitions for register REG_GLB_STC_DSP_ST */
220 #define BITS_STC_DSP_STATE(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
221
222 /* bits definitions for register REG_GLB_TD_PLL_CTL */
223 #define BIT_TDPLL_DIV2OUT_FORCE_PD      ( BIT(11) )
224 #define BIT_TDPLL_DIV3OUT_FORCE_PD      ( BIT(10) )
225 #define BIT_TDPLL_DIV4OUT_FORCE_PD      ( BIT(9) )
226 #define BIT_TDPLL_DIV5OUT_FORCE_PD      ( BIT(8) )
227 #define BITS_TDPLL_REFIN(_x_)           ( (_x_) << 5 & (BIT(5)|BIT(6)) )
228 #define BITS_TDPLL_LPF(_x_)             ( (_x_) << 2 & (BIT(2)|BIT(3)|BIT(4)) )
229 #define BITS_TDPLL_IBIAS(_x_)           ( (_x_) << 0 & (BIT(0)|BIT(1)) )
230
231 /* bits definitions for register REG_GLB_D_PLL_CTL */
232 #define BITS_DPLL_REFIN(_x_)            ( (_x_) << 16 & (BIT(16)|BIT(17)) )
233 #define BITS_DPLL_LPF(_x_)              ( (_x_) << 13 & (BIT(13)|BIT(14)|BIT(15)) )
234 #define BITS_DPLL_IBIAS(_x_)            ( (_x_) << 11 & (BIT(11)|BIT(12)) )
235 #define BITS_DPLL_N(_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)) )
236
237 #define SHFT_DPLL_N                     ( 0 )
238 #define MASK_DPLL_N                     ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10) )
239
240 /* bits definitions for register REG_GLB_BUSCLK */
241 #define BIT_ARM_VB_SEL                  ( BIT(28) )
242 #define BIT_ARM_VBC_ACC_CP              ( BIT(27) )
243 #define BIT_ARM_VBC_ACC                 ( BIT(26) )
244 #define BITS_PWRON_DLY_CTRL(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)|BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)|BIT(24)|BIT(25)) )
245 #define BIT_ARM_VBC_ANAON               ( BIT(6) )
246 #define BIT_ARM_VBC_AD1ON               ( BIT(5) )
247 #define BIT_ARM_VBC_AD0ON               ( BIT(4) )
248 #define BIT_ARM_VBC_DA1ON               ( BIT(3) )
249 #define BIT_ARM_VBC_DA0ON               ( BIT(2) )
250 #define BIT_VBC_ARM_RST                 ( BIT(1) )
251 #define BIT_VBDA_IIS_DATA_SEL           ( BIT(0) )
252
253 /* bits definitions for register REG_GLB_ARCH */
254 #define BIT_ARCH_EB                     ( BIT(10) )
255
256 /* bits definitions for register REG_GLB_SOFT_RST */
257 #define BIT_SPI2_RST                    ( BIT(31) )
258 #define BIT_UART3_RST                   ( BIT(30) )
259 #define BIT_EIC_RST                     ( BIT(29) )
260 #define BIT_EFUSE_RST                   ( BIT(28) )
261 #define BIT_PWM3_RST                    ( BIT(27) )
262 #define BIT_PWM2_RST                    ( BIT(26) )
263 #define BIT_PWM1_RST                    ( BIT(25) )
264 #define BIT_PWM0_RST                    ( BIT(24) )
265 #define BIT_ADI_RST                     ( BIT(22) )
266 #define BIT_GPIO_RST                    ( BIT(21) )
267 #define BIT_PINREG_RST                  ( BIT(20) )
268 #define BIT_SYST0_RST                   ( BIT(19) )
269 #define BIT_VBC_RST                     ( BIT(18) )
270 #define BIT_IIS1_RST                    ( BIT(17) )
271 #define BIT_IIS0_RST                    ( BIT(16) )
272 #define BIT_SPI1_RST                    ( BIT(15) )
273 #define BIT_SPI0_RST                    ( BIT(14) )
274 #define BIT_UART2_RST                   ( BIT(13) )
275 #define BIT_UART1_RST                   ( BIT(12) )
276 #define BIT_UART0_RST                   ( BIT(11) )
277 #define BIT_EPT_RST                     ( BIT(10) )
278 #define BIT_AUD_IF_RST                  ( BIT(9) )
279 #define BIT_TMR_RST                     ( BIT(8) )
280 #define BIT_AUD_TOP_RST                 ( BIT(7) )
281 #define BIT_SIM1_RST                    ( BIT(6) )
282 #define BIT_SIM0_RST                    ( BIT(5) )
283 #define BIT_I2C3_RST                    ( BIT(4) )
284 #define BIT_I2C2_RST                    ( BIT(3) )
285 #define BIT_I2C1_RST                    ( BIT(2) )
286 #define BIT_KPD_RST                     ( BIT(1) )
287 #define BIT_I2C0_RST                    ( BIT(0) )
288
289 /* bits definitions for register REG_GLB_G_PLL_CTL */
290 #define BITS_GPLL_REFIN(_x_)            ( (_x_) << 16 & (BIT(16)|BIT(17)) )
291 #define BITS_GPLL_LPF(_x_)              ( (_x_) << 13 & (BIT(13)|BIT(14)|BIT(15)) )
292 #define BITS_GPLL_IBIAS(_x_)            ( (_x_) << 11 & (BIT(11)|BIT(12)) )
293 #define BITS_GPLL_N(_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)) )
294
295 #define SHFT_GPLL_N                     ( 0 )
296 #define MASK_GPLL_N                     ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10) )
297
298 /* bits definitions for register REG_GLB_NFCMEMDLY */
299 #define BITS_NFC_MEM_DLY(_x_)           ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)|BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
300
301 /* bits definitions for register REG_GLB_CLKDLY */
302 #define BITS_CLK_SPI1_SEL(_x_)          ( (_x_) << 30 & (BIT(30)|BIT(31)) )
303 #define BIT_CLK_ADI_EN_ARM              ( BIT(29) )
304 #define BIT_CLK_ADI_SEL                 ( BIT(28) )
305 #define BITS_CLK_SPI0_SEL(_x_)          ( (_x_) << 26 & (BIT(26)|BIT(27)) )
306 #define BITS_CLK_UART2_SEL(_x_)         ( (_x_) << 24 & (BIT(24)|BIT(25)) )
307 #define BITS_CLK_UART1_SEL(_x_)         ( (_x_) << 22 & (BIT(22)|BIT(23)) )
308 #define BITS_CLK_UART0_SEL(_x_)         ( (_x_) << 20 & (BIT(20)|BIT(21)) )
309 #define BITS_CLK_CCIR_DLY_SEL(_x_)      ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
310 #define BITS_CLK_APB_SEL(_x_)           ( (_x_) << 14 & (BIT(14)|BIT(15)) )
311 #define BITS_DSP_STATUS(_x_)            ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
312 #define BIT_MCU_VBC_RST                 ( BIT(2) )
313 #define BIT_CHIP_SLEEP_REC_ARM          ( BIT(1) )
314 #define BIT_CHIP_SLP_ARM_CLR            ( BIT(0) )
315
316 /* bits definitions for register REG_GLB_GEN4 */
317 #define BIT_XTLBUF_WAIT_SEL             ( BIT(31) )
318 #define BIT_PLL_WAIT_SEL                ( BIT(30) )
319 #define BIT_XTL_WAIT_SEL                ( BIT(29) )
320 #define BITS_ARM_XTLBUF_WAIT(_x_)       ( (_x_) << 21 & (BIT(21)|BIT(22)|BIT(23)|BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)) )
321 #define BITS_ARM_PLL_WAIT(_x_)          ( (_x_) << 13 & (BIT(13)|BIT(14)|BIT(15)|BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
322 #define BITS_ARM_XTL_WAIT(_x_)          ( (_x_) << 3 & (BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)) )
323 #define BITS_CLK_LCDC_DIV(_x_)          ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)) )
324
325 /* bits definitions for register REG_GLB_A_PLLMN */
326 #define BITS_A_PLLMN(_x_)               ( (_x_) << 0 )
327
328 /* bits definitions for register REG_GLB_POWCTL0 */
329 #define BITS_ARM_PWR_ON_DLY(_x_)        ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
330 #define BIT_ARM_SLP_POWOFF_AUTO_EN      ( BIT(23) )
331 #define BIT_ARM_PCELL_SWAP              ( BIT(16) )
332 #define BITS_ARM_ISO_ON_NUM(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
333 #define BITS_ARM_ISO_OFF_NUM(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
334
335 #define SHFT_ARM_PWR_ON_DLY             ( 24 )
336 #define MASK_ARM_PWR_ON_DLY             ( BIT(24)|BIT(25)|BIT(26) )
337
338 #define SHFT_ARM_ISO_ON_NUM             ( 8 )
339 #define MASK_ARM_ISO_ON_NUM             ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
340
341 #define SHFT_ARM_ISO_OFF_NUM            ( 0 )
342 #define MASK_ARM_ISO_OFF_NUM            ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
343
344 /* bits definitions for register REG_GLB_POWCTL1 */
345 #define BIT_DSP_ROM_FORCE_PD            ( BIT(5) )
346 #define BIT_MCU_ROM_FORCE_PD            ( BIT(4) )
347 #define BIT_DSP_ROM_SLP_PD_EN           ( BIT(2) )
348 #define BIT_MCU_ROM_SLP_PD_EN           ( BIT(0) )
349
350 /* bits definitions for register REG_GLB_PLL_SCR */
351 #define BITS_CLK_DCAMMIPIPLL_SEL(_x_)   ( (_x_) << 22 & (BIT(22)|BIT(23)) )
352 #define BITS_CLK_CCIRPLL_SEL(_x_)       ( (_x_) << 20 & (BIT(20)|BIT(21)) )
353 #define BITS_CLK_CCIRMCLKPLL_SEL(_x_)   ( (_x_) << 18 & (BIT(18)|BIT(19)) )
354 #define BITS_CLK_IIS1PLL_SEL(_x_)       ( (_x_) << 14 & (BIT(14)|BIT(15)) )
355 #define BITS_CLK_AUX1PLL_SEL(_x_)       ( (_x_) << 12 & (BIT(12)|BIT(13)) )
356 #define BITS_CLK_AUX0PLL_SEL(_x_)       ( (_x_) << 10 & (BIT(10)|BIT(11)) )
357 #define BITS_CLK_IIS0PLL_SEL(_x_)       ( (_x_) << 8 & (BIT(8)|BIT(9)) )
358 #define BITS_CLK_LCDPLL_SEL(_x_)        ( (_x_) << 6 & (BIT(6)|BIT(7)) )
359 #define BITS_CLK_DCAMPLL_SEL(_x_)       ( (_x_) << 4 & (BIT(4)|BIT(5)) )
360 #define BITS_CLK_VSPPLL_SEL(_x_)        ( (_x_) << 2 & (BIT(2)|BIT(3)) )
361
362 /* bits definitions for register REG_GLB_CLK_EN */
363 #define BIT_CLK_PWM3_SEL                ( BIT(28) )
364 #define BIT_CLK_PWM2_SEL                ( BIT(27) )
365 #define BIT_CLK_PWM1_SEL                ( BIT(26) )
366 #define BIT_CLK_PWM0_SEL                ( BIT(25) )
367 #define BIT_PWM3_EB                     ( BIT(24) )
368 #define BIT_PWM2_EB                     ( BIT(23) )
369 #define BIT_PWM1_EB                     ( BIT(22) )
370 #define BIT_PWM0_EB                     ( BIT(21) )
371 #define BIT_APB_PERI_FRC_ON             ( BIT(20) )
372 #define BIT_APB_PERI_FRC_SLP            ( BIT(19) )
373 #define BIT_MCU_XTLEN_AUTOPD_EN         ( BIT(18) )
374 #define BITS_BUFON_CTRL(_x_)            ( (_x_) << 16 & (BIT(16)|BIT(17)) )
375 #define BIT_CLK_TDCAL_EN                ( BIT(9) )
376 #define BIT_CLK_TDFIR_EN                ( BIT(7) )
377
378 /* bits definitions for register REG_GLB_CLK26M_ANA_CTL */
379 #define BITS_REC_CLK26MHZ_RESERVE(_x_)  ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
380 #define BIT_REC_CLK26MHZ_CUR_SEL        ( BIT(4) )
381 #define BIT_REC_CLK26MHZ_BUF_AUTO_EN    ( BIT(3) )
382 #define BIT_REC_CLK26MHZ_BUF_FORCE_PD   ( BIT(2) )
383 #define BIT_CLK26M_ANA_SEL              ( BIT(1) )
384 #define BIT_CLK26M_ANA_FORCE_EN         ( BIT(0) )
385
386 /* bits definitions for register REG_GLB_CLK_GEN5 */
387 #define BITS_CLK_SDIO_SRC_DIV(_x_)      ( (_x_) << 26 & (BIT(26)|BIT(27)|BIT(28)|BIT(29)) )
388 #define BIT_CLK_SDIO_SRC_EN             ( BIT(25) )
389 #define BITS_CLK_EMMCPLL_SEL(_x_)       ( (_x_) << 23 & (BIT(23)|BIT(24)) )
390 #define BITS_CLK_SDIO2PLL_SEL(_x_)      ( (_x_) << 21 & (BIT(21)|BIT(22)) )
391 #define BITS_CLK_SDIO1PLL_SEL(_x_)      ( (_x_) << 19 & (BIT(19)|BIT(20)) )
392 #define BITS_CLK_SDIO0PLL_SEL(_x_)      ( (_x_) << 17 & (BIT(17)|BIT(18)) )
393 #define BIT_LDO_USB_PD                  ( BIT(9) )
394 #define BITS_CLK_UART2_DIV(_x_)         ( (_x_) << 6 & (BIT(6)|BIT(7)|BIT(8)) )
395 #define BITS_CLK_UART1_DIV(_x_)         ( (_x_) << 3 & (BIT(3)|BIT(4)|BIT(5)) )
396 #define BITS_CLK_UART0_DIV(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)) )
397
398 /* bits definitions for register REG_GLB_DDR_PHY_RETENTION */
399 #define BIT_DDR_PHY_RET_STATUS          ( BIT(3) )
400 #define BIT_DDR_PHY_RET_CLEAR           ( BIT(2) )
401 #define BIT_DDR_PHY_AUTO_RET_EN         ( BIT(1) )
402 #define BIT_FORCE_DDR_PHY_RET           ( BIT(0) )
403
404 /* bits definitions for register REG_GLB_MM_PWR_CTL */
405 #define BITS_MM_PWR_ON_DLY(_x_)         ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
406 #define BIT_MM_POW_FORCE_PD             ( BIT(23) )
407 #define BIT_MM_SLP_POWOFF_AUTO_EN       ( BIT(22) )
408 #define BIT_MM_PCELL_SWAP               ( BIT(21) )
409 #define BITS_PD_MM_STATUS(_x_)          ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
410 #define BITS_MM_ISO_ON_NUM(_x_)         ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
411 #define BITS_MM_ISO_OFF_NUM(_x_)        ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
412
413 #define SHFT_MM_PWR_ON_DLY              ( 24 )
414 #define MASK_MM_PWR_ON_DLY              ( BIT(24)|BIT(25)|BIT(26) )
415
416 #define SHFT_MM_ISO_ON_NUM              ( 8 )
417 #define MASK_MM_ISO_ON_NUM              ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
418
419 #define SHFT_MM_ISO_OFF_NUM             ( 0 )
420 #define MASK_MM_ISO_OFF_NUM             ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
421
422 /* bits definitions for register REG_GLB_CEVA_L1RAM_PWR_CTL */
423 #define BITS_CEVA_L1RAM_PWR_ON_DLY(_x_) ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
424 #define BIT_CEVA_L1RAM_POW_FORCE_PD     ( BIT(23) )
425 #define BIT_CEVA_L1RAM_SLP_POWOFF_AUTO_EN ( BIT(22) )
426 #define BIT_CEVA_L1RAM_PCELL_SWAP       ( BIT(21) )
427 #define BITS_PD_CEVA_L1RAM_STATUS(_x_)  ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
428 #define BITS_CEVA_L1RAM_ISO_ON_NUM(_x_) ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
429 #define BITS_CEVA_L1RAM_ISO_OFF_NUM(_x_)( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
430
431 #define SHFT_CEVA_L1RAM_PWR_ON_DLY      ( 24 )
432 #define MASK_CEVA_L1RAM_PWR_ON_DLY      ( BIT(24)|BIT(25)|BIT(26) )
433
434 #define SHFT_CEVA_L1RAM_ISO_ON_NUM      ( 8 )
435 #define MASK_CEVA_L1RAM_ISO_ON_NUM      ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
436
437 #define SHFT_CEVA_L1RAM_ISO_OFF_NUM     ( 0 )
438 #define MASK_CEVA_L1RAM_ISO_OFF_NUM     ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
439
440 /* bits definitions for register REG_GLB_GSM_PWR_CTL */
441 #define BITS_GSM_PWR_ON_DLY(_x_)        ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
442 #define BIT_MCU_GSM_POW_FORCE_PD        ( BIT(23) )
443 #define BIT_GSM_PCELL_SWAP              ( BIT(21) )
444 #define BITS_PD_GSM_STATUS(_x_)         ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
445 #define BITS_GSM_ISO_ON_NUM(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
446 #define BITS_GSM_ISO_OFF_NUM(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
447
448 #define SHFT_GSM_PWR_ON_DLY             ( 24 )
449 #define MASK_GSM_PWR_ON_DLY             ( BIT(24)|BIT(25)|BIT(26) )
450
451 #define SHFT_GSM_ISO_ON_NUM             ( 8 )
452 #define MASK_GSM_ISO_ON_NUM             ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
453
454 #define SHFT_GSM_ISO_OFF_NUM            ( 0 )
455 #define MASK_GSM_ISO_OFF_NUM            ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
456
457 /* bits definitions for register REG_GLB_TD_PWR_CTL */
458 #define BITS_TD_PWR_ON_DLY(_x_)         ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
459 #define BIT_MCU_TD_POW_FORCE_PD         ( BIT(23) )
460 #define BIT_TD_PCELL_SWAP               ( BIT(21) )
461 #define BITS_PD_TD_STATUS(_x_)          ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
462 #define BITS_TD_ISO_ON_NUM(_x_)         ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
463 #define BITS_TD_ISO_OFF_NUM(_x_)        ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
464
465 #define SHFT_TD_PWR_ON_DLY              ( 24 )
466 #define MASK_TD_PWR_ON_DLY              ( BIT(24)|BIT(25)|BIT(26) )
467
468 #define SHFT_TD_ISO_ON_NUM              ( 8 )
469 #define MASK_TD_ISO_ON_NUM              ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
470
471 #define SHFT_TD_ISO_OFF_NUM             ( 0 )
472 #define MASK_TD_ISO_OFF_NUM             ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
473
474 /* bits definitions for register REG_GLB_PERI_PWR_CTL */
475 #define BITS_PERI_PWR_ON_DLY(_x_)       ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
476 #define BIT_PERI_POW_FORCE_PD           ( BIT(23) )
477 #define BIT_PERI_SLP_POWOFF_AUTO_EN     ( BIT(22) )
478 #define BIT_PERI_PCELL_SWAP             ( BIT(21) )
479 #define BITS_PD_PERI_STATUS(_x_)        ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
480 #define BITS_PERI_ISO_ON_NUM(_x_)       ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
481 #define BITS_PERI_ISO_OFF_NUM(_x_)      ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
482
483 #define SHFT_PERI_PWR_ON_DLY            ( 24 )
484 #define MASK_PERI_PWR_ON_DLY            ( BIT(24)|BIT(25)|BIT(26) )
485
486 #define SHFT_PERI_ISO_ON_NUM            ( 8 )
487 #define MASK_PERI_ISO_ON_NUM            ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
488
489 #define SHFT_PERI_ISO_OFF_NUM           ( 0 )
490 #define MASK_PERI_ISO_OFF_NUM           ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
491
492 /* bits definitions for register REG_GLB_ARM_SYS_PWR_CTL */
493 #define BITS_ARM_SYS_PWR_ON_DLY(_x_)    ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
494 #define BIT_ARM_SYS_POW_FORCE_PD        ( BIT(23) )
495 #define BIT_ARM_SYS_SLP_POWOFF_AUTO_EN  ( BIT(22) )
496 #define BIT_ARM_SYS_PCELL_SWAP          ( BIT(21) )
497 #define BITS_PD_ARM_SYS_STATUS(_x_)     ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
498 #define BITS_ARM_SYS_ISO_ON_NUM(_x_)    ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
499 #define BITS_ARM_SYS_ISO_OFF_NUM(_x_)   ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
500
501 #define SHFT_ARM_SYS_PWR_ON_DLY         ( 24 )
502 #define MASK_ARM_SYS_PWR_ON_DLY         ( BIT(24)|BIT(25)|BIT(26) )
503
504 #define SHFT_ARM_SYS_ISO_ON_NUM         ( 8 )
505 #define MASK_ARM_SYS_ISO_ON_NUM         ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
506
507 #define SHFT_ARM_SYS_ISO_OFF_NUM        ( 0 )
508 #define MASK_ARM_SYS_ISO_OFF_NUM        ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
509
510 /* bits definitions for register REG_GLB_G3D_PWR_CTL */
511 #define BITS_G3D_PWR_ON_DLY(_x_)        ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
512 #define BIT_G3D_POW_FORCE_PD            ( BIT(23) )
513 #define BIT_G3D_SLP_POWOFF_AUTO_EN      ( BIT(22) )
514 #define BIT_G3D_PCELL_SWAP              ( BIT(21) )
515 #define BITS_PD_G3D_STATUS(_x_)         ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
516 #define BITS_G3D_ISO_ON_NUM(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
517 #define BITS_G3D_ISO_OFF_NUM(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
518
519 #define SHFT_G3D_PWR_ON_DLY             ( 24 )
520 #define MASK_G3D_PWR_ON_DLY             ( BIT(24)|BIT(25)|BIT(26) )
521
522 #define SHFT_G3D_ISO_ON_NUM             ( 8 )
523 #define MASK_G3D_ISO_ON_NUM             ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
524
525 #define SHFT_G3D_ISO_OFF_NUM            ( 0 )
526 #define MASK_G3D_ISO_OFF_NUM            ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
527
528 /* bits definitions for register REG_GLB_CHIP_DSLEEP_STAT */
529 #define BIT_CHIP_DSLEEP                 ( BIT(0) )
530
531 /* bits definitions for register REG_GLB_PWR_CTRL_NUM1 */
532 #define BITS_ARM_SYS_PWR_OFF_NUM(_x_)   ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
533 #define BITS_ARM_SYS_PWR_ON_NUM(_x_)    ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
534 #define BITS_ARM_PWR_OFF_NUM(_x_)       ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
535 #define BITS_ARM_PWR_ON_NUM(_x_)        ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
536
537 /* bits definitions for register REG_GLB_PWR_CTRL_NUM2 */
538 #define BITS_G3D_PWR_OFF_NUM(_x_)       ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
539 #define BITS_G3D_PWR_ON_NUM(_x_)        ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
540 #define BITS_MM_PWR_OFF_NUM(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
541 #define BITS_MM_PWR_ON_NUM(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
542
543 /* bits definitions for register REG_GLB_PWR_CTRL_NUM3 */
544 #define BITS_CEVA_L1RAM_PWR_OFF_NUM(_x_)( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
545 #define BITS_CEVA_L1RAM_PWR_ON_NUM(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
546 #define BITS_PERI_PWR_OFF_NUM(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
547 #define BITS_PERI_PWR_ON_NUM(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
548
549 /* bits definitions for register REG_GLB_PWR_CTRL_NUM4 */
550 #define BITS_GSM_PWR_OFF_NUM(_x_)       ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)|BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
551 #define BITS_GSM_PWR_ON_NUM(_x_)        ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
552 #define BITS_TD_PWR_OFF_NUM(_x_)        ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
553 #define BITS_TD_PWR_ON_NUM(_x_)         ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
554
555 /* bits definitions for register REG_GLB_PWR_CTRL_NUM5 */
556 #define BITS_ARM9_PWR_OFF_NUM(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
557 #define BITS_ARM9_PWR_ON_NUM(_x_)       ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
558
559 /* bits definitions for register REG_GLB_ARM9_SYS_PWR_CTL */
560 #define BITS_ARM9_SYS_PWR_ON_DLY(_x_)   ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)) )
561 #define BIT_ARM9_SYS_POW_FORCE_PD       ( BIT(23) )
562 #define BIT_ARM9_SYS_SLP_POWOFF_AUTO_EN ( BIT(22) )
563 #define BIT_ARM9_SYS_PCELL_SWAP         ( BIT(21) )
564 #define BITS_PD_ARM9_SYS_STATUS(_x_)    ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)|BIT(20)) )
565 #define BITS_ARM9_SYS_ISO_ON_NUM(_x_)   ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
566 #define BITS_ARM9_SYS_ISO_OFF_NUM(_x_)  ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
567
568 #define SHFT_ARM9_SYS_PWR_ON_DLY        ( 24 )
569 #define MASK_ARM9_SYS_PWR_ON_DLY        ( BIT(24)|BIT(25)|BIT(26) )
570
571 #define SHFT_ARM9_SYS_ISO_ON_NUM        ( 8 )
572 #define MASK_ARM9_SYS_ISO_ON_NUM        ( BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15) )
573
574 #define SHFT_ARM9_SYS_ISO_OFF_NUM       ( 0 )
575 #define MASK_ARM9_SYS_ISO_OFF_NUM       ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7) )
576
577 /* bits definitions for register REG_GLB_DMA_CTRL */
578 #define BIT_DMA_SPI_SEL                 ( BIT(0) )
579
580 /* bits definitions for register REG_GLB_TP_DLYC_LEN */
581 #define BITS_TD(_x_)                    ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)) )
582
583 /* bits definitions for register REG_GLB_MIPI_PHY_CTRL */
584 #define BIT_FORCE_DSI_PHY_RSTZ          ( BIT(3) )
585 #define BIT_FORCE_DSI_PHY_SHUTDWNZ      ( BIT(2) )
586 #define BIT_FORCE_CSI_PHY_RSTZ          ( BIT(1) )
587 #define BIT_FORCE_CSI_PHY_SHUTDWNZ      ( BIT(0) )
588
589 /* vars definitions for controller REGS_GLB */
590 #define REG_GLB_SET(A)                  ( A + 0x1000 )
591 #define REG_GLB_CLR(A)                  ( A + 0x2000 )
592
593 #endif //__REGS_GLB_H__