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