change source file mode to 0644 instead of 0755
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8830 / chip_x35 / sprd_reg_aon_apb.h
1 /*
2  * Copyright (C) 2014-2015 Spreadtrum Communications Inc.
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  */
10
11 #ifndef __REGS_AON_APB_H__
12 #define __REGS_AON_APB_H__
13
14 #define REGS_AON_APB
15
16 /* registers definitions for controller REGS_AON_APB */
17 #define REG_AON_APB_APB_EB0             SCI_ADDR(SPRD_AONAPB_PHYS, 0x0000)
18 #define REG_AON_APB_APB_EB1             SCI_ADDR(SPRD_AONAPB_PHYS, 0x0004)
19 #define REG_AON_APB_APB_RST0            SCI_ADDR(SPRD_AONAPB_PHYS, 0x0008)
20 #define REG_AON_APB_APB_RST1            SCI_ADDR(SPRD_AONAPB_PHYS, 0x000C)
21 #define REG_AON_APB_APB_RTC_EB          SCI_ADDR(SPRD_AONAPB_PHYS, 0x0010)
22 #define REG_AON_APB_MPLL_CFG            SCI_ADDR(SPRD_AONAPB_PHYS, 0x0014)
23 #define REG_AON_APB_DPLL_CFG            SCI_ADDR(SPRD_AONAPB_PHYS, 0x0018)
24 #define REG_AON_APB_TDPLL_CFG           SCI_ADDR(SPRD_AONAPB_PHYS, 0x001C)
25 #define REG_AON_APB_CPLL_CFG            SCI_ADDR(SPRD_AONAPB_PHYS, 0x0020)
26 #define REG_AON_APB_WIFIPLL0_CFG        SCI_ADDR(SPRD_AONAPB_PHYS, 0x0024)
27 #define REG_AON_APB_WIFIPLL1_CFG        SCI_ADDR(SPRD_AONAPB_PHYS, 0x0028)
28 #define REG_AON_APB_WPLL_CFG0           SCI_ADDR(SPRD_AONAPB_PHYS, 0x002C)
29 #define REG_AON_APB_WPLL_CFG1           SCI_ADDR(SPRD_AONAPB_PHYS, 0x0030)
30 #define REG_AON_APB_AON_CGM_CFG         SCI_ADDR(SPRD_AONAPB_PHYS, 0x0034)
31 #define REG_AON_APB_REC_26MHZ_BUF_CFG   SCI_ADDR(SPRD_AONAPB_PHYS, 0x0050)
32 #define REG_AON_APB_SINDRV_CTRL         SCI_ADDR(SPRD_AONAPB_PHYS, 0x0054)
33 #define REG_AON_APB_ADA_SEL_CTRL        SCI_ADDR(SPRD_AONAPB_PHYS, 0x0058)
34 #define REG_AON_APB_VBC_CTRL            SCI_ADDR(SPRD_AONAPB_PHYS, 0x005C)
35 #define REG_AON_APB_PWR_CTRL            SCI_ADDR(SPRD_AONAPB_PHYS, 0x0060)
36 #define REG_AON_APB_CP0_ADDR_REMAP_CTRL0 SCI_ADDR(SPRD_AONAPB_PHYS, 0x0064)
37 #define REG_AON_APB_CP0_ADDR_REMAP_CTRL1 SCI_ADDR(SPRD_AONAPB_PHYS, 0x0068)
38 #define REG_AON_APB_CP1_ADDR_REMAP_CTRL0 SCI_ADDR(SPRD_AONAPB_PHYS, 0x006C)
39 #define REG_AON_APB_CP1_ADDR_REMAP_CTRL1 SCI_ADDR(SPRD_AONAPB_PHYS, 0x0070)
40 #define REG_AON_APB_CP2_ADDR_REMAP_CTRL0 SCI_ADDR(SPRD_AONAPB_PHYS, 0x0074)
41 #define REG_AON_APB_CP2_ADDR_REMAP_CTRL1 SCI_ADDR(SPRD_AONAPB_PHYS, 0x0078)
42 #define REG_AON_APB_AP_WPROT_EN         SCI_ADDR(SPRD_AONAPB_PHYS, 0x007C)
43 #define REG_AON_APB_CP0_WPROT_EN        SCI_ADDR(SPRD_AONAPB_PHYS, 0x0080)
44 #define REG_AON_APB_CP1_WPROT_EN        SCI_ADDR(SPRD_AONAPB_PHYS, 0x0084)
45 #define REG_AON_APB_CP2_WPROT_EN        SCI_ADDR(SPRD_AONAPB_PHYS, 0x0088)
46 #define REG_AON_APB_TS_CFG              SCI_ADDR(SPRD_AONAPB_PHYS, 0x008C)
47 #define REG_AON_APB_BOOT_MODE           SCI_ADDR(SPRD_AONAPB_PHYS, 0x0090)
48 #define REG_AON_APB_BB_BG_CTRL          SCI_ADDR(SPRD_AONAPB_PHYS, 0x0094)
49 #define REG_AON_APB_IO_DLY_CTRL         SCI_ADDR(SPRD_AONAPB_PHYS, 0x0098)
50 #define REG_AON_APB_CP_ARM_JTAG_CTRL    SCI_ADDR(SPRD_AONAPB_PHYS, 0x009C)
51 #define REG_AON_APB_PLL_SOFT_CNT_DONE   SCI_ADDR(SPRD_AONAPB_PHYS, 0x00A0)
52 #define REG_AON_APB_PMU_RST_MONITOR     SCI_ADDR(SPRD_AONAPB_PHYS, 0x00A4)
53 #define REG_AON_APB_THM_RST_MONITOR     SCI_ADDR(SPRD_AONAPB_PHYS, 0x00A8)
54 #define REG_AON_APB_AP_RST_MONITOR      SCI_ADDR(SPRD_AONAPB_PHYS, 0x00AC)
55 #define REG_AON_APB_CA7_RST_MONITOR     SCI_ADDR(SPRD_AONAPB_PHYS, 0x00B0)
56 #define REG_AON_APB_BOND_OPT0           SCI_ADDR(SPRD_AONAPB_PHYS, 0x00B4)
57 #define REG_AON_APB_BOND_OPT1           SCI_ADDR(SPRD_AONAPB_PHYS, 0x00B8)
58 #define REG_AON_APB_RES_REG0            SCI_ADDR(SPRD_AONAPB_PHYS, 0x00BC)
59 #define REG_AON_APB_RES_REG1            SCI_ADDR(SPRD_AONAPB_PHYS, 0x00C0)
60 #define REG_AON_APB_CHIP_ID             SCI_ADDR(SPRD_AONAPB_PHYS, 0x00FC)
61
62 /* bits definitions for register REG_AON_APB_APB_EB0 */
63 #define BIT_I2C_EB                      ( BIT(31) )
64 #define BIT_CA7_DAP_EB                  ( BIT(30) )
65 #define BIT_CA7_TS1_EB                  ( BIT(29) )
66 #define BIT_CA7_TS0_EB                  ( BIT(28) )
67 #define BIT_GPU_EB                      ( BIT(27) )
68 #define BIT_AON_CKG_EB                  ( BIT(26) )
69 #define BIT_MM_EB                       ( BIT(25) )
70 #define BIT_AP_WDG_EB                   ( BIT(24) )
71 #define BIT_MSPI_EB                     ( BIT(23) )
72 #define BIT_SPLK_EB                     ( BIT(22) )
73 #define BIT_IPI_EB                      ( BIT(21) )
74 #define BIT_PIN_EB                      ( BIT(20) )
75 #define BIT_VBC_EB                      ( BIT(19) )
76 #define BIT_AUD_EB                      ( BIT(18) )
77 #define BIT_AUDIF_EB                    ( BIT(17) )
78 #define BIT_ADI_EB                      ( BIT(16) )
79 #define BIT_INTC_EB                     ( BIT(15) )
80 #define BIT_EIC_EB                      ( BIT(14) )
81 #define BIT_EFUSE_EB                    ( BIT(13) )
82 #define BIT_AP_TMR0_EB                  ( BIT(12) )
83 #define BIT_AON_TMR_EB                  ( BIT(11) )
84 #define BIT_AP_SYST_EB                  ( BIT(10) )
85 #define BIT_AON_SYST_EB                 ( BIT(9) )
86 #define BIT_KPD_EB                      ( BIT(8) )
87 #define BIT_PWM3_EB                     ( BIT(7) )
88 #define BIT_PWM2_EB                     ( BIT(6) )
89 #define BIT_PWM1_EB                     ( BIT(5) )
90 #define BIT_PWM0_EB                     ( BIT(4) )
91 #define BIT_GPIO_EB                     ( BIT(3) )
92 #define BIT_TPC_EB                      ( BIT(2) )
93 #define BIT_FM_EB                       ( BIT(1) )
94 #define BIT_ADC_EB                      ( BIT(0) )
95
96 /* bits definitions for register REG_AON_APB_APB_EB1 */
97 #define BIT_DISP_EMC_EB                 ( BIT(11) )
98 #define BIT_AP_TMR2_EB                  ( BIT(10) )
99 #define BIT_AP_TMR1_EB                  ( BIT(9) )
100 #define BIT_CA7_WDG_EB                  ( BIT(8) )
101 #define BIT_AVS1_EB                     ( BIT(7) )
102 #define BIT_AVS0_EB                     ( BIT(6) )
103 #define BIT_PROBE_EB                    ( BIT(5) )
104 #define BIT_AUX2_EB                     ( BIT(4) )
105 #define BIT_AUX1_EB                     ( BIT(3) )
106 #define BIT_AUX0_EB                     ( BIT(2) )
107 #define BIT_THM_EB                      ( BIT(1) )
108 #define BIT_PMU_EB                      ( BIT(0) )
109
110 /* bits definitions for register REG_AON_APB_APB_RST0 */
111 #define BIT_I2C_SOFT_RST                ( BIT(30) )
112 #define BIT_CA7_TS1_SOFT_RST            ( BIT(29) )
113 #define BIT_CA7_TS0_SOFT_RST            ( BIT(28) )
114 #define BIT_DAP_MTX_SOFT_RST            ( BIT(27) )
115 #define BIT_MSPI1_SOFT_RST              ( BIT(26) )
116 #define BIT_MSPI0_SOFT_RST              ( BIT(25) )
117 #define BIT_SPLK_SOFT_RST               ( BIT(24) )
118 #define BIT_IPI_SOFT_RST                ( BIT(23) )
119 #define BIT_AON_CKG_SOFT_RST            ( BIT(22) )
120 #define BIT_PIN_SOFT_RST                ( BIT(21) )
121 #define BIT_VBC_SOFT_RST                ( BIT(20) )
122 #define BIT_AUD_SOFT_RST                ( BIT(19) )
123 #define BIT_AUDIF_SOFT_RST              ( BIT(18) )
124 #define BIT_ADI_SOFT_RST                ( BIT(17) )
125 #define BIT_INTC_SOFT_RST               ( BIT(16) )
126 #define BIT_EIC_SOFT_RST                ( BIT(15) )
127 #define BIT_EFUSE_SOFT_RST              ( BIT(14) )
128 #define BIT_AP_WDG_SOFT_RST             ( BIT(13) )
129 #define BIT_AP_TMR0_SOFT_RST            ( BIT(12) )
130 #define BIT_AON_TMR_SOFT_RST            ( BIT(11) )
131 #define BIT_AP_SYST_SOFT_RST            ( BIT(10) )
132 #define BIT_AON_SYST_SOFT_RST           ( BIT(9) )
133 #define BIT_KPD_SOFT_RST                ( BIT(8) )
134 #define BIT_PWM3_SOFT_RST               ( BIT(7) )
135 #define BIT_PWM2_SOFT_RST               ( BIT(6) )
136 #define BIT_PWM1_SOFT_RST               ( BIT(5) )
137 #define BIT_PWM0_SOFT_RST               ( BIT(4) )
138 #define BIT_GPIO_SOFT_RST               ( BIT(3) )
139 #define BIT_TPC_SOFT_RST                ( BIT(2) )
140 #define BIT_FM_SOFT_RST                 ( BIT(1) )
141 #define BIT_ADC_SOFT_RST                ( BIT(0) )
142
143 /* bits definitions for register REG_AON_APB_APB_RST1 */
144 #define BIT_AP_TMR2_SOFT_RST            ( BIT(9) )
145 #define BIT_AP_TMR1_SOFT_RST            ( BIT(8) )
146 #define BIT_CA7_WDG_SOFT_RST            ( BIT(7) )
147 #define BIT_AVS1_SOFT_RST               ( BIT(6) )
148 #define BIT_AVS0_SOFT_RST               ( BIT(5) )
149 #define BIT_DMC_PHY_SOFT_RST            ( BIT(4) )
150 #define BIT_GPU_THMA_SOFT_RST           ( BIT(3) )
151 #define BIT_ARM_THMA_SOFT_RST           ( BIT(2) )
152 #define BIT_THM_SOFT_RST                ( BIT(1) )
153 #define BIT_PMU_SOFT_RST                ( BIT(0) )
154
155 /* bits definitions for register REG_AON_APB_APB_RTC_EB */
156 #define BIT_AP_TMR2_RTC_EB              ( BIT(16) )
157 #define BIT_AP_TMR1_RTC_EB              ( BIT(15) )
158 #define BIT_GPU_THMA_RTC_AUTO_EN        ( BIT(14) )
159 #define BIT_ARM_THMA_RTC_AUTO_EN        ( BIT(13) )
160 #define BIT_GPU_THMA_RTC_EB             ( BIT(12) )
161 #define BIT_ARM_THMA_RTC_EB             ( BIT(11) )
162 #define BIT_THM_RTC_EB                  ( BIT(10) )
163 #define BIT_CA7_WDG_RTC_EB              ( BIT(9) )
164 #define BIT_AP_WDG_RTC_EB               ( BIT(8) )
165 #define BIT_EIC_RTCDV5_EB               ( BIT(7) )
166 #define BIT_EIC_RTC_EB                  ( BIT(6) )
167 #define BIT_AP_TMR0_RTC_EB              ( BIT(5) )
168 #define BIT_AON_TMR_RTC_EB              ( BIT(4) )
169 #define BIT_AP_SYST_RTC_EB              ( BIT(3) )
170 #define BIT_AON_SYST_RTC_EB             ( BIT(2) )
171 #define BIT_KPD_RTC_EB                  ( BIT(1) )
172 #define BIT_ARCH_RTC_EB                 ( BIT(0) )
173
174 /* bits definitions for register REG_AON_APB_MPLL_CFG */
175 #define BITS_MPLL_REFIN(_x_)            ( (_x_) << 24 & (BIT(24)|BIT(25)) )
176 #define BITS_MPLL_LPF(_x_)              ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)) )
177 #define BITS_MPLL_IBIAS(_x_)            ( (_x_) << 16 & (BIT(16)|BIT(17)) )
178 #define BITS_MPLLN(_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)) )
179
180 /* bits definitions for register REG_AON_APB_DPLL_CFG */
181 #define BITS_DPLL_REFIN(_x_)            ( (_x_) << 24 & (BIT(24)|BIT(25)) )
182 #define BITS_DPLL_LPF(_x_)              ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)) )
183 #define BITS_DPLL_IBIAS(_x_)            ( (_x_) << 16 & (BIT(16)|BIT(17)) )
184 #define BITS_DPLLN(_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)) )
185
186 /* bits definitions for register REG_AON_APB_TDPLL_CFG */
187 #define BITS_TDPLL_REFIN(_x_)           ( (_x_) << 24 & (BIT(24)|BIT(25)) )
188 #define BITS_TDPLL_LPF(_x_)             ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)) )
189 #define BITS_TDPLL_IBIAS(_x_)           ( (_x_) << 16 & (BIT(16)|BIT(17)) )
190 #define BITS_TDPLLN(_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)) )
191
192 /* bits definitions for register REG_AON_APB_CPLL_CFG */
193 #define BITS_CPLL_REFIN(_x_)            ( (_x_) << 24 & (BIT(24)|BIT(25)) )
194 #define BITS_CPLL_LPF(_x_)              ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)) )
195 #define BITS_CPLL_IBIAS(_x_)            ( (_x_) << 16 & (BIT(16)|BIT(17)) )
196 #define BITS_CPLLN(_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)) )
197
198 /* bits definitions for register REG_AON_APB_WIFIPLL0_CFG */
199 #define BITS_WIFIPLL1_REFIN(_x_)        ( (_x_) << 24 & (BIT(24)|BIT(25)) )
200 #define BITS_WIFIPLL1_LPF(_x_)          ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)) )
201 #define BITS_WIFIPLL1_IBIAS(_x_)        ( (_x_) << 16 & (BIT(16)|BIT(17)) )
202 #define BITS_WIFIPLL1N(_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)) )
203
204 /* bits definitions for register REG_AON_APB_WIFIPLL1_CFG */
205 #define BITS_WIFIPLL2_REFIN(_x_)        ( (_x_) << 24 & (BIT(24)|BIT(25)) )
206 #define BITS_WIFIPLL2_LPF(_x_)          ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)) )
207 #define BITS_WIFIPLL2_IBIAS(_x_)        ( (_x_) << 16 & (BIT(16)|BIT(17)) )
208 #define BITS_WIFIPLL2N(_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)) )
209
210 /* bits definitions for register REG_AON_APB_WPLL_CFG0 */
211 #define BITS_WPLL_REFIN(_x_)            ( (_x_) << 24 & (BIT(24)|BIT(25)) )
212 #define BITS_WPLL_LPF(_x_)              ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)) )
213 #define BITS_WPLL_IBIAS(_x_)            ( (_x_) << 16 & (BIT(16)|BIT(17)) )
214 #define BITS_WPLLN(_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)) )
215
216 /* bits definitions for register REG_AON_APB_WPLL_CFG1 */
217 #define BITS_WPLL_KINT(_x_)             ( (_x_) << 12 & (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)|BIT(26)|BIT(27)|BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
218 #define BIT_WPLL_MOD_EN                 ( BIT(7) )
219 #define BIT_WPLL_SDM_EN                 ( BIT(6) )
220 #define BITS_WPLL_NINT(_x_)             ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)) )
221
222 /* bits definitions for register REG_AON_APB_AON_CGM_CFG */
223 #define BITS_PROBE_CKG_DIV(_x_)         ( (_x_) << 28 & (BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
224 #define BITS_AUX2_CKG_DIV(_x_)          ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
225 #define BITS_AUX1_CKG_DIV(_x_)          ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
226 #define BITS_AUX0_CKG_DIV(_x_)          ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
227 #define BITS_PROBE_CKG_SEL(_x_)         ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
228 #define BITS_AUX2_CKG_SEL(_x_)          ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
229 #define BITS_AUX1_CKG_SEL(_x_)          ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
230 #define BITS_AUX0_CKG_SEL(_x_)          ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
231
232 /* bits definitions for register REG_AON_APB_REC_26MHZ_BUF_CFG */
233 #define BITS_PLL_PROBE_SEL(_x_)         ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) )
234 #define BIT_REC_26MHZ_1_CUR_SEL         ( BIT(4) )
235 #define BIT_REC_26MHZ_0_CUR_SEL         ( BIT(0) )
236
237 /* bits definitions for register REG_AON_APB_SINDRV_CTRL */
238 #define BITS_SINDRV_LVL(_x_)            ( (_x_) << 3 & (BIT(3)|BIT(4)) )
239 #define BIT_SINDRV_CLIP_MODE            ( BIT(2) )
240 #define BIT_SINDRV_ENA_SQUARE           ( BIT(1) )
241 #define BIT_SINDRV_ENA                  ( BIT(0) )
242
243 /* bits definitions for register REG_AON_APB_ADA_SEL_CTRL */
244 #define BIT_WGADC_DIV_EN                ( BIT(2) )
245 #define BIT_AFCDAC_SYS_SEL              ( BIT(1) )
246 #define BIT_APCDAC_SYS_SEL              ( BIT(0) )
247
248 /* bits definitions for register REG_AON_APB_VBC_CTRL */
249 #define BIT_AUDIF_CKG_AUTO_EN           ( BIT(20) )
250 #define BITS_AUD_INT_SYS_SEL(_x_)       ( (_x_) << 18 & (BIT(18)|BIT(19)) )
251 #define BITS_VBC_AFIFO_INT_SYS_SEL(_x_) ( (_x_) << 16 & (BIT(16)|BIT(17)) )
252 #define BITS_VBC_AD23_INT_SYS_SEL(_x_)  ( (_x_) << 14 & (BIT(14)|BIT(15)) )
253 #define BITS_VBC_AD01_INT_SYS_SEL(_x_)  ( (_x_) << 12 & (BIT(12)|BIT(13)) )
254 #define BITS_VBC_DA01_INT_SYS_SEL(_x_)  ( (_x_) << 10 & (BIT(10)|BIT(11)) )
255 #define BITS_VBC_AD23_DMA_SYS_SEL(_x_)  ( (_x_) << 8 & (BIT(8)|BIT(9)) )
256 #define BITS_VBC_AD01_DMA_SYS_SEL(_x_)  ( (_x_) << 6 & (BIT(6)|BIT(7)) )
257 #define BITS_VBC_DA01_DMA_SYS_SEL(_x_)  ( (_x_) << 4 & (BIT(4)|BIT(5)) )
258 #define BIT_VBC_INT_CP0_ARM_SEL         ( BIT(3) )
259 #define BIT_VBC_INT_CP1_ARM_SEL         ( BIT(2) )
260 #define BIT_VBC_DMA_CP0_ARM_SEL         ( BIT(1) )
261 #define BIT_VBC_DMA_CP1_ARM_SEL         ( BIT(0) )
262
263 /* bits definitions for register REG_AON_APB_PWR_CTRL */
264 #define BIT_CA7_TS1_STOP                ( BIT(9) )
265 #define BIT_CA7_TS0_STOP                ( BIT(8) )
266 #define BIT_EFUSE1_PWR_ON               ( BIT(4) )
267 #define BIT_EFUSE0_PWR_ON               ( BIT(3) )
268 #define BIT_FORCE_DSI_PHY_SHUTDOWNZ     ( BIT(2) )
269 #define BIT_FORCE_CSI_PHY_SHUTDOWNZ     ( BIT(1) )
270 #define BIT_USB_PHY_PD                  ( BIT(0) )
271
272 /* bits definitions for register REG_AON_APB_CP0_ADDR_REMAP_CTRL0 */
273 #define BITS_CP0_ADDR_B7_REMAP(_x_)     ( (_x_) << 28 & (BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
274 #define BITS_CP0_ADDR_B6_REMAP(_x_)     ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
275 #define BITS_CP0_ADDR_B5_REMAP(_x_)     ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
276 #define BITS_CP0_ADDR_B4_REMAP(_x_)     ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
277 #define BITS_CP0_ADDR_B3_REMAP(_x_)     ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
278 #define BITS_CP0_ADDR_B2_REMAP(_x_)     ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
279 #define BITS_CP0_ADDR_B1_REMAP(_x_)     ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
280 #define BITS_CP0_ADDR_B0_REMAP(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
281
282 /* bits definitions for register REG_AON_APB_CP0_ADDR_REMAP_CTRL1 */
283 #define BIT_CP0_PUB_IRAM_B8_PROT_EN     ( BIT(12) )
284 #define BIT_CP0_PUB_IRAM_B7_PROT_EN     ( BIT(11) )
285 #define BIT_CP0_PUB_IRAM_B6_PROT_EN     ( BIT(10) )
286 #define BIT_CP0_PUB_IRAM_B5_PROT_EN     ( BIT(9) )
287 #define BIT_CP0_PUB_IRAM_B4_PROT_EN     ( BIT(8) )
288 #define BIT_CP0_PUB_IRAM_B3_PROT_EN     ( BIT(7) )
289 #define BIT_CP0_PUB_IRAM_B2_PROT_EN     ( BIT(6) )
290 #define BIT_CP0_PUB_IRAM_B1_PROT_EN     ( BIT(5) )
291 #define BIT_CP0_PUB_IRAM_B0_PROT_EN     ( BIT(4) )
292 #define BITS_CP0_ADDR_B8_REMAP(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
293
294 /* bits definitions for register REG_AON_APB_CP1_ADDR_REMAP_CTRL0 */
295 #define BITS_CP1_ADDR_B7_REMAP(_x_)     ( (_x_) << 28 & (BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
296 #define BITS_CP1_ADDR_B6_REMAP(_x_)     ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
297 #define BITS_CP1_ADDR_B5_REMAP(_x_)     ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
298 #define BITS_CP1_ADDR_B4_REMAP(_x_)     ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
299 #define BITS_CP1_ADDR_B3_REMAP(_x_)     ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
300 #define BITS_CP1_ADDR_B2_REMAP(_x_)     ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
301 #define BITS_CP1_ADDR_B1_REMAP(_x_)     ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
302 #define BITS_CP1_ADDR_B0_REMAP(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
303
304 /* bits definitions for register REG_AON_APB_CP1_ADDR_REMAP_CTRL1 */
305 #define BIT_CP1_PUB_IRAM_B8_PROT_EN     ( BIT(12) )
306 #define BIT_CP1_PUB_IRAM_B7_PROT_EN     ( BIT(11) )
307 #define BIT_CP1_PUB_IRAM_B6_PROT_EN     ( BIT(10) )
308 #define BIT_CP1_PUB_IRAM_B5_PROT_EN     ( BIT(9) )
309 #define BIT_CP1_PUB_IRAM_B4_PROT_EN     ( BIT(8) )
310 #define BIT_CP1_PUB_IRAM_B3_PROT_EN     ( BIT(7) )
311 #define BIT_CP1_PUB_IRAM_B2_PROT_EN     ( BIT(6) )
312 #define BIT_CP1_PUB_IRAM_B1_PROT_EN     ( BIT(5) )
313 #define BIT_CP1_PUB_IRAM_B0_PROT_EN     ( BIT(4) )
314 #define BITS_CP1_ADDR_B8_REMAP(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
315
316 /* bits definitions for register REG_AON_APB_CP2_ADDR_REMAP_CTRL0 */
317 #define BITS_CP2_ADDR_B7_REMAP(_x_)     ( (_x_) << 28 & (BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
318 #define BITS_CP2_ADDR_B6_REMAP(_x_)     ( (_x_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
319 #define BITS_CP2_ADDR_B5_REMAP(_x_)     ( (_x_) << 20 & (BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
320 #define BITS_CP2_ADDR_B4_REMAP(_x_)     ( (_x_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
321 #define BITS_CP2_ADDR_B3_REMAP(_x_)     ( (_x_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
322 #define BITS_CP2_ADDR_B2_REMAP(_x_)     ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
323 #define BITS_CP2_ADDR_B1_REMAP(_x_)     ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
324 #define BITS_CP2_ADDR_B0_REMAP(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
325
326 /* bits definitions for register REG_AON_APB_CP2_ADDR_REMAP_CTRL1 */
327 #define BIT_CP2_PUB_IRAM_B8_PROT_EN     ( BIT(12) )
328 #define BIT_CP2_PUB_IRAM_B7_PROT_EN     ( BIT(11) )
329 #define BIT_CP2_PUB_IRAM_B6_PROT_EN     ( BIT(10) )
330 #define BIT_CP2_PUB_IRAM_B5_PROT_EN     ( BIT(9) )
331 #define BIT_CP2_PUB_IRAM_B4_PROT_EN     ( BIT(8) )
332 #define BIT_CP2_PUB_IRAM_B3_PROT_EN     ( BIT(7) )
333 #define BIT_CP2_PUB_IRAM_B2_PROT_EN     ( BIT(6) )
334 #define BIT_CP2_PUB_IRAM_B1_PROT_EN     ( BIT(5) )
335 #define BIT_CP2_PUB_IRAM_B0_PROT_EN     ( BIT(4) )
336 #define BITS_CP2_ADDR_B8_REMAP(_x_)     ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
337
338 /* bits definitions for register REG_AON_APB_AP_WPROT_EN */
339 #define BITS_AP_AWADDR_WPROT_EN(_x_)    ( (_x_) << 0 )
340
341 /* bits definitions for register REG_AON_APB_CP0_WPROT_EN */
342 #define BITS_CP0_AWADDR_WPROT_EN(_x_)   ( (_x_) << 0 )
343
344 /* bits definitions for register REG_AON_APB_CP1_WPROT_EN */
345 #define BITS_CP1_AWADDR_WPROT_EN(_x_)   ( (_x_) << 0 )
346
347 /* bits definitions for register REG_AON_APB_CP2_WPROT_EN */
348 #define BITS_CP2_AWADDR_WPROT_EN(_x_)   ( (_x_) << 0 )
349
350 /* bits definitions for register REG_AON_APB_TS_CFG */
351 #define BIT_CSYSACK_TS_LP_2             ( BIT(13) )
352 #define BIT_CSYSREQ_TS_LP_2             ( BIT(12) )
353 #define BIT_CSYSACK_TS_LP_1             ( BIT(11) )
354 #define BIT_CSYSREQ_TS_LP_1             ( BIT(10) )
355 #define BIT_CSYSACK_TS_LP_0             ( BIT(9) )
356 #define BIT_CSYSREQ_TS_LP_0             ( BIT(8) )
357 #define BIT_EVENTACK_RESTARTREQ_TS01    ( BIT(4) )
358 #define BIT_EVENT_RESTARTREQ_TS01       ( BIT(1) )
359 #define BIT_EVENT_HALTREQ_TS01          ( BIT(0) )
360
361 /* bits definitions for register REG_AON_APB_BOOT_MODE */
362 #define BIT_WPLL_OVR_FREQ_SEL           ( BIT(12) )
363 #define BIT_PTEST_FUNC_ATSPEED_SEL      ( BIT(8) )
364 #define BIT_PTEST_FUNC_MODE             ( BIT(7) )
365 #define BIT_USB_DLOAD_EN                ( BIT(4) )
366 #define BIT_ARM_BOOT_MD3                ( BIT(3) )
367 #define BIT_ARM_BOOT_MD2                ( BIT(2) )
368 #define BIT_ARM_BOOT_MD1                ( BIT(1) )
369 #define BIT_ARM_BOOT_MD0                ( BIT(0) )
370
371 /* bits definitions for register REG_AON_APB_BB_BG_CTRL */
372 #define BITS_BB_LDO_REFCTRL(_x_)        ( (_x_) << 12 & (BIT(12)|BIT(13)) )
373 #define BIT_BB_LDO_AUTO_PD_EN           ( BIT(11) )
374 #define BIT_BB_LDO_SLP_PD_EN            ( BIT(10) )
375 #define BIT_BB_LDO_FORCE_ON             ( BIT(9) )
376 #define BIT_BB_LDO_FORCE_PD             ( BIT(8) )
377 #define BIT_BB_BG_AUTO_PD_EN            ( BIT(3) )
378 #define BIT_BB_BG_SLP_PD_EN             ( BIT(2) )
379 #define BIT_BB_BG_FORCE_ON              ( BIT(1) )
380 #define BIT_BB_BG_FORCE_PD              ( BIT(0) )
381
382 /* bits definitions for register REG_AON_APB_IO_DLY_CTRL */
383 #define BITS_CLK_CCIR_DLY_SEL(_x_)      ( (_x_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
384 #define BITS_CLK_CP1DSP_DLY_SEL(_x_)    ( (_x_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
385 #define BITS_CLK_CP0DSP_DLY_SEL(_x_)    ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
386
387 /* bits definitions for register REG_AON_APB_CP_ARM_JTAG_CTRL */
388 #define BITS_CP_ARM_JTAG_PIN_SEL(_x_)   ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)) )
389
390 /* bits definitions for register REG_AON_APB_PLL_SOFT_CNT_DONE */
391 #define BIT_XTLBUF1_SOFT_CNT_DONE       ( BIT(9) )
392 #define BIT_XTLBUF0_SOFT_CNT_DONE       ( BIT(8) )
393 #define BIT_WIFIPLL2_SOFT_CNT_DONE      ( BIT(6) )
394 #define BIT_WIFIPLL1_SOFT_CNT_DONE      ( BIT(5) )
395 #define BIT_CPLL_SOFT_CNT_DONE          ( BIT(4) )
396 #define BIT_WPLL_SOFT_CNT_DONE          ( BIT(3) )
397 #define BIT_TDPLL_SOFT_CNT_DONE         ( BIT(2) )
398 #define BIT_DPLL_SOFT_CNT_DONE          ( BIT(1) )
399 #define BIT_MPLL_SOFT_CNT_DONE          ( BIT(0) )
400
401 /* bits definitions for register REG_AON_APB_PMU_RST_MONITOR */
402 #define BITS_PMU_RST_MONITOR(_x_)       ( (_x_) << 0 )
403
404 /* bits definitions for register REG_AON_APB_THM_RST_MONITOR */
405 #define BITS_THM_RST_MONITOR(_x_)       ( (_x_) << 0 )
406
407 /* bits definitions for register REG_AON_APB_AP_RST_MONITOR */
408 #define BITS_AP_RST_MONITOR(_x_)        ( (_x_) << 0 )
409
410 /* bits definitions for register REG_AON_APB_CA7_RST_MONITOR */
411 #define BITS_CA7_RST_MONITOR(_x_)       ( (_x_) << 0 )
412
413 /* bits definitions for register REG_AON_APB_BOND_OPT0 */
414 #define BITS_BOND_OPTION0(_x_)          ( (_x_) << 0 )
415
416 /* bits definitions for register REG_AON_APB_BOND_OPT1 */
417 #define BITS_BOND_OPTION1(_x_)          ( (_x_) << 0 )
418
419 /* vars definitions for controller REGS_AON_APB */
420
421 #endif //__REGS_AON_APB_H__