summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-mx35/crm_regs.h
blob: 7a2d1bbbf10c830892ef8b1b4cb58dc50c17435d (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
/*
 * Copyright 2004-2009 Freescale Semiconductor, Inc.
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */

#ifndef __CPU_ARM1136_MX35_CRM_REGS_H__
#define __CPU_ARM1136_MX35_CRM_REGS_H__

/* Register bit definitions */
#define MXC_CCM_CCMR_WFI                        (1 << 30)
#define MXC_CCM_CCMR_STBY_EXIT_SRC              (1 << 29)
#define MXC_CCM_CCMR_VSTBY                      (1 << 28)
#define MXC_CCM_CCMR_WBEN                       (1 << 27)
#define MXC_CCM_CCMR_VOL_RDY_CNT_OFFSET        20
#define MXC_CCM_CCMR_VOL_RDY_CNT_MASK          (0xF << 20)
#define MXC_CCM_CCMR_ROMW_OFFSET               18
#define MXC_CCM_CCMR_ROMW_MASK                 (0x3 << 18)
#define MXC_CCM_CCMR_RAMW_OFFSET               21
#define MXC_CCM_CCMR_RAMW_MASK                 (0x3 << 21)
#define MXC_CCM_CCMR_LPM_OFFSET                 14
#define MXC_CCM_CCMR_LPM_MASK                   (0x3 << 14)
#define MXC_CCM_CCMR_UPE                        (1 << 9)
#define MXC_CCM_CCMR_MPE                        (1 << 3)

#define MXC_CCM_PDR0_PER_SEL			(1 << 26)
#define MXC_CCM_PDR0_IPU_HND_BYP                (1 << 23)
#define MXC_CCM_PDR0_HSP_PODF_OFFSET            20
#define MXC_CCM_PDR0_HSP_PODF_MASK              (0x3 << 20)
#define MXC_CCM_PDR0_CON_MUX_DIV_OFFSET		16
#define MXC_CCM_PDR0_CON_MUX_DIV_MASK           (0xF << 16)
#define MXC_CCM_PDR0_CKIL_SEL			(1 << 15)
#define MXC_CCM_PDR0_PER_PODF_OFFSET            12
#define MXC_CCM_PDR0_PER_PODF_MASK              (0xF << 12)
#define MXC_CCM_PDR0_AUTO_MUX_DIV_OFFSET        9
#define MXC_CCM_PDR0_AUTO_MUX_DIV_MASK          (0x7 << 9)
#define MXC_CCM_PDR0_AUTO_CON	                0x1

#define MXC_CCM_PDR1_MSHC_PRDF_OFFSET           28
#define MXC_CCM_PDR1_MSHC_PRDF_MASK             (0x7 << 28)
#define MXC_CCM_PDR1_MSHC_PODF_OFFSET           22
#define MXC_CCM_PDR1_MSHC_PODF_MASK             (0x3F << 22)
#define MXC_CCM_PDR1_MSHC_M_U			(1 << 7)

#define MXC_CCM_PDR2_SSI2_PRDF_OFFSET           27
#define MXC_CCM_PDR2_SSI2_PRDF_MASK             (0x7 << 27)
#define MXC_CCM_PDR2_SSI1_PRDF_OFFSET           24
#define MXC_CCM_PDR2_SSI1_PRDF_MASK             (0x7 << 24)
#define MXC_CCM_PDR2_CSI_PRDF_OFFSET            19
#define MXC_CCM_PDR2_CSI_PRDF_MASK              (0x7 << 19)
#define MXC_CCM_PDR2_CSI_PODF_OFFSET            16
#define MXC_CCM_PDR2_CSI_PODF_MASK              (0x7 << 16)
#define MXC_CCM_PDR2_SSI2_PODF_OFFSET           8
#define MXC_CCM_PDR2_SSI2_PODF_MASK             (0x3F << 8)
#define MXC_CCM_PDR2_CSI_M_U			(1 << 7)
#define MXC_CCM_PDR2_SSI_M_U			(1 << 6)
#define MXC_CCM_PDR2_SSI1_PODF_OFFSET           0
#define MXC_CCM_PDR2_SSI1_PODF_MASK             (0x3F)

#define MXC_CCM_PDR3_SPDIF_PRDF_OFFSET          29
#define MXC_CCM_PDR3_SPDIF_PRDF_MASK            (0x7 << 29)
#define MXC_CCM_PDR3_SPDIF_PODF_OFFSET          23
#define MXC_CCM_PDR3_SPDIF_PODF_MASK            (0x3F << 23)
#define MXC_CCM_PDR3_SPDIF_M_U			(1 << 22)
#define MXC_CCM_PDR3_ESDHC3_PRDF_OFFSET         19
#define MXC_CCM_PDR3_ESDHC3_PRDF_MASK           (0x7 << 19)
#define MXC_CCM_PDR3_ESDHC3_PODF_OFFSET         16
#define MXC_CCM_PDR3_ESDHC3_PODF_MASK           (0x7 << 16)
#define MXC_CCM_PDR3_UART_M_U			(1 << 15)
#define MXC_CCM_PDR3_ESDHC2_PRDF_OFFSET         11
#define MXC_CCM_PDR3_ESDHC2_PRDF_MASK           (0x7 << 11)
#define MXC_CCM_PDR3_ESDHC2_PODF_OFFSET         8
#define MXC_CCM_PDR3_ESDHC2_PODF_MASK           (0x7 << 8)
#define MXC_CCM_PDR3_ESDHC_M_U			(1 << 6)
#define MXC_CCM_PDR3_ESDHC1_PRDF_OFFSET         3
#define MXC_CCM_PDR3_ESDHC1_PRDF_MASK           (0x7 << 3)
#define MXC_CCM_PDR3_ESDHC1_PODF_OFFSET         0
#define MXC_CCM_PDR3_ESDHC1_PODF_MASK           (0x7)

#define MXC_CCM_PDR4_NFC_PODF_OFFSET		28
#define MXC_CCM_PDR4_NFC_PODF_MASK		(0xF << 28)
#define MXC_CCM_PDR4_USB_PRDF_OFFSET		25
#define MXC_CCM_PDR4_USB_PRDF_MASK		(0x7 << 25)
#define MXC_CCM_PDR4_USB_PODF_OFFSET		22
#define MXC_CCM_PDR4_USB_PODF_MASK		(0x7 << 22)
#define MXC_CCM_PDR4_PER0_PRDF_OFFSET		19
#define MXC_CCM_PDR4_PER0_PRDF_MASK		(0x7 << 19)
#define MXC_CCM_PDR4_PER0_PODF_OFFSET		16
#define MXC_CCM_PDR4_PER0_PODF_MASK		(0x7 << 16)
#define MXC_CCM_PDR4_UART_PRDF_OFFSET		13
#define MXC_CCM_PDR4_UART_PRDF_MASK		(0x7 << 13)
#define MXC_CCM_PDR4_UART_PODF_OFFSET		10
#define MXC_CCM_PDR4_UART_PODF_MASK		(0x7 << 10)
#define MXC_CCM_PDR4_USB_M_U			(1 << 9)

/* Bit definitions for RCSR */
#define MXC_CCM_RCSR_BUS_WIDTH			(1 << 29)
#define MXC_CCM_RCSR_BUS_16BIT			(1 << 29)
#define MXC_CCM_RCSR_PAGE_SIZE			(3 << 27)
#define MXC_CCM_RCSR_PAGE_512			(0 << 27)
#define MXC_CCM_RCSR_PAGE_2K			(1 << 27)
#define MXC_CCM_RCSR_PAGE_4K1			(2 << 27)
#define MXC_CCM_RCSR_PAGE_4K2			(3 << 27)
#define MXC_CCM_RCSR_SOFT_RESET			(1 << 15)
#define MXC_CCM_RCSR_NF16B			(1 << 14)
#define MXC_CCM_RCSR_NFC_4K			(1 << 9)
#define MXC_CCM_RCSR_NFC_FMS			(1 << 8)

/* Bit definitions for both MCU, PERIPHERAL PLL control registers */
#define MXC_CCM_PCTL_BRM                        0x80000000
#define MXC_CCM_PCTL_PD_OFFSET                  26
#define MXC_CCM_PCTL_PD_MASK                    (0xF << 26)
#define MXC_CCM_PCTL_MFD_OFFSET                 16
#define MXC_CCM_PCTL_MFD_MASK                   (0x3FF << 16)
#define MXC_CCM_PCTL_MFI_OFFSET                 10
#define MXC_CCM_PCTL_MFI_MASK                   (0xF << 10)
#define MXC_CCM_PCTL_MFN_OFFSET                 0
#define MXC_CCM_PCTL_MFN_MASK                   0x3FF

/* Bit definitions for Audio clock mux register*/
#define MXC_CCM_ACMR_ESAI_CLK_SEL_OFFSET	12
#define MXC_CCM_ACMR_ESAI_CLK_SEL_MASK		(0xF << 12)
#define MXC_CCM_ACMR_SPDIF_CLK_SEL_OFFSET	8
#define MXC_CCM_ACMR_SPDIF_CLK_SEL_MASK		(0xF << 8)
#define MXC_CCM_ACMR_SSI1_CLK_SEL_OFFSET	4
#define MXC_CCM_ACMR_SSI1_CLK_SEL_MASK		(0xF << 4)
#define MXC_CCM_ACMR_SSI2_CLK_SEL_OFFSET	0
#define MXC_CCM_ACMR_SSI2_CLK_SEL_MASK		(0xF << 0)

/* Bit definitions for Clock gating Register*/
#define MXC_CCM_CGR0_ASRC_OFFSET		0
#define MXC_CCM_CGR0_ASRC_MASK			(0x3 << 0)
#define MXC_CCM_CGR0_ATA_OFFSET			2
#define MXC_CCM_CGR0_ATA_MASK			(0x3 << 2)
#define MXC_CCM_CGR0_CAN1_OFFSET		6
#define MXC_CCM_CGR0_CAN1_MASK			(0x3 << 6)
#define MXC_CCM_CGR0_CAN2_OFFSET		8
#define MXC_CCM_CGR0_CAN2_MASK			(0x3 << 8)
#define MXC_CCM_CGR0_CSPI1_OFFSET		10
#define MXC_CCM_CGR0_CSPI1_MASK			(0x3 << 10)
#define MXC_CCM_CGR0_CSPI2_OFFSET		12
#define MXC_CCM_CGR0_CSPI2_MASK			(0x3 << 12)
#define MXC_CCM_CGR0_ECT_OFFSET			14
#define MXC_CCM_CGR0_ECT_MASK			(0x3 << 14)
#define MXC_CCM_CGR0_EDIO_OFFSET		16
#define MXC_CCM_CGR0_EDIO_MASK			(0x3 << 16)
#define MXC_CCM_CGR0_EMI_OFFSET			18
#define MXC_CCM_CGR0_EMI_MASK			(0x3 << 18)
#define MXC_CCM_CGR0_EPIT1_OFFSET		20
#define MXC_CCM_CGR0_EPIT1_MASK			(0x3 << 20)
#define MXC_CCM_CGR0_EPIT2_OFFSET		22
#define MXC_CCM_CGR0_EPIT2_MASK			(0x3 << 22)
#define MXC_CCM_CGR0_ESAI_OFFSET		24
#define MXC_CCM_CGR0_ESAI_MASK			(0x3 << 24)
#define MXC_CCM_CGR0_ESDHC1_OFFSET		26
#define MXC_CCM_CGR0_ESDHC1_MASK		(0x3 << 26)
#define MXC_CCM_CGR0_ESDHC2_OFFSET		28
#define MXC_CCM_CGR0_ESDHC2_MASK		(0x3 << 28)
#define MXC_CCM_CGR0_ESDHC3_OFFSET		30
#define MXC_CCM_CGR0_ESDHC3_MASK		(0x3 << 30)

#define MXC_CCM_CGR1_FEC_OFFSET			0
#define MXC_CCM_CGR1_FEC_MASK			(0x3 << 0)
#define MXC_CCM_CGR1_GPIO1_OFFSET		2
#define MXC_CCM_CGR1_GPIO1_MASK			(0x3 << 2)
#define MXC_CCM_CGR1_GPIO2_OFFSET		4
#define MXC_CCM_CGR1_GPIO2_MASK			(0x3 << 4)
#define MXC_CCM_CGR1_GPIO3_OFFSET		6
#define MXC_CCM_CGR1_GPIO3_MASK			(0x3 << 6)
#define MXC_CCM_CGR1_GPT_OFFSET			8
#define MXC_CCM_CGR1_GPT_MASK			(0x3 << 8)
#define MXC_CCM_CGR1_I2C1_OFFSET		10
#define MXC_CCM_CGR1_I2C1_MASK			(0x3 << 10)
#define MXC_CCM_CGR1_I2C2_OFFSET		12
#define MXC_CCM_CGR1_I2C2_MASK			(0x3 << 12)
#define MXC_CCM_CGR1_I2C3_OFFSET		14
#define MXC_CCM_CGR1_I2C3_MASK			(0x3 << 14)
#define MXC_CCM_CGR1_IOMUXC_OFFSET		16
#define MXC_CCM_CGR1_IOMUXC_MASK		(0x3 << 16)
#define MXC_CCM_CGR1_IPU_OFFSET			18
#define MXC_CCM_CGR1_IPU_MASK			(0x3 << 18)
#define MXC_CCM_CGR1_KPP_OFFSET			20
#define MXC_CCM_CGR1_KPP_MASK			(0x3 << 20)
#define MXC_CCM_CGR1_MLB_OFFSET			22
#define MXC_CCM_CGR1_MLB_MASK			(0x3 << 22)
#define MXC_CCM_CGR1_MSHC_OFFSET		24
#define MXC_CCM_CGR1_MSHC_MASK			(0x3 << 24)
#define MXC_CCM_CGR1_OWIRE_OFFSET		26
#define MXC_CCM_CGR1_OWIRE_MASK			(0x3 << 26)
#define MXC_CCM_CGR1_PWM_OFFSET			28
#define MXC_CCM_CGR1_PWM_MASK			(0x3 << 28)
#define MXC_CCM_CGR1_RNGC_OFFSET		30
#define MXC_CCM_CGR1_RNGC_MASK			(0x3 << 30)

#define MXC_CCM_CGR2_RTC_OFFSET			0
#define MXC_CCM_CGR2_RTC_MASK			(0x3 << 0)
#define MXC_CCM_CGR2_RTIC_OFFSET		2
#define MXC_CCM_CGR2_RTIC_MASK			(0x3 << 2)
#define MXC_CCM_CGR2_SCC_OFFSET			4
#define MXC_CCM_CGR2_SCC_MASK			(0x3 << 4)
#define MXC_CCM_CGR2_SDMA_OFFSET		6
#define MXC_CCM_CGR2_SDMA_MASK			(0x3 << 6)
#define MXC_CCM_CGR2_SPBA_OFFSET		8
#define MXC_CCM_CGR2_SPBA_MASK			(0x3 << 8)
#define MXC_CCM_CGR2_SPDIF_OFFSET		10
#define MXC_CCM_CGR2_SPDIF_MASK			(0x3 << 10)
#define MXC_CCM_CGR2_SSI1_OFFSET		12
#define MXC_CCM_CGR2_SSI1_MASK			(0x3 << 12)
#define MXC_CCM_CGR2_SSI2_OFFSET		14
#define MXC_CCM_CGR2_SSI2_MASK			(0x3 << 14)
#define MXC_CCM_CGR2_UART1_OFFSET		16
#define MXC_CCM_CGR2_UART1_MASK			(0x3 << 16)
#define MXC_CCM_CGR2_UART2_OFFSET		18
#define MXC_CCM_CGR2_UART2_MASK			(0x3 << 18)
#define MXC_CCM_CGR2_UART3_OFFSET		20
#define MXC_CCM_CGR2_UART3_MASK			(0x3 << 20)
#define MXC_CCM_CGR2_USBOTG_OFFSET		22
#define MXC_CCM_CGR2_USBOTG_MASK		(0x3 << 22)
#define MXC_CCM_CGR2_WDOG_OFFSET		24
#define MXC_CCM_CGR2_WDOG_MASK			(0x3 << 24)
#define MXC_CCM_CGR2_MAX_OFFSET			26
#define MXC_CCM_CGR2_MAX_MASK			(0x3 << 26)
#define MXC_CCM_CGR2_MAX_ENABLE			(0x2 << 26)
#define MXC_CCM_CGR2_AUDMUX_OFFSET		30
#define MXC_CCM_CGR2_AUDMUX_MASK		(0x3 << 30)

#define MXC_CCM_CGR3_CSI_OFFSET			0
#define MXC_CCM_CGR3_CSI_MASK			(0x3 << 0)
#define MXC_CCM_CGR3_IIM_OFFSET			2
#define MXC_CCM_CGR3_IIM_MASK			(0x3 << 2)
#define MXC_CCM_CGR3_GPU2D_OFFSET		4
#define MXC_CCM_CGR3_GPU2D_MASK			(0x3 << 4)

#define MXC_CCM_COSR_CLKOSEL_MASK		0x1F
#define MXC_CCM_COSR_CLKOSEL_OFFSET		0
#define MXC_CCM_COSR_CLKOEN			(1 << 5)
#define MXC_CCM_COSR_CLKOUTDIV_1		(1 << 6)
#define MXC_CCM_COSR_CLKOUT_PREDIV_MASK		(0x7 << 10)
#define MXC_CCM_COSR_CLKOUT_PREDIV_OFFSET	10
#define MXC_CCM_COSR_CLKOUT_PRODIV_MASK		(0x7 << 13)
#define MXC_CCM_COSR_CLKOUT_PRODIV_OFFSET	13
#define MXC_CCM_COSR_SSI1_RX_SRC_SEL_MASK	(0x3 << 16)
#define MXC_CCM_COSR_SSI1_RX_SRC_SEL_OFFSET	16
#define MXC_CCM_COSR_SSI1_TX_SRC_SEL_MASK	(0x3 << 18)
#define MXC_CCM_COSR_SSI1_TX_SRC_SEL_OFFSET	18
#define MXC_CCM_COSR_SSI2_RX_SRC_SEL_MASK	(0x3 << 20)
#define MXC_CCM_COSR_SSI2_RX_SRC_SEL_OFFSET	20
#define MXC_CCM_COSR_SSI2_TX_SRC_SEL_MASK	(0x3 << 22)
#define MXC_CCM_COSR_SSI2_TX_SRC_SEL_OFFSET	22
#define MXC_CCM_COSR_ASRC_AUDIO_EN		(1 << 24)
#define MXC_CCM_COSR_ASRC_AUDIO_PODF_MASK	(0x3F << 26)
#define MXC_CCM_COSR_ASRC_AUDIO_PODF_OFFSET	26

#endif