blob: a69a7530c37b9aff9806af489f3f6cd76ed1061b [file] [log] [blame]
Jason Liu23608e22011-11-25 00:18:02 +00001/*
2 * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Jason Liu23608e22011-11-25 00:18:02 +00005 */
6
7#ifndef __ASM_ARCH_MX6_IMX_REGS_H__
8#define __ASM_ARCH_MX6_IMX_REGS_H__
9
Benoît Thébaudeau8e99ecd2012-08-13 07:27:58 +000010#define ARCH_MXC
11
Eric Nelsonc4159192012-03-04 11:47:37 +000012#define CONFIG_SYS_CACHELINE_SIZE 32
13
Jason Liu23608e22011-11-25 00:18:02 +000014#define ROMCP_ARB_BASE_ADDR 0x00000000
15#define ROMCP_ARB_END_ADDR 0x000FFFFF
Fabio Estevam25b4aa12013-04-10 09:32:57 +000016
17#ifdef CONFIG_MX6SL
18#define GPU_2D_ARB_BASE_ADDR 0x02200000
19#define GPU_2D_ARB_END_ADDR 0x02203FFF
20#define OPENVG_ARB_BASE_ADDR 0x02204000
21#define OPENVG_ARB_END_ADDR 0x02207FFF
22#else
Jason Liu23608e22011-11-25 00:18:02 +000023#define CAAM_ARB_BASE_ADDR 0x00100000
24#define CAAM_ARB_END_ADDR 0x00103FFF
25#define APBH_DMA_ARB_BASE_ADDR 0x00110000
26#define APBH_DMA_ARB_END_ADDR 0x00117FFF
27#define HDMI_ARB_BASE_ADDR 0x00120000
28#define HDMI_ARB_END_ADDR 0x00128FFF
29#define GPU_3D_ARB_BASE_ADDR 0x00130000
30#define GPU_3D_ARB_END_ADDR 0x00133FFF
31#define GPU_2D_ARB_BASE_ADDR 0x00134000
32#define GPU_2D_ARB_END_ADDR 0x00137FFF
33#define DTCP_ARB_BASE_ADDR 0x00138000
34#define DTCP_ARB_END_ADDR 0x0013BFFF
Fabio Estevam25b4aa12013-04-10 09:32:57 +000035#endif /* CONFIG_MX6SL */
Stefan Roese99193e32013-04-09 21:06:09 +000036
37#define MXS_APBH_BASE APBH_DMA_ARB_BASE_ADDR
38#define MXS_GPMI_BASE (APBH_DMA_ARB_BASE_ADDR + 0x02000)
39#define MXS_BCH_BASE (APBH_DMA_ARB_BASE_ADDR + 0x04000)
40
Jason Liu23608e22011-11-25 00:18:02 +000041/* GPV - PL301 configuration ports */
Fabio Estevam25b4aa12013-04-10 09:32:57 +000042#ifdef CONFIG_MX6SL
43#define GPV2_BASE_ADDR 0x00D00000
44#else
Jason Liu23608e22011-11-25 00:18:02 +000045#define GPV2_BASE_ADDR 0x00200000
Fabio Estevam25b4aa12013-04-10 09:32:57 +000046#endif
47
Jason Liu23608e22011-11-25 00:18:02 +000048#define GPV3_BASE_ADDR 0x00300000
49#define GPV4_BASE_ADDR 0x00800000
50#define IRAM_BASE_ADDR 0x00900000
51#define SCU_BASE_ADDR 0x00A00000
52#define IC_INTERFACES_BASE_ADDR 0x00A00100
53#define GLOBAL_TIMER_BASE_ADDR 0x00A00200
54#define PRIVATE_TIMERS_WD_BASE_ADDR 0x00A00600
55#define IC_DISTRIBUTOR_BASE_ADDR 0x00A01000
Fabio Estevam6d73c232014-01-29 17:39:49 -020056#define L2_PL310_BASE 0x00A02000
Jason Liu23608e22011-11-25 00:18:02 +000057#define GPV0_BASE_ADDR 0x00B00000
58#define GPV1_BASE_ADDR 0x00C00000
59#define PCIE_ARB_BASE_ADDR 0x01000000
60#define PCIE_ARB_END_ADDR 0x01FFFFFF
61
62#define AIPS1_ARB_BASE_ADDR 0x02000000
63#define AIPS1_ARB_END_ADDR 0x020FFFFF
64#define AIPS2_ARB_BASE_ADDR 0x02100000
65#define AIPS2_ARB_END_ADDR 0x021FFFFF
66#define SATA_ARB_BASE_ADDR 0x02200000
67#define SATA_ARB_END_ADDR 0x02203FFF
68#define OPENVG_ARB_BASE_ADDR 0x02204000
69#define OPENVG_ARB_END_ADDR 0x02207FFF
70#define HSI_ARB_BASE_ADDR 0x02208000
71#define HSI_ARB_END_ADDR 0x0220BFFF
72#define IPU1_ARB_BASE_ADDR 0x02400000
73#define IPU1_ARB_END_ADDR 0x027FFFFF
74#define IPU2_ARB_BASE_ADDR 0x02800000
75#define IPU2_ARB_END_ADDR 0x02BFFFFF
76#define WEIM_ARB_BASE_ADDR 0x08000000
77#define WEIM_ARB_END_ADDR 0x0FFFFFFF
78
Fabio Estevam25b4aa12013-04-10 09:32:57 +000079#ifdef CONFIG_MX6SL
80#define MMDC0_ARB_BASE_ADDR 0x80000000
81#define MMDC0_ARB_END_ADDR 0xFFFFFFFF
82#define MMDC1_ARB_BASE_ADDR 0xC0000000
83#define MMDC1_ARB_END_ADDR 0xFFFFFFFF
84#else
Jason Liu23608e22011-11-25 00:18:02 +000085#define MMDC0_ARB_BASE_ADDR 0x10000000
86#define MMDC0_ARB_END_ADDR 0x7FFFFFFF
87#define MMDC1_ARB_BASE_ADDR 0x80000000
88#define MMDC1_ARB_END_ADDR 0xFFFFFFFF
Fabio Estevam25b4aa12013-04-10 09:32:57 +000089#endif
Jason Liu23608e22011-11-25 00:18:02 +000090
Fabio Estevam05d4df12012-05-31 07:23:55 +000091#define IPU_SOC_BASE_ADDR IPU1_ARB_BASE_ADDR
92#define IPU_SOC_OFFSET 0x00200000
93
Jason Liu23608e22011-11-25 00:18:02 +000094/* Defines for Blocks connected via AIPS (SkyBlue) */
95#define ATZ1_BASE_ADDR AIPS1_ARB_BASE_ADDR
96#define ATZ2_BASE_ADDR AIPS2_ARB_BASE_ADDR
97#define AIPS1_BASE_ADDR AIPS1_ON_BASE_ADDR
98#define AIPS2_BASE_ADDR AIPS2_ON_BASE_ADDR
99
100#define SPDIF_BASE_ADDR (ATZ1_BASE_ADDR + 0x04000)
101#define ECSPI1_BASE_ADDR (ATZ1_BASE_ADDR + 0x08000)
102#define ECSPI2_BASE_ADDR (ATZ1_BASE_ADDR + 0x0C000)
103#define ECSPI3_BASE_ADDR (ATZ1_BASE_ADDR + 0x10000)
104#define ECSPI4_BASE_ADDR (ATZ1_BASE_ADDR + 0x14000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000105#ifdef CONFIG_MX6SL
106#define UART5_IPS_BASE_ADDR (ATZ1_BASE_ADDR + 0x18000)
107#define UART1_IPS_BASE_ADDR (ATZ1_BASE_ADDR + 0x20000)
108#define UART2_IPS_BASE_ADDR (ATZ1_BASE_ADDR + 0x24000)
109#define SSI1_IPS_BASE_ADDR (ATZ1_BASE_ADDR + 0x28000)
110#define SSI2_IPS_BASE_ADDR (ATZ1_BASE_ADDR + 0x2C000)
111#define SSI3_IPS_BASE_ADDR (ATZ1_BASE_ADDR + 0x30000)
112#define UART3_IPS_BASE_ADDR (ATZ1_BASE_ADDR + 0x34000)
113#define UART4_IPS_BASE_ADDR (ATZ1_BASE_ADDR + 0x38000)
114#else
Jason Liu23608e22011-11-25 00:18:02 +0000115#define ECSPI5_BASE_ADDR (ATZ1_BASE_ADDR + 0x18000)
116#define UART1_BASE (ATZ1_BASE_ADDR + 0x20000)
117#define ESAI1_BASE_ADDR (ATZ1_BASE_ADDR + 0x24000)
118#define SSI1_BASE_ADDR (ATZ1_BASE_ADDR + 0x28000)
119#define SSI2_BASE_ADDR (ATZ1_BASE_ADDR + 0x2C000)
120#define SSI3_BASE_ADDR (ATZ1_BASE_ADDR + 0x30000)
121#define ASRC_BASE_ADDR (ATZ1_BASE_ADDR + 0x34000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000122#endif
123
Jason Liu23608e22011-11-25 00:18:02 +0000124#define SPBA_BASE_ADDR (ATZ1_BASE_ADDR + 0x3C000)
125#define VPU_BASE_ADDR (ATZ1_BASE_ADDR + 0x40000)
126#define AIPS1_ON_BASE_ADDR (ATZ1_BASE_ADDR + 0x7C000)
127
128#define AIPS1_OFF_BASE_ADDR (ATZ1_BASE_ADDR + 0x80000)
129#define PWM1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x0000)
130#define PWM2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x4000)
131#define PWM3_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x8000)
132#define PWM4_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0xC000)
133#define CAN1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x10000)
134#define CAN2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x14000)
135#define GPT1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x18000)
136#define GPIO1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x1C000)
137#define GPIO2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x20000)
138#define GPIO3_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x24000)
139#define GPIO4_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x28000)
140#define GPIO5_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x2C000)
141#define GPIO6_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x30000)
142#define GPIO7_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x34000)
143#define KPP_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x38000)
144#define WDOG1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x3C000)
145#define WDOG2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x40000)
Wolfgang Grandegger3f467522012-02-08 22:33:25 +0000146#define ANATOP_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x48000)
147#define USB_PHY0_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x49000)
148#define USB_PHY1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x4a000)
Jason Liu23608e22011-11-25 00:18:02 +0000149#define CCM_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x44000)
Jason Liu23608e22011-11-25 00:18:02 +0000150#define SNVS_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x4C000)
151#define EPIT1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x50000)
152#define EPIT2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x54000)
153#define SRC_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x58000)
154#define GPC_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x5C000)
155#define IOMUXC_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x60000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000156#ifdef CONFIG_MX6SL
157#define CSI_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x64000)
158#define SIPIX_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x68000)
159#define SDMA_PORT_HOST_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x6C000)
160#else
Jason Liu23608e22011-11-25 00:18:02 +0000161#define DCIC1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x64000)
162#define DCIC2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x68000)
163#define DMA_REQ_PORT_HOST_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x6C000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000164#endif
Jason Liu23608e22011-11-25 00:18:02 +0000165
166#define AIPS2_ON_BASE_ADDR (ATZ2_BASE_ADDR + 0x7C000)
167#define AIPS2_OFF_BASE_ADDR (ATZ2_BASE_ADDR + 0x80000)
168#define CAAM_BASE_ADDR (ATZ2_BASE_ADDR)
169#define ARM_BASE_ADDR (ATZ2_BASE_ADDR + 0x40000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000170#ifdef CONFIG_MX6SL
171#define USBO2H_PL301_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x0000)
172#define USBO2H_USB_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4000)
173#else
Jason Liu23608e22011-11-25 00:18:02 +0000174#define USBOH3_PL301_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x0000)
175#define USBOH3_USB_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000176#endif
177
Jason Liu23608e22011-11-25 00:18:02 +0000178#define ENET_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x8000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000179#ifdef CONFIG_MX6SL
180#define MSHC_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0xC000)
181#else
Jason Liu23608e22011-11-25 00:18:02 +0000182#define MLB_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0xC000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000183#endif
184
Jason Liu23608e22011-11-25 00:18:02 +0000185#define USDHC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x10000)
186#define USDHC2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x14000)
187#define USDHC3_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x18000)
188#define USDHC4_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x1C000)
189#define I2C1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x20000)
190#define I2C2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x24000)
191#define I2C3_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x28000)
192#define ROMCP_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x2C000)
193#define MMDC_P0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x30000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000194#ifdef CONFIG_MX6SL
195#define RNGB_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000)
196#else
Jason Liu23608e22011-11-25 00:18:02 +0000197#define MMDC_P1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000198#endif
199
Jason Liu23608e22011-11-25 00:18:02 +0000200#define WEIM_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x38000)
201#define OCOTP_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x3C000)
202#define CSU_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x40000)
203#define IP2APB_PERFMON1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x44000)
204#define IP2APB_PERFMON2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x48000)
205#define IP2APB_PERFMON3_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4C000)
206#define IP2APB_TZASC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x50000)
207#define IP2APB_TZASC2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x54000)
208#define AUDMUX_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x58000)
209#define MIPI_CSI2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x5C000)
210#define MIPI_DSI_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x60000)
211#define VDOA_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x64000)
212#define UART2_BASE (AIPS2_OFF_BASE_ADDR + 0x68000)
213#define UART3_BASE (AIPS2_OFF_BASE_ADDR + 0x6C000)
214#define UART4_BASE (AIPS2_OFF_BASE_ADDR + 0x70000)
215#define UART5_BASE (AIPS2_OFF_BASE_ADDR + 0x74000)
216#define IP2APB_USBPHY1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x78000)
217#define IP2APB_USBPHY2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x7C000)
218
219#define CHIP_REV_1_0 0x10
Stefano Babicf2f07e82014-06-10 10:26:22 +0200220#define CHIP_REV_1_2 0x12
221#define CHIP_REV_1_5 0x15
Jason Liu23608e22011-11-25 00:18:02 +0000222#define IRAM_SIZE 0x00040000
Troy Kisky28774cb2012-02-07 14:08:46 +0000223#define FEC_QUIRK_ENET_MAC
Jason Liu23608e22011-11-25 00:18:02 +0000224
225#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
226#include <asm/types.h>
227
Fabio Estevambe252b62011-12-20 05:46:31 +0000228extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
Jason Liu23608e22011-11-25 00:18:02 +0000229
230/* System Reset Controller (SRC) */
231struct src {
232 u32 scr;
233 u32 sbmr1;
234 u32 srsr;
235 u32 reserved1[2];
236 u32 sisr;
237 u32 simr;
238 u32 sbmr2;
239 u32 gpr1;
240 u32 gpr2;
241 u32 gpr3;
242 u32 gpr4;
243 u32 gpr5;
244 u32 gpr6;
245 u32 gpr7;
246 u32 gpr8;
247 u32 gpr9;
248 u32 gpr10;
249};
250
Fabio Estevam3a217732014-01-03 15:55:58 -0200251/* GPR1 bitfields */
252#define IOMUXC_GPR1_ENET_CLK_SEL_OFFSET 21
253#define IOMUXC_GPR1_ENET_CLK_SEL_MASK (1 << IOMUXC_GPR1_ENET_CLK_SEL_OFFSET)
254
Eric Nelsona83e1b72012-09-21 11:41:42 +0000255/* GPR3 bitfields */
256#define IOMUXC_GPR3_GPU_DBG_OFFSET 29
257#define IOMUXC_GPR3_GPU_DBG_MASK (3<<IOMUXC_GPR3_GPU_DBG_OFFSET)
258#define IOMUXC_GPR3_BCH_WR_CACHE_CTL_OFFSET 28
259#define IOMUXC_GPR3_BCH_WR_CACHE_CTL_MASK (1<<IOMUXC_GPR3_BCH_WR_CACHE_CTL_OFFSET)
260#define IOMUXC_GPR3_BCH_RD_CACHE_CTL_OFFSET 27
261#define IOMUXC_GPR3_BCH_RD_CACHE_CTL_MASK (1<<IOMUXC_GPR3_BCH_RD_CACHE_CTL_OFFSET)
262#define IOMUXC_GPR3_uSDHCx_WR_CACHE_CTL_OFFSET 26
263#define IOMUXC_GPR3_uSDHCx_WR_CACHE_CTL_MASK (1<<IOMUXC_GPR3_uSDHCx_WR_CACHE_CTL_OFFSET)
264#define IOMUXC_GPR3_uSDHCx_RD_CACHE_CTL_OFFSET 25
265#define IOMUXC_GPR3_uSDHCx_RD_CACHE_CTL_MASK (1<<IOMUXC_GPR3_uSDHCx_RD_CACHE_CTL_OFFSET)
266#define IOMUXC_GPR3_OCRAM_CTL_OFFSET 21
267#define IOMUXC_GPR3_OCRAM_CTL_MASK (0xf<<IOMUXC_GPR3_OCRAM_CTL_OFFSET)
268#define IOMUXC_GPR3_OCRAM_STATUS_OFFSET 17
269#define IOMUXC_GPR3_OCRAM_STATUS_MASK (0xf<<IOMUXC_GPR3_OCRAM_STATUS_OFFSET)
270#define IOMUXC_GPR3_CORE3_DBG_ACK_EN_OFFSET 16
271#define IOMUXC_GPR3_CORE3_DBG_ACK_EN_MASK (1<<IOMUXC_GPR3_CORE3_DBG_ACK_EN_OFFSET)
272#define IOMUXC_GPR3_CORE2_DBG_ACK_EN_OFFSET 15
273#define IOMUXC_GPR3_CORE2_DBG_ACK_EN_MASK (1<<IOMUXC_GPR3_CORE2_DBG_ACK_EN_OFFSET)
274#define IOMUXC_GPR3_CORE1_DBG_ACK_EN_OFFSET 14
275#define IOMUXC_GPR3_CORE1_DBG_ACK_EN_MASK (1<<IOMUXC_GPR3_CORE1_DBG_ACK_EN_OFFSET)
276#define IOMUXC_GPR3_CORE0_DBG_ACK_EN_OFFSET 13
277#define IOMUXC_GPR3_CORE0_DBG_ACK_EN_MASK (1<<IOMUXC_GPR3_CORE0_DBG_ACK_EN_OFFSET)
278#define IOMUXC_GPR3_TZASC2_BOOT_LOCK_OFFSET 12
279#define IOMUXC_GPR3_TZASC2_BOOT_LOCK_MASK (1<<IOMUXC_GPR3_TZASC2_BOOT_LOCK_OFFSET)
280#define IOMUXC_GPR3_TZASC1_BOOT_LOCK_OFFSET 11
281#define IOMUXC_GPR3_TZASC1_BOOT_LOCK_MASK (1<<IOMUXC_GPR3_TZASC1_BOOT_LOCK_OFFSET)
282#define IOMUXC_GPR3_IPU_DIAG_OFFSET 10
283#define IOMUXC_GPR3_IPU_DIAG_MASK (1<<IOMUXC_GPR3_IPU_DIAG_OFFSET)
284
285#define IOMUXC_GPR3_MUX_SRC_IPU1_DI0 0
286#define IOMUXC_GPR3_MUX_SRC_IPU1_DI1 1
287#define IOMUXC_GPR3_MUX_SRC_IPU2_DI0 2
288#define IOMUXC_GPR3_MUX_SRC_IPU2_DI1 3
289
290#define IOMUXC_GPR3_LVDS1_MUX_CTL_OFFSET 8
291#define IOMUXC_GPR3_LVDS1_MUX_CTL_MASK (3<<IOMUXC_GPR3_LVDS1_MUX_CTL_OFFSET)
292
293#define IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET 6
294#define IOMUXC_GPR3_LVDS0_MUX_CTL_MASK (3<<IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET)
295
296#define IOMUXC_GPR3_MIPI_MUX_CTL_OFFSET 4
297#define IOMUXC_GPR3_MIPI_MUX_CTL_MASK (3<<IOMUXC_GPR3_MIPI_MUX_CTL_OFFSET)
298
299#define IOMUXC_GPR3_HDMI_MUX_CTL_OFFSET 2
300#define IOMUXC_GPR3_HDMI_MUX_CTL_MASK (3<<IOMUXC_GPR3_HDMI_MUX_CTL_OFFSET)
301
302
Eric Nelsonde710a12012-09-19 08:32:31 +0000303struct iomuxc {
304 u32 gpr[14];
305 u32 omux[5];
306 /* mux and pad registers */
307};
308
309#define IOMUXC_GPR2_COUNTER_RESET_VAL_OFFSET 20
310#define IOMUXC_GPR2_COUNTER_RESET_VAL_MASK (3<<IOMUXC_GPR2_COUNTER_RESET_VAL_OFFSET)
311#define IOMUXC_GPR2_LVDS_CLK_SHIFT_OFFSET 16
312#define IOMUXC_GPR2_LVDS_CLK_SHIFT_MASK (7<<IOMUXC_GPR2_LVDS_CLK_SHIFT_OFFSET)
313
314#define IOMUXC_GPR2_BGREF_RRMODE_OFFSET 15
315#define IOMUXC_GPR2_BGREF_RRMODE_MASK (1<<IOMUXC_GPR2_BGREF_RRMODE_OFFSET)
316#define IOMUXC_GPR2_BGREF_RRMODE_INTERNAL_RES (1<<IOMUXC_GPR2_BGREF_RRMODE_OFFSET)
317#define IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES (0<<IOMUXC_GPR2_BGREF_RRMODE_OFFSET)
318#define IOMUXC_GPR2_VSYNC_ACTIVE_HIGH 0
319#define IOMUXC_GPR2_VSYNC_ACTIVE_LOW 1
320
321#define IOMUXC_GPR2_DI1_VS_POLARITY_OFFSET 10
322#define IOMUXC_GPR2_DI1_VS_POLARITY_MASK (1<<IOMUXC_GPR2_DI1_VS_POLARITY_OFFSET)
323#define IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_HIGH (IOMUXC_GPR2_VSYNC_ACTIVE_HIGH<<IOMUXC_GPR2_DI1_VS_POLARITY_OFFSET)
324#define IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_LOW (IOMUXC_GPR2_VSYNC_ACTIVE_LOW<<IOMUXC_GPR2_DI1_VS_POLARITY_OFFSET)
325
326#define IOMUXC_GPR2_DI0_VS_POLARITY_OFFSET 9
327#define IOMUXC_GPR2_DI0_VS_POLARITY_MASK (1<<IOMUXC_GPR2_DI0_VS_POLARITY_OFFSET)
328#define IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_HIGH (IOMUXC_GPR2_VSYNC_ACTIVE_HIGH<<IOMUXC_GPR2_DI0_VS_POLARITY_OFFSET)
329#define IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW (IOMUXC_GPR2_VSYNC_ACTIVE_LOW<<IOMUXC_GPR2_DI0_VS_POLARITY_OFFSET)
330
331#define IOMUXC_GPR2_BITMAP_SPWG 0
332#define IOMUXC_GPR2_BITMAP_JEIDA 1
333
334#define IOMUXC_GPR2_BIT_MAPPING_CH1_OFFSET 8
335#define IOMUXC_GPR2_BIT_MAPPING_CH1_MASK (1<<IOMUXC_GPR2_BIT_MAPPING_CH1_OFFSET)
336#define IOMUXC_GPR2_BIT_MAPPING_CH1_JEIDA (IOMUXC_GPR2_BITMAP_JEIDA<<IOMUXC_GPR2_BIT_MAPPING_CH1_OFFSET)
337#define IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG (IOMUXC_GPR2_BITMAP_SPWG<<IOMUXC_GPR2_BIT_MAPPING_CH1_OFFSET)
338
339#define IOMUXC_GPR2_DATA_WIDTH_18 0
340#define IOMUXC_GPR2_DATA_WIDTH_24 1
341
342#define IOMUXC_GPR2_DATA_WIDTH_CH1_OFFSET 7
343#define IOMUXC_GPR2_DATA_WIDTH_CH1_MASK (1<<IOMUXC_GPR2_DATA_WIDTH_CH1_OFFSET)
344#define IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT (IOMUXC_GPR2_DATA_WIDTH_18<<IOMUXC_GPR2_DATA_WIDTH_CH1_OFFSET)
345#define IOMUXC_GPR2_DATA_WIDTH_CH1_24BIT (IOMUXC_GPR2_DATA_WIDTH_24<<IOMUXC_GPR2_DATA_WIDTH_CH1_OFFSET)
346
347#define IOMUXC_GPR2_BIT_MAPPING_CH0_OFFSET 6
348#define IOMUXC_GPR2_BIT_MAPPING_CH0_MASK (1<<IOMUXC_GPR2_BIT_MAPPING_CH0_OFFSET)
349#define IOMUXC_GPR2_BIT_MAPPING_CH0_JEIDA (IOMUXC_GPR2_BITMAP_JEIDA<<IOMUXC_GPR2_BIT_MAPPING_CH0_OFFSET)
350#define IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG (IOMUXC_GPR2_BITMAP_SPWG<<IOMUXC_GPR2_BIT_MAPPING_CH0_OFFSET)
351
352#define IOMUXC_GPR2_DATA_WIDTH_CH0_OFFSET 5
353#define IOMUXC_GPR2_DATA_WIDTH_CH0_MASK (1<<IOMUXC_GPR2_DATA_WIDTH_CH0_OFFSET)
354#define IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT (IOMUXC_GPR2_DATA_WIDTH_18<<IOMUXC_GPR2_DATA_WIDTH_CH0_OFFSET)
355#define IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT (IOMUXC_GPR2_DATA_WIDTH_24<<IOMUXC_GPR2_DATA_WIDTH_CH0_OFFSET)
356
357#define IOMUXC_GPR2_SPLIT_MODE_EN_OFFSET 4
358#define IOMUXC_GPR2_SPLIT_MODE_EN_MASK (1<<IOMUXC_GPR2_SPLIT_MODE_EN_OFFSET)
359
360#define IOMUXC_GPR2_MODE_DISABLED 0
361#define IOMUXC_GPR2_MODE_ENABLED_DI0 1
Pierre Aubert7aa1e8b2013-06-19 11:16:13 +0200362#define IOMUXC_GPR2_MODE_ENABLED_DI1 3
Eric Nelsonde710a12012-09-19 08:32:31 +0000363
364#define IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET 2
365#define IOMUXC_GPR2_LVDS_CH1_MODE_MASK (3<<IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET)
366#define IOMUXC_GPR2_LVDS_CH1_MODE_DISABLED (IOMUXC_GPR2_MODE_DISABLED<<IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET)
367#define IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI0 (IOMUXC_GPR2_MODE_ENABLED_DI0<<IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET)
368#define IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI1 (IOMUXC_GPR2_MODE_ENABLED_DI1<<IOMUXC_GPR2_LVDS_CH1_MODE_OFFSET)
369
370#define IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET 0
371#define IOMUXC_GPR2_LVDS_CH0_MODE_MASK (3<<IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET)
372#define IOMUXC_GPR2_LVDS_CH0_MODE_DISABLED (IOMUXC_GPR2_MODE_DISABLED<<IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET)
373#define IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI0 (IOMUXC_GPR2_MODE_ENABLED_DI0<<IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET)
374#define IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI1 (IOMUXC_GPR2_MODE_ENABLED_DI1<<IOMUXC_GPR2_LVDS_CH0_MODE_OFFSET)
375
Eric Nelsond5c37c92012-01-31 07:52:04 +0000376/* ECSPI registers */
377struct cspi_regs {
378 u32 rxdata;
379 u32 txdata;
380 u32 ctrl;
381 u32 cfg;
382 u32 intr;
383 u32 dma;
384 u32 stat;
385 u32 period;
386};
387
388/*
389 * CSPI register definitions
390 */
391#define MXC_ECSPI
392#define MXC_CSPICTRL_EN (1 << 0)
393#define MXC_CSPICTRL_MODE (1 << 1)
394#define MXC_CSPICTRL_XCH (1 << 2)
Fabio Estevam0f1411b2013-04-09 13:06:25 +0000395#define MXC_CSPICTRL_MODE_MASK (0xf << 4)
Eric Nelsond5c37c92012-01-31 07:52:04 +0000396#define MXC_CSPICTRL_CHIPSELECT(x) (((x) & 0x3) << 12)
397#define MXC_CSPICTRL_BITCOUNT(x) (((x) & 0xfff) << 20)
398#define MXC_CSPICTRL_PREDIV(x) (((x) & 0xF) << 12)
399#define MXC_CSPICTRL_POSTDIV(x) (((x) & 0xF) << 8)
400#define MXC_CSPICTRL_SELCHAN(x) (((x) & 0x3) << 18)
401#define MXC_CSPICTRL_MAXBITS 0xfff
402#define MXC_CSPICTRL_TC (1 << 7)
403#define MXC_CSPICTRL_RXOVF (1 << 6)
404#define MXC_CSPIPERIOD_32KHZ (1 << 15)
405#define MAX_SPI_BYTES 32
406
407/* Bit position inside CTRL register to be associated with SS */
408#define MXC_CSPICTRL_CHAN 18
409
410/* Bit position inside CON register to be associated with SS */
Markus Niebeld7cbcc72014-02-17 17:33:16 +0100411#define MXC_CSPICON_PHA 0 /* SCLK phase control */
412#define MXC_CSPICON_POL 4 /* SCLK polarity */
413#define MXC_CSPICON_SSPOL 12 /* SS polarity */
414#define MXC_CSPICON_CTL 20 /* inactive state of SCLK */
Markus Niebel060aaad2014-02-17 17:33:18 +0100415#if defined(CONFIG_MX6SL) || defined(CONFIG_MX6DL)
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000416#define MXC_SPI_BASE_ADDRESSES \
417 ECSPI1_BASE_ADDR, \
418 ECSPI2_BASE_ADDR, \
419 ECSPI3_BASE_ADDR, \
420 ECSPI4_BASE_ADDR
421#else
Eric Nelsond5c37c92012-01-31 07:52:04 +0000422#define MXC_SPI_BASE_ADDRESSES \
423 ECSPI1_BASE_ADDR, \
424 ECSPI2_BASE_ADDR, \
425 ECSPI3_BASE_ADDR, \
426 ECSPI4_BASE_ADDR, \
427 ECSPI5_BASE_ADDR
Fabio Estevam25b4aa12013-04-10 09:32:57 +0000428#endif
Eric Nelsond5c37c92012-01-31 07:52:04 +0000429
Benoît Thébaudeau8f3ff112013-04-23 10:17:38 +0000430struct ocotp_regs {
Jason Liu23608e22011-11-25 00:18:02 +0000431 u32 ctrl;
432 u32 ctrl_set;
433 u32 ctrl_clr;
434 u32 ctrl_tog;
435 u32 timing;
436 u32 rsvd0[3];
437 u32 data;
438 u32 rsvd1[3];
439 u32 read_ctrl;
440 u32 rsvd2[3];
Benoît Thébaudeau8f3ff112013-04-23 10:17:38 +0000441 u32 read_fuse_data;
Jason Liu23608e22011-11-25 00:18:02 +0000442 u32 rsvd3[3];
Benoît Thébaudeau8f3ff112013-04-23 10:17:38 +0000443 u32 sw_sticky;
Jason Liu23608e22011-11-25 00:18:02 +0000444 u32 rsvd4[3];
445 u32 scs;
446 u32 scs_set;
447 u32 scs_clr;
448 u32 scs_tog;
449 u32 crc_addr;
450 u32 rsvd5[3];
451 u32 crc_value;
452 u32 rsvd6[3];
453 u32 version;
Jason Liubd2e27c2011-12-19 02:38:13 +0000454 u32 rsvd7[0xdb];
Jason Liu23608e22011-11-25 00:18:02 +0000455
456 struct fuse_bank {
457 u32 fuse_regs[0x20];
Benoît Thébaudeau8f3ff112013-04-23 10:17:38 +0000458 } bank[16];
Jason Liu23608e22011-11-25 00:18:02 +0000459};
460
Benoît Thébaudeau6adbd302013-04-23 10:17:39 +0000461struct fuse_bank0_regs {
462 u32 lock;
463 u32 rsvd0[3];
464 u32 uid_low;
465 u32 rsvd1[3];
466 u32 uid_high;
Stefano Babicb83c7092013-06-28 00:20:21 +0200467 u32 rsvd2[3];
468 u32 rsvd3[4];
469 u32 rsvd4[4];
470 u32 rsvd5[4];
471 u32 cfg5;
472 u32 rsvd6[3];
473 u32 rsvd7[4];
Benoît Thébaudeau6adbd302013-04-23 10:17:39 +0000474};
475
Jason Liu23608e22011-11-25 00:18:02 +0000476struct fuse_bank4_regs {
477 u32 sjc_resp_low;
478 u32 rsvd0[3];
479 u32 sjc_resp_high;
480 u32 rsvd1[3];
481 u32 mac_addr_low;
482 u32 rsvd2[3];
483 u32 mac_addr_high;
Benoît Thébaudeau8f3ff112013-04-23 10:17:38 +0000484 u32 rsvd3[0xb];
485 u32 gp1;
Benoît Thébaudeau6adbd302013-04-23 10:17:39 +0000486 u32 rsvd4[3];
487 u32 gp2;
488 u32 rsvd5[3];
Jason Liu23608e22011-11-25 00:18:02 +0000489};
490
Jason Liuf2f77452012-01-10 00:52:59 +0000491struct aipstz_regs {
492 u32 mprot0;
493 u32 mprot1;
494 u32 rsvd[0xe];
495 u32 opacr0;
496 u32 opacr1;
497 u32 opacr2;
498 u32 opacr3;
499 u32 opacr4;
500};
501
Fabio Estevama7683862012-03-20 04:21:45 +0000502struct anatop_regs {
503 u32 pll_sys; /* 0x000 */
504 u32 pll_sys_set; /* 0x004 */
505 u32 pll_sys_clr; /* 0x008 */
506 u32 pll_sys_tog; /* 0x00c */
507 u32 usb1_pll_480_ctrl; /* 0x010 */
508 u32 usb1_pll_480_ctrl_set; /* 0x014 */
509 u32 usb1_pll_480_ctrl_clr; /* 0x018 */
510 u32 usb1_pll_480_ctrl_tog; /* 0x01c */
511 u32 usb2_pll_480_ctrl; /* 0x020 */
512 u32 usb2_pll_480_ctrl_set; /* 0x024 */
513 u32 usb2_pll_480_ctrl_clr; /* 0x028 */
514 u32 usb2_pll_480_ctrl_tog; /* 0x02c */
515 u32 pll_528; /* 0x030 */
516 u32 pll_528_set; /* 0x034 */
517 u32 pll_528_clr; /* 0x038 */
518 u32 pll_528_tog; /* 0x03c */
519 u32 pll_528_ss; /* 0x040 */
520 u32 rsvd0[3];
521 u32 pll_528_num; /* 0x050 */
522 u32 rsvd1[3];
523 u32 pll_528_denom; /* 0x060 */
524 u32 rsvd2[3];
525 u32 pll_audio; /* 0x070 */
526 u32 pll_audio_set; /* 0x074 */
527 u32 pll_audio_clr; /* 0x078 */
528 u32 pll_audio_tog; /* 0x07c */
529 u32 pll_audio_num; /* 0x080 */
530 u32 rsvd3[3];
531 u32 pll_audio_denom; /* 0x090 */
532 u32 rsvd4[3];
533 u32 pll_video; /* 0x0a0 */
534 u32 pll_video_set; /* 0x0a4 */
535 u32 pll_video_clr; /* 0x0a8 */
536 u32 pll_video_tog; /* 0x0ac */
537 u32 pll_video_num; /* 0x0b0 */
538 u32 rsvd5[3];
539 u32 pll_video_denom; /* 0x0c0 */
540 u32 rsvd6[3];
541 u32 pll_mlb; /* 0x0d0 */
542 u32 pll_mlb_set; /* 0x0d4 */
543 u32 pll_mlb_clr; /* 0x0d8 */
544 u32 pll_mlb_tog; /* 0x0dc */
545 u32 pll_enet; /* 0x0e0 */
546 u32 pll_enet_set; /* 0x0e4 */
547 u32 pll_enet_clr; /* 0x0e8 */
548 u32 pll_enet_tog; /* 0x0ec */
549 u32 pfd_480; /* 0x0f0 */
550 u32 pfd_480_set; /* 0x0f4 */
551 u32 pfd_480_clr; /* 0x0f8 */
552 u32 pfd_480_tog; /* 0x0fc */
553 u32 pfd_528; /* 0x100 */
554 u32 pfd_528_set; /* 0x104 */
555 u32 pfd_528_clr; /* 0x108 */
556 u32 pfd_528_tog; /* 0x10c */
557 u32 reg_1p1; /* 0x110 */
558 u32 reg_1p1_set; /* 0x114 */
559 u32 reg_1p1_clr; /* 0x118 */
560 u32 reg_1p1_tog; /* 0x11c */
561 u32 reg_3p0; /* 0x120 */
562 u32 reg_3p0_set; /* 0x124 */
563 u32 reg_3p0_clr; /* 0x128 */
564 u32 reg_3p0_tog; /* 0x12c */
565 u32 reg_2p5; /* 0x130 */
566 u32 reg_2p5_set; /* 0x134 */
567 u32 reg_2p5_clr; /* 0x138 */
568 u32 reg_2p5_tog; /* 0x13c */
569 u32 reg_core; /* 0x140 */
570 u32 reg_core_set; /* 0x144 */
571 u32 reg_core_clr; /* 0x148 */
572 u32 reg_core_tog; /* 0x14c */
573 u32 ana_misc0; /* 0x150 */
574 u32 ana_misc0_set; /* 0x154 */
575 u32 ana_misc0_clr; /* 0x158 */
576 u32 ana_misc0_tog; /* 0x15c */
577 u32 ana_misc1; /* 0x160 */
578 u32 ana_misc1_set; /* 0x164 */
579 u32 ana_misc1_clr; /* 0x168 */
580 u32 ana_misc1_tog; /* 0x16c */
581 u32 ana_misc2; /* 0x170 */
582 u32 ana_misc2_set; /* 0x174 */
583 u32 ana_misc2_clr; /* 0x178 */
584 u32 ana_misc2_tog; /* 0x17c */
585 u32 tempsense0; /* 0x180 */
586 u32 tempsense0_set; /* 0x184 */
587 u32 tempsense0_clr; /* 0x188 */
588 u32 tempsense0_tog; /* 0x18c */
589 u32 tempsense1; /* 0x190 */
590 u32 tempsense1_set; /* 0x194 */
591 u32 tempsense1_clr; /* 0x198 */
592 u32 tempsense1_tog; /* 0x19c */
593 u32 usb1_vbus_detect; /* 0x1a0 */
594 u32 usb1_vbus_detect_set; /* 0x1a4 */
595 u32 usb1_vbus_detect_clr; /* 0x1a8 */
596 u32 usb1_vbus_detect_tog; /* 0x1ac */
597 u32 usb1_chrg_detect; /* 0x1b0 */
598 u32 usb1_chrg_detect_set; /* 0x1b4 */
599 u32 usb1_chrg_detect_clr; /* 0x1b8 */
600 u32 usb1_chrg_detect_tog; /* 0x1bc */
601 u32 usb1_vbus_det_stat; /* 0x1c0 */
602 u32 usb1_vbus_det_stat_set; /* 0x1c4 */
603 u32 usb1_vbus_det_stat_clr; /* 0x1c8 */
604 u32 usb1_vbus_det_stat_tog; /* 0x1cc */
605 u32 usb1_chrg_det_stat; /* 0x1d0 */
606 u32 usb1_chrg_det_stat_set; /* 0x1d4 */
607 u32 usb1_chrg_det_stat_clr; /* 0x1d8 */
608 u32 usb1_chrg_det_stat_tog; /* 0x1dc */
609 u32 usb1_loopback; /* 0x1e0 */
610 u32 usb1_loopback_set; /* 0x1e4 */
611 u32 usb1_loopback_clr; /* 0x1e8 */
612 u32 usb1_loopback_tog; /* 0x1ec */
613 u32 usb1_misc; /* 0x1f0 */
614 u32 usb1_misc_set; /* 0x1f4 */
615 u32 usb1_misc_clr; /* 0x1f8 */
616 u32 usb1_misc_tog; /* 0x1fc */
617 u32 usb2_vbus_detect; /* 0x200 */
618 u32 usb2_vbus_detect_set; /* 0x204 */
619 u32 usb2_vbus_detect_clr; /* 0x208 */
620 u32 usb2_vbus_detect_tog; /* 0x20c */
621 u32 usb2_chrg_detect; /* 0x210 */
622 u32 usb2_chrg_detect_set; /* 0x214 */
623 u32 usb2_chrg_detect_clr; /* 0x218 */
624 u32 usb2_chrg_detect_tog; /* 0x21c */
625 u32 usb2_vbus_det_stat; /* 0x220 */
626 u32 usb2_vbus_det_stat_set; /* 0x224 */
627 u32 usb2_vbus_det_stat_clr; /* 0x228 */
628 u32 usb2_vbus_det_stat_tog; /* 0x22c */
629 u32 usb2_chrg_det_stat; /* 0x230 */
630 u32 usb2_chrg_det_stat_set; /* 0x234 */
631 u32 usb2_chrg_det_stat_clr; /* 0x238 */
632 u32 usb2_chrg_det_stat_tog; /* 0x23c */
633 u32 usb2_loopback; /* 0x240 */
634 u32 usb2_loopback_set; /* 0x244 */
635 u32 usb2_loopback_clr; /* 0x248 */
636 u32 usb2_loopback_tog; /* 0x24c */
637 u32 usb2_misc; /* 0x250 */
638 u32 usb2_misc_set; /* 0x254 */
639 u32 usb2_misc_clr; /* 0x258 */
640 u32 usb2_misc_tog; /* 0x25c */
641 u32 digprog; /* 0x260 */
Troy Kisky20332a02012-10-23 10:57:46 +0000642 u32 reserved1[7];
643 u32 digprog_sololite; /* 0x280 */
Fabio Estevama7683862012-03-20 04:21:45 +0000644};
645
Eric Nelson3fc41762013-08-29 12:37:35 -0700646#define ANATOP_PFD_FRAC_SHIFT(n) ((n)*8)
647#define ANATOP_PFD_FRAC_MASK(n) (0x3f<<ANATOP_PFD_FRAC_SHIFT(n))
648#define ANATOP_PFD_STABLE_SHIFT(n) (6+((n)*8))
649#define ANATOP_PFD_STABLE_MASK(n) (1<<ANATOP_PFD_STABLE_SHIFT(n))
650#define ANATOP_PFD_CLKGATE_SHIFT(n) (7+((n)*8))
651#define ANATOP_PFD_CLKGATE_MASK(n) (1<<ANATOP_PFD_CLKGATE_SHIFT(n))
Eric Nelsone66ad6e2012-09-19 08:29:46 +0000652
Eric Nelson64e7cdb2012-03-27 09:52:21 +0000653struct iomuxc_base_regs {
654 u32 gpr[14]; /* 0x000 */
655 u32 obsrv[5]; /* 0x038 */
656 u32 swmux_ctl[197]; /* 0x04c */
657 u32 swpad_ctl[250]; /* 0x360 */
658 u32 swgrp[26]; /* 0x748 */
659 u32 daisy[104]; /* 0x7b0..94c */
660};
661
Fabio Estevam76c91e62013-02-07 06:45:23 +0000662struct wdog_regs {
663 u16 wcr; /* Control */
664 u16 wsr; /* Service */
665 u16 wrsr; /* Reset Status */
666 u16 wicr; /* Interrupt Control */
667 u16 wmcr; /* Miscellaneous Control */
668};
669
Jason Liu23608e22011-11-25 00:18:02 +0000670#endif /* __ASSEMBLER__*/
671#endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */