1 /*
2  * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #ifndef __ASM_ARCH_MX6_IMX_REGS_H__
8 #define __ASM_ARCH_MX6_IMX_REGS_H__
9 
10 #define ARCH_MXC
11 
12 #ifdef CONFIG_MX6UL
13 #define CONFIG_SYS_CACHELINE_SIZE	64
14 #else
15 #define CONFIG_SYS_CACHELINE_SIZE	32
16 #endif
17 
18 #define ROMCP_ARB_BASE_ADDR             0x00000000
19 #define ROMCP_ARB_END_ADDR              0x000FFFFF
20 
21 #ifdef CONFIG_MX6SL
22 #define GPU_2D_ARB_BASE_ADDR            0x02200000
23 #define GPU_2D_ARB_END_ADDR             0x02203FFF
24 #define OPENVG_ARB_BASE_ADDR            0x02204000
25 #define OPENVG_ARB_END_ADDR             0x02207FFF
26 #elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
27 #define CAAM_ARB_BASE_ADDR              0x00100000
28 #define CAAM_ARB_END_ADDR               0x00107FFF
29 #define GPU_ARB_BASE_ADDR               0x01800000
30 #define GPU_ARB_END_ADDR                0x01803FFF
31 #define APBH_DMA_ARB_BASE_ADDR          0x01804000
32 #define APBH_DMA_ARB_END_ADDR           0x0180BFFF
33 #define M4_BOOTROM_BASE_ADDR			0x007F8000
34 
35 #else
36 #define CAAM_ARB_BASE_ADDR              0x00100000
37 #define CAAM_ARB_END_ADDR               0x00103FFF
38 #define APBH_DMA_ARB_BASE_ADDR          0x00110000
39 #define APBH_DMA_ARB_END_ADDR           0x00117FFF
40 #define HDMI_ARB_BASE_ADDR              0x00120000
41 #define HDMI_ARB_END_ADDR               0x00128FFF
42 #define GPU_3D_ARB_BASE_ADDR            0x00130000
43 #define GPU_3D_ARB_END_ADDR             0x00133FFF
44 #define GPU_2D_ARB_BASE_ADDR            0x00134000
45 #define GPU_2D_ARB_END_ADDR             0x00137FFF
46 #define DTCP_ARB_BASE_ADDR              0x00138000
47 #define DTCP_ARB_END_ADDR               0x0013BFFF
48 #endif	/* CONFIG_MX6SL */
49 
50 #define MXS_APBH_BASE			APBH_DMA_ARB_BASE_ADDR
51 #define MXS_GPMI_BASE			(APBH_DMA_ARB_BASE_ADDR + 0x02000)
52 #define MXS_BCH_BASE			(APBH_DMA_ARB_BASE_ADDR + 0x04000)
53 
54 /* GPV - PL301 configuration ports */
55 #if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
56 #define GPV2_BASE_ADDR                  0x00D00000
57 #else
58 #define GPV2_BASE_ADDR			0x00200000
59 #endif
60 
61 #if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
62 #define GPV3_BASE_ADDR			0x00E00000
63 #define GPV4_BASE_ADDR			0x00F00000
64 #define GPV5_BASE_ADDR			0x01000000
65 #define GPV6_BASE_ADDR			0x01100000
66 #define PCIE_ARB_BASE_ADDR              0x08000000
67 #define PCIE_ARB_END_ADDR               0x08FFFFFF
68 
69 #else
70 #define GPV3_BASE_ADDR			0x00300000
71 #define GPV4_BASE_ADDR			0x00800000
72 #define PCIE_ARB_BASE_ADDR              0x01000000
73 #define PCIE_ARB_END_ADDR               0x01FFFFFF
74 #endif
75 
76 #define IRAM_BASE_ADDR			0x00900000
77 #define SCU_BASE_ADDR                   0x00A00000
78 #define IC_INTERFACES_BASE_ADDR         0x00A00100
79 #define GLOBAL_TIMER_BASE_ADDR          0x00A00200
80 #define PRIVATE_TIMERS_WD_BASE_ADDR     0x00A00600
81 #define IC_DISTRIBUTOR_BASE_ADDR        0x00A01000
82 #define L2_PL310_BASE			0x00A02000
83 #define GPV0_BASE_ADDR                  0x00B00000
84 #define GPV1_BASE_ADDR                  0x00C00000
85 
86 #define AIPS1_ARB_BASE_ADDR             0x02000000
87 #define AIPS1_ARB_END_ADDR              0x020FFFFF
88 #define AIPS2_ARB_BASE_ADDR             0x02100000
89 #define AIPS2_ARB_END_ADDR              0x021FFFFF
90 /* AIPS3 only on i.MX6SX */
91 #define AIPS3_ARB_BASE_ADDR             0x02200000
92 #define AIPS3_ARB_END_ADDR              0x022FFFFF
93 #ifdef CONFIG_MX6SX
94 #define WEIM_ARB_BASE_ADDR              0x50000000
95 #define WEIM_ARB_END_ADDR               0x57FFFFFF
96 #define QSPI0_AMBA_BASE                0x60000000
97 #define QSPI0_AMBA_END                 0x6FFFFFFF
98 #define QSPI1_AMBA_BASE                0x70000000
99 #define QSPI1_AMBA_END                 0x7FFFFFFF
100 #elif defined(CONFIG_MX6UL)
101 #define WEIM_ARB_BASE_ADDR              0x50000000
102 #define WEIM_ARB_END_ADDR               0x57FFFFFF
103 #define QSPI0_AMBA_BASE                 0x60000000
104 #define QSPI0_AMBA_END                  0x6FFFFFFF
105 #else
106 #define SATA_ARB_BASE_ADDR              0x02200000
107 #define SATA_ARB_END_ADDR               0x02203FFF
108 #define OPENVG_ARB_BASE_ADDR            0x02204000
109 #define OPENVG_ARB_END_ADDR             0x02207FFF
110 #define HSI_ARB_BASE_ADDR               0x02208000
111 #define HSI_ARB_END_ADDR                0x0220BFFF
112 #define IPU1_ARB_BASE_ADDR              0x02400000
113 #define IPU1_ARB_END_ADDR               0x027FFFFF
114 #define IPU2_ARB_BASE_ADDR              0x02800000
115 #define IPU2_ARB_END_ADDR               0x02BFFFFF
116 #define WEIM_ARB_BASE_ADDR              0x08000000
117 #define WEIM_ARB_END_ADDR               0x0FFFFFFF
118 #endif
119 
120 #if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
121 #define MMDC0_ARB_BASE_ADDR             0x80000000
122 #define MMDC0_ARB_END_ADDR              0xFFFFFFFF
123 #define MMDC1_ARB_BASE_ADDR             0xC0000000
124 #define MMDC1_ARB_END_ADDR              0xFFFFFFFF
125 #else
126 #define MMDC0_ARB_BASE_ADDR             0x10000000
127 #define MMDC0_ARB_END_ADDR              0x7FFFFFFF
128 #define MMDC1_ARB_BASE_ADDR             0x80000000
129 #define MMDC1_ARB_END_ADDR              0xFFFFFFFF
130 #endif
131 
132 #ifndef CONFIG_MX6SX
133 #define IPU_SOC_BASE_ADDR		IPU1_ARB_BASE_ADDR
134 #define IPU_SOC_OFFSET			0x00200000
135 #endif
136 
137 /* Defines for Blocks connected via AIPS (SkyBlue) */
138 #define ATZ1_BASE_ADDR              AIPS1_ARB_BASE_ADDR
139 #define ATZ2_BASE_ADDR              AIPS2_ARB_BASE_ADDR
140 #define AIPS1_BASE_ADDR             AIPS1_ON_BASE_ADDR
141 #define AIPS2_BASE_ADDR             AIPS2_ON_BASE_ADDR
142 
143 #define SPDIF_BASE_ADDR             (ATZ1_BASE_ADDR + 0x04000)
144 #define ECSPI1_BASE_ADDR            (ATZ1_BASE_ADDR + 0x08000)
145 #define ECSPI2_BASE_ADDR            (ATZ1_BASE_ADDR + 0x0C000)
146 #define ECSPI3_BASE_ADDR            (ATZ1_BASE_ADDR + 0x10000)
147 #define ECSPI4_BASE_ADDR            (ATZ1_BASE_ADDR + 0x14000)
148 #ifdef CONFIG_MX6SL
149 #define UART5_IPS_BASE_ADDR         (ATZ1_BASE_ADDR + 0x18000)
150 #define UART1_IPS_BASE_ADDR         (ATZ1_BASE_ADDR + 0x20000)
151 #define UART2_IPS_BASE_ADDR         (ATZ1_BASE_ADDR + 0x24000)
152 #define SSI1_IPS_BASE_ADDR          (ATZ1_BASE_ADDR + 0x28000)
153 #define SSI2_IPS_BASE_ADDR          (ATZ1_BASE_ADDR + 0x2C000)
154 #define SSI3_IPS_BASE_ADDR          (ATZ1_BASE_ADDR + 0x30000)
155 #define UART3_IPS_BASE_ADDR         (ATZ1_BASE_ADDR + 0x34000)
156 #define UART4_IPS_BASE_ADDR         (ATZ1_BASE_ADDR + 0x38000)
157 #else
158 #ifndef CONFIG_MX6SX
159 #define ECSPI5_BASE_ADDR            (ATZ1_BASE_ADDR + 0x18000)
160 #endif
161 #define UART1_BASE                  (ATZ1_BASE_ADDR + 0x20000)
162 #define ESAI1_BASE_ADDR             (ATZ1_BASE_ADDR + 0x24000)
163 #define SSI1_BASE_ADDR              (ATZ1_BASE_ADDR + 0x28000)
164 #define SSI2_BASE_ADDR              (ATZ1_BASE_ADDR + 0x2C000)
165 #define SSI3_BASE_ADDR              (ATZ1_BASE_ADDR + 0x30000)
166 #define ASRC_BASE_ADDR              (ATZ1_BASE_ADDR + 0x34000)
167 #endif
168 
169 #ifndef CONFIG_MX6SX
170 #define SPBA_BASE_ADDR              (ATZ1_BASE_ADDR + 0x3C000)
171 #define VPU_BASE_ADDR               (ATZ1_BASE_ADDR + 0x40000)
172 #endif
173 #define AIPS1_ON_BASE_ADDR          (ATZ1_BASE_ADDR + 0x7C000)
174 
175 #define AIPS1_OFF_BASE_ADDR         (ATZ1_BASE_ADDR + 0x80000)
176 #define PWM1_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0x0000)
177 #define PWM2_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0x4000)
178 #define PWM3_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0x8000)
179 #define PWM4_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0xC000)
180 #define CAN1_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0x10000)
181 #define CAN2_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0x14000)
182 #define GPT1_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0x18000)
183 #define GPIO1_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x1C000)
184 #define GPIO2_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x20000)
185 #define GPIO3_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x24000)
186 #define GPIO4_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x28000)
187 #define GPIO5_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x2C000)
188 #define GPIO6_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x30000)
189 #define GPIO7_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x34000)
190 #define KPP_BASE_ADDR               (AIPS1_OFF_BASE_ADDR + 0x38000)
191 #define WDOG1_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x3C000)
192 #define WDOG2_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x40000)
193 #define ANATOP_BASE_ADDR            (AIPS1_OFF_BASE_ADDR + 0x48000)
194 #define USB_PHY0_BASE_ADDR          (AIPS1_OFF_BASE_ADDR + 0x49000)
195 #define USB_PHY1_BASE_ADDR          (AIPS1_OFF_BASE_ADDR + 0x4a000)
196 #define CCM_BASE_ADDR               (AIPS1_OFF_BASE_ADDR + 0x44000)
197 #define SNVS_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0x4C000)
198 #define EPIT1_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x50000)
199 #define EPIT2_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x54000)
200 #define SRC_BASE_ADDR               (AIPS1_OFF_BASE_ADDR + 0x58000)
201 #define GPC_BASE_ADDR               (AIPS1_OFF_BASE_ADDR + 0x5C000)
202 #define IOMUXC_BASE_ADDR            (AIPS1_OFF_BASE_ADDR + 0x60000)
203 #ifdef CONFIG_MX6SL
204 #define CSI_BASE_ADDR               (AIPS1_OFF_BASE_ADDR + 0x64000)
205 #define SIPIX_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x68000)
206 #define SDMA_PORT_HOST_BASE_ADDR    (AIPS1_OFF_BASE_ADDR + 0x6C000)
207 #elif CONFIG_MX6SX
208 #define CANFD1_BASE_ADDR            (AIPS1_OFF_BASE_ADDR + 0x68000)
209 #define SDMA_BASE_ADDR              (AIPS1_OFF_BASE_ADDR + 0x6C000)
210 #define CANFD2_BASE_ADDR            (AIPS1_OFF_BASE_ADDR + 0x70000)
211 #define SEMAPHORE1_BASE_ADDR        (AIPS1_OFF_BASE_ADDR + 0x74000)
212 #define SEMAPHORE2_BASE_ADDR        (AIPS1_OFF_BASE_ADDR + 0x78000)
213 #define RDC_BASE_ADDR               (AIPS1_OFF_BASE_ADDR + 0x7C000)
214 #else
215 #define DCIC1_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x64000)
216 #define DCIC2_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x68000)
217 #define DMA_REQ_PORT_HOST_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x6C000)
218 #endif
219 
220 #define AIPS2_ON_BASE_ADDR          (ATZ2_BASE_ADDR + 0x7C000)
221 #define AIPS2_OFF_BASE_ADDR         (ATZ2_BASE_ADDR + 0x80000)
222 #define CAAM_BASE_ADDR              (ATZ2_BASE_ADDR)
223 #define ARM_BASE_ADDR		    (ATZ2_BASE_ADDR + 0x40000)
224 
225 #define CONFIG_SYS_FSL_SEC_ADDR     CAAM_BASE_ADDR
226 #define CONFIG_SYS_FSL_JR0_ADDR     (CAAM_BASE_ADDR + 0x1000)
227 
228 #define USB_PL301_BASE_ADDR         (AIPS2_OFF_BASE_ADDR + 0x0000)
229 #define USB_BASE_ADDR               (AIPS2_OFF_BASE_ADDR + 0x4000)
230 
231 #define ENET_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x8000)
232 #ifdef CONFIG_MX6SL
233 #define MSHC_IPS_BASE_ADDR          (AIPS2_OFF_BASE_ADDR + 0xC000)
234 #else
235 #define MLB_BASE_ADDR               (AIPS2_OFF_BASE_ADDR + 0xC000)
236 #endif
237 
238 #define USDHC1_BASE_ADDR            (AIPS2_OFF_BASE_ADDR + 0x10000)
239 #define USDHC2_BASE_ADDR            (AIPS2_OFF_BASE_ADDR + 0x14000)
240 #define USDHC3_BASE_ADDR            (AIPS2_OFF_BASE_ADDR + 0x18000)
241 #define USDHC4_BASE_ADDR            (AIPS2_OFF_BASE_ADDR + 0x1C000)
242 #define I2C1_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x20000)
243 #define I2C2_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x24000)
244 #define I2C3_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x28000)
245 #define ROMCP_BASE_ADDR             (AIPS2_OFF_BASE_ADDR + 0x2C000)
246 #define MMDC_P0_BASE_ADDR           (AIPS2_OFF_BASE_ADDR + 0x30000)
247 /* i.MX6SL */
248 #define RNGB_IPS_BASE_ADDR          (AIPS2_OFF_BASE_ADDR + 0x34000)
249 #ifdef CONFIG_MX6UL
250 #define ENET2_BASE_ADDR             (AIPS1_OFF_BASE_ADDR + 0x34000)
251 #else
252 /* i.MX6SX */
253 #define ENET2_BASE_ADDR             (AIPS2_OFF_BASE_ADDR + 0x34000)
254 #endif
255 /* i.MX6DQ/SDL */
256 #define MMDC_P1_BASE_ADDR           (AIPS2_OFF_BASE_ADDR + 0x34000)
257 
258 #define WEIM_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x38000)
259 #define OCOTP_BASE_ADDR             (AIPS2_OFF_BASE_ADDR + 0x3C000)
260 #define CSU_BASE_ADDR               (AIPS2_OFF_BASE_ADDR + 0x40000)
261 #define IP2APB_PERFMON1_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x44000)
262 #define IP2APB_PERFMON2_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x48000)
263 #ifdef CONFIG_MX6SX
264 #define DEBUG_MONITOR_BASE_ADDR     (AIPS2_OFF_BASE_ADDR + 0x4C000)
265 #else
266 #define IP2APB_PERFMON3_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x4C000)
267 #endif
268 #define IP2APB_TZASC1_BASE_ADDR     (AIPS2_OFF_BASE_ADDR + 0x50000)
269 #ifdef CONFIG_MX6UL
270 #define QSPI0_BASE_ADDR             (AIPS2_OFF_BASE_ADDR + 0x60000)
271 #elif defined(CONFIG_MX6SX)
272 #define SAI1_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x54000)
273 #define AUDMUX_BASE_ADDR            (AIPS2_OFF_BASE_ADDR + 0x58000)
274 #define SAI2_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x5C000)
275 #define QSPI0_BASE_ADDR             (AIPS2_OFF_BASE_ADDR + 0x60000)
276 #define QSPI1_BASE_ADDR             (AIPS2_OFF_BASE_ADDR + 0x64000)
277 #else
278 #define IP2APB_TZASC2_BASE_ADDR     (AIPS2_OFF_BASE_ADDR + 0x54000)
279 #define MIPI_CSI2_BASE_ADDR         (AIPS2_OFF_BASE_ADDR + 0x5C000)
280 #define MIPI_DSI_BASE_ADDR          (AIPS2_OFF_BASE_ADDR + 0x60000)
281 #define VDOA_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x64000)
282 #endif
283 #define MX6UL_WDOG3_BASE_ADDR       (AIPS2_OFF_BASE_ADDR + 0x64000)
284 #define UART2_BASE                  (AIPS2_OFF_BASE_ADDR + 0x68000)
285 #define UART3_BASE                  (AIPS2_OFF_BASE_ADDR + 0x6C000)
286 #define UART4_BASE                  (AIPS2_OFF_BASE_ADDR + 0x70000)
287 #define UART5_BASE                  (AIPS2_OFF_BASE_ADDR + 0x74000)
288 #define I2C4_BASE_ADDR              (AIPS2_OFF_BASE_ADDR + 0x78000)
289 #define IP2APB_USBPHY1_BASE_ADDR    (AIPS2_OFF_BASE_ADDR + 0x78000)
290 #define IP2APB_USBPHY2_BASE_ADDR    (AIPS2_OFF_BASE_ADDR + 0x7C000)
291 
292 #ifdef CONFIG_MX6SX
293 #define GIS_BASE_ADDR               (AIPS3_ARB_BASE_ADDR + 0x04000)
294 #define DCIC1_BASE_ADDR             (AIPS3_ARB_BASE_ADDR + 0x0C000)
295 #define DCIC2_BASE_ADDR             (AIPS3_ARB_BASE_ADDR + 0x10000)
296 #define CSI1_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0x14000)
297 #define PXP_BASE_ADDR               (AIPS3_ARB_BASE_ADDR + 0x18000)
298 #define CSI2_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0x1C000)
299 #define LCDIF1_BASE_ADDR            (AIPS3_ARB_BASE_ADDR + 0x20000)
300 #define LCDIF2_BASE_ADDR            (AIPS3_ARB_BASE_ADDR + 0x24000)
301 #define VADC_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0x28000)
302 #define VDEC_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0x2C000)
303 #define SPBA_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0x3C000)
304 #define AIPS3_CONFIG_BASE_ADDR      (AIPS3_ARB_BASE_ADDR + 0x7C000)
305 #define ADC1_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0x80000)
306 #define ADC2_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0x84000)
307 #define ECSPI5_BASE_ADDR            (AIPS3_ARB_BASE_ADDR + 0x8C000)
308 #define HS_BASE_ADDR                (AIPS3_ARB_BASE_ADDR + 0x90000)
309 #define MU_MCU_BASE_ADDR            (AIPS3_ARB_BASE_ADDR + 0x94000)
310 #define CANFD_BASE_ADDR             (AIPS3_ARB_BASE_ADDR + 0x98000)
311 #define MU_DSP_BASE_ADDR            (AIPS3_ARB_BASE_ADDR + 0x9C000)
312 #define UART6_BASE_ADDR             (AIPS3_ARB_BASE_ADDR + 0xA0000)
313 #define PWM5_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0xA4000)
314 #define PWM6_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0xA8000)
315 #define PWM7_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0xAC000)
316 #define PWM8_BASE_ADDR              (AIPS3_ARB_BASE_ADDR + 0xB0000)
317 #endif
318 #define MX6SX_WDOG3_BASE_ADDR       (AIPS3_ARB_BASE_ADDR + 0x88000)
319 
320 /* only for i.MX6SX/UL */
321 #define WDOG3_BASE_ADDR (is_cpu_type(MXC_CPU_MX6UL) ?	\
322 			 MX6UL_WDOG3_BASE_ADDR :  MX6SX_WDOG3_BASE_ADDR)
323 
324 #define CHIP_REV_1_0                 0x10
325 #define CHIP_REV_1_2                 0x12
326 #define CHIP_REV_1_5                 0x15
327 #define CHIP_REV_2_0                 0x20
328 #if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
329 #define IRAM_SIZE                    0x00040000
330 #else
331 #define IRAM_SIZE                    0x00020000
332 #endif
333 #define FEC_QUIRK_ENET_MAC
334 
335 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
336 #include <asm/types.h>
337 
338 extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
339 
340 #define SRC_SCR_CORE_1_RESET_OFFSET     14
341 #define SRC_SCR_CORE_1_RESET_MASK       (1<<SRC_SCR_CORE_1_RESET_OFFSET)
342 #define SRC_SCR_CORE_2_RESET_OFFSET     15
343 #define SRC_SCR_CORE_2_RESET_MASK       (1<<SRC_SCR_CORE_2_RESET_OFFSET)
344 #define SRC_SCR_CORE_3_RESET_OFFSET     16
345 #define SRC_SCR_CORE_3_RESET_MASK       (1<<SRC_SCR_CORE_3_RESET_OFFSET)
346 #define SRC_SCR_CORE_1_ENABLE_OFFSET    22
347 #define SRC_SCR_CORE_1_ENABLE_MASK      (1<<SRC_SCR_CORE_1_ENABLE_OFFSET)
348 #define SRC_SCR_CORE_2_ENABLE_OFFSET    23
349 #define SRC_SCR_CORE_2_ENABLE_MASK      (1<<SRC_SCR_CORE_2_ENABLE_OFFSET)
350 #define SRC_SCR_CORE_3_ENABLE_OFFSET    24
351 #define SRC_SCR_CORE_3_ENABLE_MASK      (1<<SRC_SCR_CORE_3_ENABLE_OFFSET)
352 
353 /* WEIM registers */
354 struct weim {
355 	u32 cs0gcr1;
356 	u32 cs0gcr2;
357 	u32 cs0rcr1;
358 	u32 cs0rcr2;
359 	u32 cs0wcr1;
360 	u32 cs0wcr2;
361 
362 	u32 cs1gcr1;
363 	u32 cs1gcr2;
364 	u32 cs1rcr1;
365 	u32 cs1rcr2;
366 	u32 cs1wcr1;
367 	u32 cs1wcr2;
368 
369 	u32 cs2gcr1;
370 	u32 cs2gcr2;
371 	u32 cs2rcr1;
372 	u32 cs2rcr2;
373 	u32 cs2wcr1;
374 	u32 cs2wcr2;
375 
376 	u32 cs3gcr1;
377 	u32 cs3gcr2;
378 	u32 cs3rcr1;
379 	u32 cs3rcr2;
380 	u32 cs3wcr1;
381 	u32 cs3wcr2;
382 
383 	u32 unused[12];
384 
385 	u32 wcr;
386 	u32 wiar;
387 	u32 ear;
388 };
389 
390 /* System Reset Controller (SRC) */
391 struct src {
392 	u32	scr;
393 	u32	sbmr1;
394 	u32	srsr;
395 	u32	reserved1[2];
396 	u32	sisr;
397 	u32	simr;
398 	u32     sbmr2;
399 	u32     gpr1;
400 	u32     gpr2;
401 	u32     gpr3;
402 	u32     gpr4;
403 	u32     gpr5;
404 	u32     gpr6;
405 	u32     gpr7;
406 	u32     gpr8;
407 	u32     gpr9;
408 	u32     gpr10;
409 };
410 
411 /* GPR1 bitfields */
412 #define IOMUXC_GPR1_ENET_CLK_SEL_OFFSET		21
413 #define IOMUXC_GPR1_ENET_CLK_SEL_MASK		(1 << IOMUXC_GPR1_ENET_CLK_SEL_OFFSET)
414 #define IOMUXC_GPR1_USB_OTG_ID_OFFSET		13
415 #define IOMUXC_GPR1_USB_OTG_ID_SEL_MASK		(1 << IOMUXC_GPR1_USB_OTG_ID_OFFSET)
416 
417 /* GPR3 bitfields */
418 #define IOMUXC_GPR3_GPU_DBG_OFFSET		29
419 #define IOMUXC_GPR3_GPU_DBG_MASK		(3<<IOMUXC_GPR3_GPU_DBG_OFFSET)
420 #define IOMUXC_GPR3_BCH_WR_CACHE_CTL_OFFSET	28
421 #define IOMUXC_GPR3_BCH_WR_CACHE_CTL_MASK	(1<<IOMUXC_GPR3_BCH_WR_CACHE_CTL_OFFSET)
422 #define IOMUXC_GPR3_BCH_RD_CACHE_CTL_OFFSET	27
423 #define IOMUXC_GPR3_BCH_RD_CACHE_CTL_MASK	(1<<IOMUXC_GPR3_BCH_RD_CACHE_CTL_OFFSET)
424 #define IOMUXC_GPR3_uSDHCx_WR_CACHE_CTL_OFFSET	26
425 #define IOMUXC_GPR3_uSDHCx_WR_CACHE_CTL_MASK	(1<<IOMUXC_GPR3_uSDHCx_WR_CACHE_CTL_OFFSET)
426 #define IOMUXC_GPR3_uSDHCx_RD_CACHE_CTL_OFFSET	25
427 #define IOMUXC_GPR3_uSDHCx_RD_CACHE_CTL_MASK	(1<<IOMUXC_GPR3_uSDHCx_RD_CACHE_CTL_OFFSET)
428 #define IOMUXC_GPR3_OCRAM_CTL_OFFSET		21
429 #define IOMUXC_GPR3_OCRAM_CTL_MASK		(0xf<<IOMUXC_GPR3_OCRAM_CTL_OFFSET)
430 #define IOMUXC_GPR3_OCRAM_STATUS_OFFSET		17
431 #define IOMUXC_GPR3_OCRAM_STATUS_MASK		(0xf<<IOMUXC_GPR3_OCRAM_STATUS_OFFSET)
432 #define IOMUXC_GPR3_CORE3_DBG_ACK_EN_OFFSET	16
433 #define IOMUXC_GPR3_CORE3_DBG_ACK_EN_MASK	(1<<IOMUXC_GPR3_CORE3_DBG_ACK_EN_OFFSET)
434 #define IOMUXC_GPR3_CORE2_DBG_ACK_EN_OFFSET	15
435 #define IOMUXC_GPR3_CORE2_DBG_ACK_EN_MASK	(1<<IOMUXC_GPR3_CORE2_DBG_ACK_EN_OFFSET)
436 #define IOMUXC_GPR3_CORE1_DBG_ACK_EN_OFFSET	14
437 #define IOMUXC_GPR3_CORE1_DBG_ACK_EN_MASK	(1<<IOMUXC_GPR3_CORE1_DBG_ACK_EN_OFFSET)
438 #define IOMUXC_GPR3_CORE0_DBG_ACK_EN_OFFSET	13
439 #define IOMUXC_GPR3_CORE0_DBG_ACK_EN_MASK	(1<<IOMUXC_GPR3_CORE0_DBG_ACK_EN_OFFSET)
440 #define IOMUXC_GPR3_TZASC2_BOOT_LOCK_OFFSET	12
441 #define IOMUXC_GPR3_TZASC2_BOOT_LOCK_MASK	(1<<IOMUXC_GPR3_TZASC2_BOOT_LOCK_OFFSET)
442 #define IOMUXC_GPR3_TZASC1_BOOT_LOCK_OFFSET	11
443 #define IOMUXC_GPR3_TZASC1_BOOT_LOCK_MASK	(1<<IOMUXC_GPR3_TZASC1_BOOT_LOCK_OFFSET)
444 #define IOMUXC_GPR3_IPU_DIAG_OFFSET		10
445 #define IOMUXC_GPR3_IPU_DIAG_MASK		(1<<IOMUXC_GPR3_IPU_DIAG_OFFSET)
446 
447 #define IOMUXC_GPR3_MUX_SRC_IPU1_DI0	0
448 #define IOMUXC_GPR3_MUX_SRC_IPU1_DI1	1
449 #define IOMUXC_GPR3_MUX_SRC_IPU2_DI0	2
450 #define IOMUXC_GPR3_MUX_SRC_IPU2_DI1	3
451 
452 #define IOMUXC_GPR3_LVDS1_MUX_CTL_OFFSET	8
453 #define IOMUXC_GPR3_LVDS1_MUX_CTL_MASK		(3<<IOMUXC_GPR3_LVDS1_MUX_CTL_OFFSET)
454 
455 #define IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET	6
456 #define IOMUXC_GPR3_LVDS0_MUX_CTL_MASK		(3<<IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET)
457 
458 #define IOMUXC_GPR3_MIPI_MUX_CTL_OFFSET		4
459 #define IOMUXC_GPR3_MIPI_MUX_CTL_MASK		(3<<IOMUXC_GPR3_MIPI_MUX_CTL_OFFSET)
460 
461 #define IOMUXC_GPR3_HDMI_MUX_CTL_OFFSET		2
462 #define IOMUXC_GPR3_HDMI_MUX_CTL_MASK		(3<<IOMUXC_GPR3_HDMI_MUX_CTL_OFFSET)
463 
464 
465 struct iomuxc {
466 #if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
467 	u8 reserved[0x4000];
468 #endif
469 	u32 gpr[14];
470 };
471 
472 struct gpc {
473 	u32	cntr;
474 	u32	pgr;
475 	u32	imr1;
476 	u32	imr2;
477 	u32	imr3;
478 	u32	imr4;
479 	u32	isr1;
480 	u32	isr2;
481 	u32	isr3;
482 	u32	isr4;
483 };
484 
485 #define IOMUXC_GPR2_COUNTER_RESET_VAL_OFFSET		20
486 #define IOMUXC_GPR2_COUNTER_RESET_VAL_MASK		(3<<IOMUXC_GPR2_COUNTER_RESET_VAL_OFFSET)
487 #define IOMUXC_GPR2_LVDS_CLK_SHIFT_OFFSET		16
488 #define IOMUXC_GPR2_LVDS_CLK_SHIFT_MASK			(7<<IOMUXC_GPR2_LVDS_CLK_SHIFT_OFFSET)
489 
490 #define IOMUXC_GPR2_BGREF_RRMODE_OFFSET			15
491 #define IOMUXC_GPR2_BGREF_RRMODE_MASK			(1<<IOMUXC_GPR2_BGREF_RRMODE_OFFSET)
492 #define IOMUXC_GPR2_BGREF_RRMODE_INTERNAL_RES		(1<<IOMUXC_GPR2_BGREF_RRMODE_OFFSET)
493 #define IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES		(0<<IOMUXC_GPR2_BGREF_RRMODE_OFFSET)
494 #define IOMUXC_GPR2_VSYNC_ACTIVE_HIGH	0
495 #define IOMUXC_GPR2_VSYNC_ACTIVE_LOW	1
496 
497 #define IOMUXC_GPR2_DI1_VS_POLARITY_OFFSET		10
498 #define IOMUXC_GPR2_DI1_VS_POLARITY_MASK		(1<<IOMUXC_GPR2_DI1_VS_POLARITY_OFFSET)
499 #define IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_HIGH		(IOMUXC_GPR2_VSYNC_ACTIVE_HIGH<<IOMUXC_GPR2_DI1_VS_POLARITY_OFFSET)
500 #define IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_LOW		(IOMUXC_GPR2_VSYNC_ACTIVE_LOW<<IOMUXC_GPR2_DI1_VS_POLARITY_OFFSET)
501 
502 #define IOMUXC_GPR2_DI0_VS_POLARITY_OFFSET		9
503 #define IOMUXC_GPR2_DI0_VS_POLARITY_MASK		(1<<IOMUXC_GPR2_DI0_VS_POLARITY_OFFSET)
504 #define IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_HIGH		(IOMUXC_GPR2_VSYNC_ACTIVE_HIGH<<IOMUXC_GPR2_DI0_VS_POLARITY_OFFSET)
505 #define IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW		(IOMUXC_GPR2_VSYNC_ACTIVE_LOW<<IOMUXC_GPR2_DI0_VS_POLARITY_OFFSET)
506 
507 #define IOMUXC_GPR2_BITMAP_SPWG	0
508 #define IOMUXC_GPR2_BITMAP_JEIDA	1
509 
510 #define IOMUXC_GPR2_BIT_MAPPING_CH1_OFFSET		8
511 #define IOMUXC_GPR2_BIT_MAPPING_CH1_MASK		(1<<IOMUXC_GPR2_BIT_MAPPING_CH1_OFFSET)
512 #define IOMUXC_GPR2_BIT_MAPPING_CH1_JEIDA		(IOMUXC_GPR2_BITMAP_JEIDA<<IOMUXC_GPR2_BIT_MAPPING_CH1_OFFSET)
513 #define IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG		(IOMUXC_GPR2_BITMAP_SPWG<<IOMUXC_GPR2_BIT_MAPPING_CH1_OFFSET)
514 
515 #define IOMUXC_GPR2_DATA_WIDTH_18	0
516 #define IOMUXC_GPR2_DATA_WIDTH_24	1
517 
518 #define IOMUXC_GPR2_DATA_WIDTH_CH1_OFFSET		7
519 #define IOMUXC_GPR2_DATA_WIDTH_CH1_MASK			(1<<IOMUXC_GPR2_DATA_WIDTH_CH1_OFFSET)
520 #define IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT		(IOMUXC_GPR2_DATA_WIDTH_18<<IOMUXC_GPR2_DATA_WIDTH_CH1_OFFSET)
521 #define IOMUXC_GPR2_DATA_WIDTH_CH1_24BIT		(IOMUXC_GPR2_DATA_WIDTH_24<<IOMUXC_GPR2_DATA_WIDTH_CH1_OFFSET)
522 
523 #define IOMUXC_GPR2_BIT_MAPPING_CH0_OFFSET		6
524 #define IOMUXC_GPR2_BIT_MAPPING_CH0_MASK		(1<<IOMUXC_GPR2_BIT_MAPPING_CH0_OFFSET)
525 #define IOMUXC_GPR2_BIT_MAPPING_CH0_JEIDA		(IOMUXC_GPR2_BITMAP_JEIDA<<IOMUXC_GPR2_BIT_MAPPING_CH0_OFFSET)
526 #define IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG		(IOMUXC_GPR2_BITMAP_SPWG<<IOMUXC_GPR2_BIT_MAPPING_CH0_OFFSET)
527 
528 #define IOMUXC_GPR2_DATA_WIDTH_CH0_OFFSET		5
529 #define IOMUXC_GPR2_DATA_WIDTH_CH0_MASK			(1<<IOMUXC_GPR2_DATA_WIDTH_CH0_OFFSET)
530 #define IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT		(IOMUXC_GPR2_DATA_WIDTH_18<<IOMUXC_GPR2_DATA_WIDTH_CH0_OFFSET)
531 #define IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT		(IOMUXC_GPR2_DATA_WIDTH_24<<IOMUXC_GPR2_DATA_WIDTH_CH0_OFFSET)
532 
533 #define IOMUXC_GPR2_SPLIT_MODE_EN_OFFSET		4
534 #define IOMUXC_GPR2_SPLIT_MODE_EN_MASK			(1<<IOMUXC_GPR2_SPLIT_MODE_EN_OFFSET)
535 
536 #define IOMUXC_GPR2_MODE_DISABLED	0
537 #define IOMUXC_GPR2_MODE_ENABLED_DI0	1
538 #define IOMUXC_GPR2_MODE_ENABLED_DI1	3
539 
540 #define IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET		2
541 #define IOMUXC_GPR2_LVDS_CH1_MODE_MASK			(3<<IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET)
542 #define IOMUXC_GPR2_LVDS_CH1_MODE_DISABLED		(IOMUXC_GPR2_MODE_DISABLED<<IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET)
543 #define IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI0		(IOMUXC_GPR2_MODE_ENABLED_DI0<<IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET)
544 #define IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI1		(IOMUXC_GPR2_MODE_ENABLED_DI1<<IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET)
545 
546 #define IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET		0
547 #define IOMUXC_GPR2_LVDS_CH0_MODE_MASK			(3<<IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET)
548 #define IOMUXC_GPR2_LVDS_CH0_MODE_DISABLED		(IOMUXC_GPR2_MODE_DISABLED<<IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET)
549 #define IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI0		(IOMUXC_GPR2_MODE_ENABLED_DI0<<IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET)
550 #define IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI1		(IOMUXC_GPR2_MODE_ENABLED_DI1<<IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET)
551 
552 /* ECSPI registers */
553 struct cspi_regs {
554 	u32 rxdata;
555 	u32 txdata;
556 	u32 ctrl;
557 	u32 cfg;
558 	u32 intr;
559 	u32 dma;
560 	u32 stat;
561 	u32 period;
562 };
563 
564 /*
565  * CSPI register definitions
566  */
567 #define MXC_ECSPI
568 #define MXC_CSPICTRL_EN		(1 << 0)
569 #define MXC_CSPICTRL_MODE	(1 << 1)
570 #define MXC_CSPICTRL_XCH	(1 << 2)
571 #define MXC_CSPICTRL_MODE_MASK (0xf << 4)
572 #define MXC_CSPICTRL_CHIPSELECT(x)	(((x) & 0x3) << 12)
573 #define MXC_CSPICTRL_BITCOUNT(x)	(((x) & 0xfff) << 20)
574 #define MXC_CSPICTRL_PREDIV(x)	(((x) & 0xF) << 12)
575 #define MXC_CSPICTRL_POSTDIV(x)	(((x) & 0xF) << 8)
576 #define MXC_CSPICTRL_SELCHAN(x)	(((x) & 0x3) << 18)
577 #define MXC_CSPICTRL_MAXBITS	0xfff
578 #define MXC_CSPICTRL_TC		(1 << 7)
579 #define MXC_CSPICTRL_RXOVF	(1 << 6)
580 #define MXC_CSPIPERIOD_32KHZ	(1 << 15)
581 #define MAX_SPI_BYTES	32
582 #define SPI_MAX_NUM	4
583 
584 /* Bit position inside CTRL register to be associated with SS */
585 #define MXC_CSPICTRL_CHAN	18
586 
587 /* Bit position inside CON register to be associated with SS */
588 #define MXC_CSPICON_PHA		0  /* SCLK phase control */
589 #define MXC_CSPICON_POL		4  /* SCLK polarity */
590 #define MXC_CSPICON_SSPOL	12 /* SS polarity */
591 #define MXC_CSPICON_CTL		20 /* inactive state of SCLK */
592 #if defined(CONFIG_MX6SL) || defined(CONFIG_MX6DL) || defined(CONFIG_MX6UL)
593 #define MXC_SPI_BASE_ADDRESSES \
594 	ECSPI1_BASE_ADDR, \
595 	ECSPI2_BASE_ADDR, \
596 	ECSPI3_BASE_ADDR, \
597 	ECSPI4_BASE_ADDR
598 #else
599 #define MXC_SPI_BASE_ADDRESSES \
600 	ECSPI1_BASE_ADDR, \
601 	ECSPI2_BASE_ADDR, \
602 	ECSPI3_BASE_ADDR, \
603 	ECSPI4_BASE_ADDR, \
604 	ECSPI5_BASE_ADDR
605 #endif
606 
607 struct ocotp_regs {
608 	u32	ctrl;
609 	u32	ctrl_set;
610 	u32     ctrl_clr;
611 	u32	ctrl_tog;
612 	u32	timing;
613 	u32     rsvd0[3];
614 	u32     data;
615 	u32     rsvd1[3];
616 	u32     read_ctrl;
617 	u32     rsvd2[3];
618 	u32	read_fuse_data;
619 	u32     rsvd3[3];
620 	u32	sw_sticky;
621 	u32     rsvd4[3];
622 	u32     scs;
623 	u32     scs_set;
624 	u32     scs_clr;
625 	u32     scs_tog;
626 	u32     crc_addr;
627 	u32     rsvd5[3];
628 	u32     crc_value;
629 	u32     rsvd6[3];
630 	u32     version;
631 	u32     rsvd7[0xdb];
632 
633 	struct fuse_bank {
634 		u32	fuse_regs[0x20];
635 	} bank[16];
636 };
637 
638 struct fuse_bank0_regs {
639 	u32	lock;
640 	u32	rsvd0[3];
641 	u32	uid_low;
642 	u32	rsvd1[3];
643 	u32	uid_high;
644 	u32	rsvd2[3];
645 	u32	cfg2;
646 	u32	rsvd3[3];
647 	u32	cfg3;
648 	u32	rsvd4[3];
649 	u32	cfg4;
650 	u32	rsvd5[3];
651 	u32	cfg5;
652 	u32	rsvd6[3];
653 	u32	cfg6;
654 	u32	rsvd7[3];
655 };
656 
657 struct fuse_bank1_regs {
658 	u32	mem0;
659 	u32	rsvd0[3];
660 	u32	mem1;
661 	u32	rsvd1[3];
662 	u32	mem2;
663 	u32	rsvd2[3];
664 	u32	mem3;
665 	u32	rsvd3[3];
666 	u32	mem4;
667 	u32	rsvd4[3];
668 	u32	ana0;
669 	u32	rsvd5[3];
670 	u32	ana1;
671 	u32	rsvd6[3];
672 	u32	ana2;
673 	u32	rsvd7[3];
674 };
675 
676 #if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
677 struct fuse_bank4_regs {
678 	u32 sjc_resp_low;
679 	u32 rsvd0[3];
680 	u32 sjc_resp_high;
681 	u32 rsvd1[3];
682 	u32 mac_addr_low;
683 	u32 rsvd2[3];
684 	u32 mac_addr_high;
685 	u32 rsvd3[3];
686 	u32 mac_addr2;
687 	u32 rsvd4[7];
688 	u32 gp1;
689 	u32 rsvd5[3];
690 	u32 gp2;
691 	u32 rsvd6[3];
692 };
693 #else
694 struct fuse_bank4_regs {
695 	u32	sjc_resp_low;
696 	u32     rsvd0[3];
697 	u32     sjc_resp_high;
698 	u32     rsvd1[3];
699 	u32	mac_addr_low;
700 	u32     rsvd2[3];
701 	u32     mac_addr_high;
702 	u32	rsvd3[0xb];
703 	u32	gp1;
704 	u32	rsvd4[3];
705 	u32	gp2;
706 	u32	rsvd5[3];
707 };
708 #endif
709 
710 struct aipstz_regs {
711 	u32	mprot0;
712 	u32	mprot1;
713 	u32	rsvd[0xe];
714 	u32	opacr0;
715 	u32	opacr1;
716 	u32	opacr2;
717 	u32	opacr3;
718 	u32	opacr4;
719 };
720 
721 struct anatop_regs {
722 	u32	pll_sys;		/* 0x000 */
723 	u32	pll_sys_set;		/* 0x004 */
724 	u32	pll_sys_clr;		/* 0x008 */
725 	u32	pll_sys_tog;		/* 0x00c */
726 	u32	usb1_pll_480_ctrl;	/* 0x010 */
727 	u32	usb1_pll_480_ctrl_set;	/* 0x014 */
728 	u32	usb1_pll_480_ctrl_clr;	/* 0x018 */
729 	u32	usb1_pll_480_ctrl_tog;	/* 0x01c */
730 	u32	usb2_pll_480_ctrl;	/* 0x020 */
731 	u32	usb2_pll_480_ctrl_set;	/* 0x024 */
732 	u32	usb2_pll_480_ctrl_clr;	/* 0x028 */
733 	u32	usb2_pll_480_ctrl_tog;	/* 0x02c */
734 	u32	pll_528;		/* 0x030 */
735 	u32	pll_528_set;		/* 0x034 */
736 	u32	pll_528_clr;		/* 0x038 */
737 	u32	pll_528_tog;		/* 0x03c */
738 	u32	pll_528_ss;		/* 0x040 */
739 	u32	rsvd0[3];
740 	u32	pll_528_num;		/* 0x050 */
741 	u32	rsvd1[3];
742 	u32	pll_528_denom;		/* 0x060 */
743 	u32	rsvd2[3];
744 	u32	pll_audio;		/* 0x070 */
745 	u32	pll_audio_set;		/* 0x074 */
746 	u32	pll_audio_clr;		/* 0x078 */
747 	u32	pll_audio_tog;		/* 0x07c */
748 	u32	pll_audio_num;		/* 0x080 */
749 	u32	rsvd3[3];
750 	u32	pll_audio_denom;	/* 0x090 */
751 	u32	rsvd4[3];
752 	u32	pll_video;		/* 0x0a0 */
753 	u32	pll_video_set;		/* 0x0a4 */
754 	u32	pll_video_clr;		/* 0x0a8 */
755 	u32	pll_video_tog;		/* 0x0ac */
756 	u32	pll_video_num;		/* 0x0b0 */
757 	u32	rsvd5[3];
758 	u32	pll_video_denom;	/* 0x0c0 */
759 	u32	rsvd6[3];
760 	u32	pll_mlb;		/* 0x0d0 */
761 	u32	pll_mlb_set;		/* 0x0d4 */
762 	u32	pll_mlb_clr;		/* 0x0d8 */
763 	u32	pll_mlb_tog;		/* 0x0dc */
764 	u32	pll_enet;		/* 0x0e0 */
765 	u32	pll_enet_set;		/* 0x0e4 */
766 	u32	pll_enet_clr;		/* 0x0e8 */
767 	u32	pll_enet_tog;		/* 0x0ec */
768 	u32	pfd_480;		/* 0x0f0 */
769 	u32	pfd_480_set;		/* 0x0f4 */
770 	u32	pfd_480_clr;		/* 0x0f8 */
771 	u32	pfd_480_tog;		/* 0x0fc */
772 	u32	pfd_528;		/* 0x100 */
773 	u32	pfd_528_set;		/* 0x104 */
774 	u32	pfd_528_clr;		/* 0x108 */
775 	u32	pfd_528_tog;		/* 0x10c */
776 	u32	reg_1p1;		/* 0x110 */
777 	u32	reg_1p1_set;		/* 0x114 */
778 	u32	reg_1p1_clr;		/* 0x118 */
779 	u32	reg_1p1_tog;		/* 0x11c */
780 	u32	reg_3p0;		/* 0x120 */
781 	u32	reg_3p0_set;		/* 0x124 */
782 	u32	reg_3p0_clr;		/* 0x128 */
783 	u32	reg_3p0_tog;		/* 0x12c */
784 	u32	reg_2p5;		/* 0x130 */
785 	u32	reg_2p5_set;		/* 0x134 */
786 	u32	reg_2p5_clr;		/* 0x138 */
787 	u32	reg_2p5_tog;		/* 0x13c */
788 	u32	reg_core;		/* 0x140 */
789 	u32	reg_core_set;		/* 0x144 */
790 	u32	reg_core_clr;		/* 0x148 */
791 	u32	reg_core_tog;		/* 0x14c */
792 	u32	ana_misc0;		/* 0x150 */
793 	u32	ana_misc0_set;		/* 0x154 */
794 	u32	ana_misc0_clr;		/* 0x158 */
795 	u32	ana_misc0_tog;		/* 0x15c */
796 	u32	ana_misc1;		/* 0x160 */
797 	u32	ana_misc1_set;		/* 0x164 */
798 	u32	ana_misc1_clr;		/* 0x168 */
799 	u32	ana_misc1_tog;		/* 0x16c */
800 	u32	ana_misc2;		/* 0x170 */
801 	u32	ana_misc2_set;		/* 0x174 */
802 	u32	ana_misc2_clr;		/* 0x178 */
803 	u32	ana_misc2_tog;		/* 0x17c */
804 	u32	tempsense0;		/* 0x180 */
805 	u32	tempsense0_set;		/* 0x184 */
806 	u32	tempsense0_clr;		/* 0x188 */
807 	u32	tempsense0_tog;		/* 0x18c */
808 	u32	tempsense1;		/* 0x190 */
809 	u32	tempsense1_set;		/* 0x194 */
810 	u32	tempsense1_clr;		/* 0x198 */
811 	u32	tempsense1_tog;		/* 0x19c */
812 	u32	usb1_vbus_detect;	/* 0x1a0 */
813 	u32	usb1_vbus_detect_set;	/* 0x1a4 */
814 	u32	usb1_vbus_detect_clr;	/* 0x1a8 */
815 	u32	usb1_vbus_detect_tog;	/* 0x1ac */
816 	u32	usb1_chrg_detect;	/* 0x1b0 */
817 	u32	usb1_chrg_detect_set;	/* 0x1b4 */
818 	u32	usb1_chrg_detect_clr;	/* 0x1b8 */
819 	u32	usb1_chrg_detect_tog;	/* 0x1bc */
820 	u32	usb1_vbus_det_stat;	/* 0x1c0 */
821 	u32	usb1_vbus_det_stat_set;	/* 0x1c4 */
822 	u32	usb1_vbus_det_stat_clr;	/* 0x1c8 */
823 	u32	usb1_vbus_det_stat_tog;	/* 0x1cc */
824 	u32	usb1_chrg_det_stat;	/* 0x1d0 */
825 	u32	usb1_chrg_det_stat_set;	/* 0x1d4 */
826 	u32	usb1_chrg_det_stat_clr;	/* 0x1d8 */
827 	u32	usb1_chrg_det_stat_tog;	/* 0x1dc */
828 	u32	usb1_loopback;		/* 0x1e0 */
829 	u32	usb1_loopback_set;	/* 0x1e4 */
830 	u32	usb1_loopback_clr;	/* 0x1e8 */
831 	u32	usb1_loopback_tog;	/* 0x1ec */
832 	u32	usb1_misc;		/* 0x1f0 */
833 	u32	usb1_misc_set;		/* 0x1f4 */
834 	u32	usb1_misc_clr;		/* 0x1f8 */
835 	u32	usb1_misc_tog;		/* 0x1fc */
836 	u32	usb2_vbus_detect;	/* 0x200 */
837 	u32	usb2_vbus_detect_set;	/* 0x204 */
838 	u32	usb2_vbus_detect_clr;	/* 0x208 */
839 	u32	usb2_vbus_detect_tog;	/* 0x20c */
840 	u32	usb2_chrg_detect;	/* 0x210 */
841 	u32	usb2_chrg_detect_set;	/* 0x214 */
842 	u32	usb2_chrg_detect_clr;	/* 0x218 */
843 	u32	usb2_chrg_detect_tog;	/* 0x21c */
844 	u32	usb2_vbus_det_stat;	/* 0x220 */
845 	u32	usb2_vbus_det_stat_set;	/* 0x224 */
846 	u32	usb2_vbus_det_stat_clr;	/* 0x228 */
847 	u32	usb2_vbus_det_stat_tog;	/* 0x22c */
848 	u32	usb2_chrg_det_stat;	/* 0x230 */
849 	u32	usb2_chrg_det_stat_set;	/* 0x234 */
850 	u32	usb2_chrg_det_stat_clr;	/* 0x238 */
851 	u32	usb2_chrg_det_stat_tog;	/* 0x23c */
852 	u32	usb2_loopback;		/* 0x240 */
853 	u32	usb2_loopback_set;	/* 0x244 */
854 	u32	usb2_loopback_clr;	/* 0x248 */
855 	u32	usb2_loopback_tog;	/* 0x24c */
856 	u32	usb2_misc;		/* 0x250 */
857 	u32	usb2_misc_set;		/* 0x254 */
858 	u32	usb2_misc_clr;		/* 0x258 */
859 	u32	usb2_misc_tog;		/* 0x25c */
860 	u32	digprog;		/* 0x260 */
861 	u32	reserved1[7];
862 	u32	digprog_sololite;	/* 0x280 */
863 };
864 
865 #define ANATOP_PFD_FRAC_SHIFT(n)	((n)*8)
866 #define ANATOP_PFD_FRAC_MASK(n)	(0x3f<<ANATOP_PFD_FRAC_SHIFT(n))
867 #define ANATOP_PFD_STABLE_SHIFT(n)	(6+((n)*8))
868 #define ANATOP_PFD_STABLE_MASK(n)	(1<<ANATOP_PFD_STABLE_SHIFT(n))
869 #define ANATOP_PFD_CLKGATE_SHIFT(n)	(7+((n)*8))
870 #define ANATOP_PFD_CLKGATE_MASK(n)	(1<<ANATOP_PFD_CLKGATE_SHIFT(n))
871 
872 struct wdog_regs {
873 	u16	wcr;	/* Control */
874 	u16	wsr;	/* Service */
875 	u16	wrsr;	/* Reset Status */
876 	u16	wicr;	/* Interrupt Control */
877 	u16	wmcr;	/* Miscellaneous Control */
878 };
879 
880 #define PWMCR_PRESCALER(x)	(((x - 1) & 0xFFF) << 4)
881 #define PWMCR_DOZEEN		(1 << 24)
882 #define PWMCR_WAITEN		(1 << 23)
883 #define PWMCR_DBGEN		(1 << 22)
884 #define PWMCR_CLKSRC_IPG_HIGH	(2 << 16)
885 #define PWMCR_CLKSRC_IPG	(1 << 16)
886 #define PWMCR_EN		(1 << 0)
887 
888 struct pwm_regs {
889 	u32	cr;
890 	u32	sr;
891 	u32	ir;
892 	u32	sar;
893 	u32	pr;
894 	u32	cnr;
895 };
896 #endif /* __ASSEMBLER__*/
897 #endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */
898