blob: 3a0ab35d9be743bf71124fac8ef4049c6829f2de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
/*
* Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/
#ifndef __ARCH_ARM_MACH_MX27_CRM_REGS_H__
#define __ARCH_ARM_MACH_MX27_CRM_REGS_H__
#include <mach/hardware.h>
#define SYSCTRL_BASE IO_ADDRESS(SYSCTRL_BASE_ADDR)
#define MXC_CCM_BASE ((char *)IO_ADDRESS(CCM_BASE_ADDR))
/* Register offsets */
#define CCM_CSCR (MXC_CCM_BASE + 0x0)
#define CCM_MPCTL0 (MXC_CCM_BASE + 0x4)
#define CCM_MPCTL1 (MXC_CCM_BASE + 0x8)
#define CCM_SPCTL0 (MXC_CCM_BASE + 0xC)
#define CCM_SPCTL1 (MXC_CCM_BASE + 0x10)
#define CCM_OSC26MCTL (MXC_CCM_BASE + 0x14)
#define CCM_PCDR0 (MXC_CCM_BASE + 0x18)
#define CCM_PCDR1 (MXC_CCM_BASE + 0x1c)
#define CCM_PCCR0 (MXC_CCM_BASE + 0x20)
#define CCM_PCCR1 (MXC_CCM_BASE + 0x24)
#define CCM_CCSR (MXC_CCM_BASE + 0x28)
#define CCM_PMCTL (MXC_CCM_BASE + 0x2c)
#define CCM_PMCOUNT (MXC_CCM_BASE + 0x30)
#define CCM_WKGDCTL (MXC_CCM_BASE + 0x34)
#define MXC_CCM_PMCR0 (SYSCTRL_BASE + 0x60)
#define MXC_CCM_DCVR0 (SYSCTRL_BASE + 0x64)
#define MXC_CCM_DCVR1 (SYSCTRL_BASE + 0x68)
#define MXC_CCM_DCVR2 (SYSCTRL_BASE + 0x72)
#define MXC_CCM_DCVR3 (SYSCTRL_BASE + 0x76)
#define MXC_CCM_PMCR0_DPTEN 0x00000001
#define MXC_CCM_DIE 0x00000002
#define MXC_CCM_DIM 0x0000000C
#define MXC_CCM_DCR 0x00000200
#define MXC_CCM_PMCR0_DRCE0 0x00000010
#define MXC_CCM_PMCR0_DRCE1 0x00000020
#define MXC_CCM_PMCR0_DRCE2 0x00000040
#define MXC_CCM_PMCR0_DRCE3 0x00000080
#define MXC_CCM_PMCR0_PTVAIM MXC_CCM_DIM
#define CCM_CSCR_USB_OFFSET 28
#define CCM_CSCR_USB_MASK (0x7 << 28)
#define CCM_CSCR_SD_OFFSET 24
#define CCM_CSCR_SD_MASK (0x3 << 24)
#define CCM_CSCR_SSI2 (1 << 23)
#define CCM_CSCR_SSI2_OFFSET 23
#define CCM_CSCR_SSI1 (1 << 22)
#define CCM_CSCR_SSI1_OFFSET 22
#define CCM_CSCR_VPU (1 << 21)
#define CCM_CSCR_VPU_OFFSET 21
#define CCM_CSCR_MSHC (1 << 20)
#define CCM_CSCR_SPLLRES (1 << 19)
#define CCM_CSCR_MPLLRES (1 << 18)
#define CCM_CSCR_SP (1 << 17)
#define CCM_CSCR_MCU (1 << 16)
/* CCM_CSCR_ARM_xxx just be avaliable on i.MX27 TO2*/
#define CCM_CSCR_ARM_SRC (1 << 15)
#define CCM_CSCR_ARM_OFFSET 12
#define CCM_CSCR_ARM_MASK (0x3 << 12)
/* CCM_CSCR_ARM_xxx just be avaliable on i.MX27 TO2*/
#define CCM_CSCR_PRESC_OFFSET 13
#define CCM_CSCR_PRESC_MASK (0x7 << 13)
#define CCM_CSCR_BCLK_OFFSET 9
#define CCM_CSCR_BCLK_MASK (0xf << 9)
#define CCM_CSCR_IPDIV_OFFSET 8
#define CCM_CSCR_IPDIV (1 << 8)
/* CCM_CSCR_AHB_xxx just be avaliable on i.MX27 TO2*/
#define CCM_CSCR_AHB_OFFSET 8
#define CCM_CSCR_AHB_MASK (0x3 << 8)
/* CCM_CSCR_AHB_xxx just be avaliable on i.MX27 TO2*/
#define CCM_CSCR_OSC26MDIV (1 << 4)
#define CCM_CSCR_OSC26M (1 << 3)
#define CCM_CSCR_FPM (1 << 2)
#define CCM_CSCR_SPEN (1 << 1)
#define CCM_CSCR_MPEN 1
#define CCM_MPCTL0_CPLM (1 << 31)
#define CCM_MPCTL0_PD_OFFSET 26
#define CCM_MPCTL0_PD_MASK (0xf << 26)
#define CCM_MPCTL0_MFD_OFFSET 16
#define CCM_MPCTL0_MFD_MASK (0x3ff << 16)
#define CCM_MPCTL0_MFI_OFFSET 10
#define CCM_MPCTL0_MFI_MASK (0xf << 10)
#define CCM_MPCTL0_MFN_OFFSET 0
#define CCM_MPCTL0_MFN_MASK 0x3ff
#define CCM_MPCTL1_LF (1 << 15)
#define CCM_MPCTL1_BRMO (1 << 6)
#define CCM_SPCTL0_CPLM (1 << 31)
#define CCM_SPCTL0_PD_OFFSET 26
#define CCM_SPCTL0_PD_MASK (0xf << 26)
#define CCM_SPCTL0_MFD_OFFSET 16
#define CCM_SPCTL0_MFD_MASK (0x3ff << 16)
#define CCM_SPCTL0_MFI_OFFSET 10
#define CCM_SPCTL0_MFI_MASK (0xf << 10)
#define CCM_SPCTL0_MFN_OFFSET 0
#define CCM_SPCTL0_MFN_MASK 0x3ff
#define CCM_SPCTL1_LF (1 << 15)
#define CCM_SPCTL1_BRMO (1 << 6)
#define CCM_OSC26MCTL_PEAK_OFFSET 16
#define CCM_OSC26MCTL_PEAK_MASK (0x3 << 16)
#define CCM_OSC26MCTL_AGC_OFFSET 8
#define CCM_OSC26MCTL_AGC_MASK (0x3f << 8)
#define CCM_OSC26MCTL_ANATEST_OFFSET 0
#define CCM_OSC26MCTL_ANATEST_MASK 0x3f
#define CCM_PCDR0_SSI2BAUDDIV_OFFSET 26
#define CCM_PCDR0_SSI2BAUDDIV_MASK (0x3f << 26)
#define CCM_PCDR0_CLKO_EN 25
#define CCM_PCDR0_CLKODIV_OFFSET 22
#define CCM_PCDR0_CLKODIV_MASK (0x7 << 22)
#define CCM_PCDR0_SSI1BAUDDIV_OFFSET 16
#define CCM_PCDR0_SSI1BAUDDIV_MASK (0x3f << 16)
/*The difinition for i.MX27 TO2*/
#define CCM_PCDR0_VPUDIV2_OFFSET 10
#define CCM_PCDR0_VPUDIV2_MASK (0x3f << 10)
#define CCM_PCDR0_NFCDIV2_OFFSET 6
#define CCM_PCDR0_NFCDIV2_MASK (0xf << 6)
#define CCM_PCDR0_MSHCDIV2_MASK 0x3f
/*The difinition for i.MX27 TO2*/
#define CCM_PCDR0_NFCDIV_OFFSET 12
#define CCM_PCDR0_NFCDIV_MASK (0xf << 12)
#define CCM_PCDR0_VPUDIV_OFFSET 8
#define CCM_PCDR0_VPUDIV_MASK (0xf << 8)
#define CCM_PCDR0_MSHCDIV_OFFSET 0
#define CCM_PCDR0_MSHCDIV_MASK 0x1f
#define CCM_PCDR1_PERDIV4_OFFSET 24
#define CCM_PCDR1_PERDIV4_MASK (0x3f << 24)
#define CCM_PCDR1_PERDIV3_OFFSET 16
#define CCM_PCDR1_PERDIV3_MASK (0x3f << 16)
#define CCM_PCDR1_PERDIV2_OFFSET 8
#define CCM_PCDR1_PERDIV2_MASK (0x3f << 8)
#define CCM_PCDR1_PERDIV1_OFFSET 0
#define CCM_PCDR1_PERDIV1_MASK 0x3f
#define CCM_PCCR0_CSPI1_OFFSET 31
#define CCM_PCCR0_CSPI1_MASK (1 << 31)
#define CCM_PCCR0_CSPI2_OFFSET 30
#define CCM_PCCR0_CSPI2_MASK (1 << 30)
#define CCM_PCCR0_CSPI3_OFFSET 29
#define CCM_PCCR0_CSPI3_MASK (1 << 29)
#define CCM_PCCR0_DMA_OFFSET 28
#define CCM_PCCR0_DMA_MASK (1 << 28)
#define CCM_PCCR0_EMMA_OFFSET 27
#define CCM_PCCR0_EMMA_MASK (1 << 27)
#define CCM_PCCR0_FEC_OFFSET 26
#define CCM_PCCR0_FEC_MASK (1 << 26)
#define CCM_PCCR0_GPIO_OFFSET 25
#define CCM_PCCR0_GPIO_MASK (1 << 25)
#define CCM_PCCR0_GPT1_OFFSET 24
#define CCM_PCCR0_GPT1_MASK (1 << 24)
#define CCM_PCCR0_GPT2_OFFSET 23
#define CCM_PCCR0_GPT2_MASK (1 << 23)
#define CCM_PCCR0_GPT3_OFFSET 22
#define CCM_PCCR0_GPT3_MASK (1 << 22)
#define CCM_PCCR0_GPT4_OFFSET 21
#define CCM_PCCR0_GPT4_MASK (1 << 21)
#define CCM_PCCR0_GPT5_OFFSET 20
#define CCM_PCCR0_GPT5_MASK (1 << 20)
#define CCM_PCCR0_GPT6_OFFSET 19
#define CCM_PCCR0_GPT6_MASK (1 << 19)
#define CCM_PCCR0_I2C1_OFFSET 18
#define CCM_PCCR0_I2C1_MASK (1 << 18)
#define CCM_PCCR0_I2C2_OFFSET 17
#define CCM_PCCR0_I2C2_MASK (1 << 17)
#define CCM_PCCR0_IIM_OFFSET 16
#define CCM_PCCR0_IIM_MASK (1 << 16)
#define CCM_PCCR0_KPP_OFFSET 15
#define CCM_PCCR0_KPP_MASK (1 << 15)
#define CCM_PCCR0_LCDC_OFFSET 14
#define CCM_PCCR0_LCDC_MASK (1 << 14)
#define CCM_PCCR0_MSHC_OFFSET 13
#define CCM_PCCR0_MSHC_MASK (1 << 13)
#define CCM_PCCR0_OWIRE_OFFSET 12
#define CCM_PCCR0_OWIRE_MASK (1 << 12)
#define CCM_PCCR0_PWM_OFFSET 11
#define CCM_PCCR0_PWM_MASK (1 << 11)
#define CCM_PCCR0_RTC_OFFSET 9
#define CCM_PCCR0_RTC_MASK (1 << 9)
#define CCM_PCCR0_RTIC_OFFSET 8
#define CCM_PCCR0_RTIC_MASK (1 << 8)
#define CCM_PCCR0_SAHARA_OFFSET 7
#define CCM_PCCR0_SAHARA_MASK (1 << 7)
#define CCM_PCCR0_SCC_OFFSET 6
#define CCM_PCCR0_SCC_MASK (1 << 6)
#define CCM_PCCR0_SDHC1_OFFSET 5
#define CCM_PCCR0_SDHC1_MASK (1 << 5)
#define CCM_PCCR0_SDHC2_OFFSET 4
#define CCM_PCCR0_SDHC2_MASK (1 << 4)
#define CCM_PCCR0_SDHC3_OFFSET 3
#define CCM_PCCR0_SDHC3_MASK (1 << 3)
#define CCM_PCCR0_SLCDC_OFFSET 2
#define CCM_PCCR0_SLCDC_MASK (1 << 2)
#define CCM_PCCR0_SSI1_IPG_OFFSET 1
#define CCM_PCCR0_SSI1_IPG_MASK (1 << 1)
#define CCM_PCCR0_SSI2_IPG_OFFSET 0
#define CCM_PCCR0_SSI2_IPG_MASK (1 << 0)
#define CCM_PCCR1_UART1_OFFSET 31
#define CCM_PCCR1_UART1_MASK (1 << 31)
#define CCM_PCCR1_UART2_OFFSET 30
#define CCM_PCCR1_UART2_MASK (1 << 30)
#define CCM_PCCR1_UART3_OFFSET 29
#define CCM_PCCR1_UART3_MASK (1 << 29)
#define CCM_PCCR1_UART4_OFFSET 28
#define CCM_PCCR1_UART4_MASK (1 << 28)
#define CCM_PCCR1_UART5_OFFSET 27
#define CCM_PCCR1_UART5_MASK (1 << 27)
#define CCM_PCCR1_UART6_OFFSET 26
#define CCM_PCCR1_UART6_MASK (1 << 26)
#define CCM_PCCR1_USBOTG_OFFSET 25
#define CCM_PCCR1_USBOTG_MASK (1 << 25)
#define CCM_PCCR1_WDT_OFFSET 24
#define CCM_PCCR1_WDT_MASK (1 << 24)
#define CCM_PCCR1_HCLK_ATA_OFFSET 23
#define CCM_PCCR1_HCLK_ATA_MASK (1 << 23)
#define CCM_PCCR1_HCLK_BROM_OFFSET 22
#define CCM_PCCR1_HCLK_BROM_MASK (1 << 22)
#define CCM_PCCR1_HCLK_CSI_OFFSET 21
#define CCM_PCCR1_HCLK_CSI_MASK (1 << 21)
#define CCM_PCCR1_HCLK_DMA_OFFSET 20
#define CCM_PCCR1_HCLK_DMA_MASK (1 << 20)
#define CCM_PCCR1_HCLK_EMI_OFFSET 19
#define CCM_PCCR1_HCLK_EMI_MASK (1 << 19)
#define CCM_PCCR1_HCLK_EMMA_OFFSET 18
#define CCM_PCCR1_HCLK_EMMA_MASK (1 << 18)
#define CCM_PCCR1_HCLK_FEC_OFFSET 17
#define CCM_PCCR1_HCLK_FEC_MASK (1 << 17)
#define CCM_PCCR1_HCLK_VPU_OFFSET 16
#define CCM_PCCR1_HCLK_VPU_MASK (1 << 16)
#define CCM_PCCR1_HCLK_LCDC_OFFSET 15
#define CCM_PCCR1_HCLK_LCDC_MASK (1 << 15)
#define CCM_PCCR1_HCLK_RTIC_OFFSET 14
#define CCM_PCCR1_HCLK_RTIC_MASK (1 << 14)
#define CCM_PCCR1_HCLK_SAHARA_OFFSET 13
#define CCM_PCCR1_HCLK_SAHARA_MASK (1 << 13)
#define CCM_PCCR1_HCLK_SLCDC_OFFSET 12
#define CCM_PCCR1_HCLK_SLCDC_MASK (1 << 12)
#define CCM_PCCR1_HCLK_USBOTG_OFFSET 11
#define CCM_PCCR1_HCLK_USBOTG_MASK (1 << 11)
#define CCM_PCCR1_PERCLK1_OFFSET 10
#define CCM_PCCR1_PERCLK1_MASK (1 << 10)
#define CCM_PCCR1_PERCLK2_OFFSET 9
#define CCM_PCCR1_PERCLK2_MASK (1 << 9)
#define CCM_PCCR1_PERCLK3_OFFSET 8
#define CCM_PCCR1_PERCLK3_MASK (1 << 8)
#define CCM_PCCR1_PERCLK4_OFFSET 7
#define CCM_PCCR1_PERCLK4_MASK (1 << 7)
#define CCM_PCCR1_VPU_BAUD_OFFSET 6
#define CCM_PCCR1_VPU_BAUD_MASK (1 << 6)
#define CCM_PCCR1_SSI1_BAUD_OFFSET 5
#define CCM_PCCR1_SSI1_BAUD_MASK (1 << 5)
#define CCM_PCCR1_SSI2_BAUD_OFFSET 4
#define CCM_PCCR1_SSI2_BAUD_MASK (1 << 4)
#define CCM_PCCR1_NFC_BAUD_OFFSET 3
#define CCM_PCCR1_NFC_BAUD_MASK (1 << 3)
#define CCM_PCCR1_MSHC_BAUD_OFFSET 2
#define CCM_PCCR1_MSHC_BAUD_MASK (1 << 2)
#define CCM_CCSR_32KSR (1 << 15)
#define CCM_CCSR_CLKMODE1 (1 << 9)
#define CCM_CCSR_CLKMODE0 (1 << 8)
#define CCM_CCSR_CLKOSEL_OFFSET 0
#define CCM_CCSR_CLKOSEL_MASK 0x1f
#define SYS_FMCR 0x14 /* Functional Muxing Control Reg */
#define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */
#endif /* __ARCH_ARM_MACH_MX27_CRM_REGS_H__ */
|