Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. |
| 3 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __ASM_ARCH_MX6_IMX_REGS_H__ |
| 8 | #define __ASM_ARCH_MX6_IMX_REGS_H__ |
| 9 | |
Benoît Thébaudeau | 8e99ecd | 2012-08-13 07:27:58 +0000 | [diff] [blame] | 10 | #define ARCH_MXC |
| 11 | |
Peng Fan | d73d5ae | 2015-07-20 19:28:24 +0800 | [diff] [blame] | 12 | #ifdef CONFIG_MX6UL |
| 13 | #define CONFIG_SYS_CACHELINE_SIZE 64 |
| 14 | #else |
Eric Nelson | c415919 | 2012-03-04 11:47:37 +0000 | [diff] [blame] | 15 | #define CONFIG_SYS_CACHELINE_SIZE 32 |
Peng Fan | d73d5ae | 2015-07-20 19:28:24 +0800 | [diff] [blame] | 16 | #endif |
Eric Nelson | c415919 | 2012-03-04 11:47:37 +0000 | [diff] [blame] | 17 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 18 | #define ROMCP_ARB_BASE_ADDR 0x00000000 |
| 19 | #define ROMCP_ARB_END_ADDR 0x000FFFFF |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 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 |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 26 | #elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 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 | |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 35 | #else |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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 |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 48 | #endif /* CONFIG_MX6SL */ |
Stefan Roese | 99193e3 | 2013-04-09 21:06:09 +0000 | [diff] [blame] | 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 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 54 | /* GPV - PL301 configuration ports */ |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 55 | #if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 56 | #define GPV2_BASE_ADDR 0x00D00000 |
| 57 | #else |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 58 | #define GPV2_BASE_ADDR 0x00200000 |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 59 | #endif |
| 60 | |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 61 | #if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 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 |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 70 | #define GPV3_BASE_ADDR 0x00300000 |
| 71 | #define GPV4_BASE_ADDR 0x00800000 |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 72 | #define PCIE_ARB_BASE_ADDR 0x01000000 |
| 73 | #define PCIE_ARB_END_ADDR 0x01FFFFFF |
| 74 | #endif |
| 75 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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 |
Fabio Estevam | 6d73c23 | 2014-01-29 17:39:49 -0200 | [diff] [blame] | 82 | #define L2_PL310_BASE 0x00A02000 |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 83 | #define GPV0_BASE_ADDR 0x00B00000 |
| 84 | #define GPV1_BASE_ADDR 0x00C00000 |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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 |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 90 | /* AIPS3 only on i.MX6SX */ |
Ye.Li | e8cdeef | 2015-01-14 17:18:12 +0800 | [diff] [blame] | 91 | #define AIPS3_ARB_BASE_ADDR 0x02200000 |
| 92 | #define AIPS3_ARB_END_ADDR 0x022FFFFF |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 93 | #ifdef CONFIG_MX6SX |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 94 | #define WEIM_ARB_BASE_ADDR 0x50000000 |
| 95 | #define WEIM_ARB_END_ADDR 0x57FFFFFF |
Peng Fan | b93ab2e | 2014-12-31 11:01:38 +0800 | [diff] [blame] | 96 | #define QSPI0_AMBA_BASE 0x60000000 |
| 97 | #define QSPI0_AMBA_END 0x6FFFFFFF |
| 98 | #define QSPI1_AMBA_BASE 0x70000000 |
| 99 | #define QSPI1_AMBA_END 0x7FFFFFFF |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 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 |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 105 | #else |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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 |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 118 | #endif |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 119 | |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 120 | #if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 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 |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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 |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 130 | #endif |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 131 | |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 132 | #ifndef CONFIG_MX6SX |
Fabio Estevam | 05d4df1 | 2012-05-31 07:23:55 +0000 | [diff] [blame] | 133 | #define IPU_SOC_BASE_ADDR IPU1_ARB_BASE_ADDR |
| 134 | #define IPU_SOC_OFFSET 0x00200000 |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 135 | #endif |
Fabio Estevam | 05d4df1 | 2012-05-31 07:23:55 +0000 | [diff] [blame] | 136 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 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 |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 158 | #ifndef CONFIG_MX6SX |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 159 | #define ECSPI5_BASE_ADDR (ATZ1_BASE_ADDR + 0x18000) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 160 | #endif |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 167 | #endif |
| 168 | |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 169 | #ifndef CONFIG_MX6SX |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 170 | #define SPBA_BASE_ADDR (ATZ1_BASE_ADDR + 0x3C000) |
| 171 | #define VPU_BASE_ADDR (ATZ1_BASE_ADDR + 0x40000) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 172 | #endif |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Wolfgang Grandegger | 3f46752 | 2012-02-08 22:33:25 +0000 | [diff] [blame] | 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) |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 196 | #define CCM_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x44000) |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 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) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 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) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 214 | #else |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 218 | #endif |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Raul Cardenas | 0200020 | 2015-02-27 11:22:06 -0600 | [diff] [blame] | 224 | |
| 225 | #define CONFIG_SYS_FSL_SEC_ADDR CAAM_BASE_ADDR |
| 226 | #define CONFIG_SYS_FSL_JR0_ADDR (CAAM_BASE_ADDR + 0x1000) |
| 227 | |
Ye.Li | 5546ad0 | 2014-09-15 17:23:14 +0800 | [diff] [blame] | 228 | #define USB_PL301_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x0000) |
| 229 | #define USB_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4000) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 230 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 231 | #define ENET_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x8000) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 232 | #ifdef CONFIG_MX6SL |
| 233 | #define MSHC_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0xC000) |
| 234 | #else |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 235 | #define MLB_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0xC000) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 236 | #endif |
| 237 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 247 | /* i.MX6SL */ |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 248 | #define RNGB_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000) |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 249 | #ifdef CONFIG_MX6UL |
| 250 | #define ENET2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x34000) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 251 | #else |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 252 | /* i.MX6SX */ |
| 253 | #define ENET2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 254 | #endif |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 255 | /* i.MX6DQ/SDL */ |
| 256 | #define MMDC_P1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 257 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 263 | #ifdef CONFIG_MX6SX |
| 264 | #define DEBUG_MONITOR_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4C000) |
| 265 | #else |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 266 | #define IP2APB_PERFMON3_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4C000) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 267 | #endif |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 268 | #define IP2APB_TZASC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x50000) |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 269 | #ifdef CONFIG_MX6UL |
| 270 | #define QSPI0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x60000) |
| 271 | #elif defined(CONFIG_MX6SX) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 272 | #define SAI1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x54000) |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 273 | #define AUDMUX_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x58000) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 274 | #define SAI2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x5C000) |
Peng Fan | b93ab2e | 2014-12-31 11:01:38 +0800 | [diff] [blame] | 275 | #define QSPI0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x60000) |
| 276 | #define QSPI1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x64000) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 277 | #else |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 278 | #define IP2APB_TZASC2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x54000) |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 282 | #endif |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 283 | #define MX6UL_WDOG3_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x64000) |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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) |
Heiko Schocher | 21a2694 | 2015-05-18 10:56:24 +0200 | [diff] [blame] | 288 | #define I2C4_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x78000) |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 289 | #define IP2APB_USBPHY1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x78000) |
| 290 | #define IP2APB_USBPHY2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x7C000) |
| 291 | |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 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) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 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 |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 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) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 323 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 324 | #define CHIP_REV_1_0 0x10 |
Stefano Babic | f2f07e8 | 2014-06-10 10:26:22 +0200 | [diff] [blame] | 325 | #define CHIP_REV_1_2 0x12 |
| 326 | #define CHIP_REV_1_5 0x15 |
Peng Fan | f9a1e9f | 2015-06-11 18:30:37 +0800 | [diff] [blame] | 327 | #define CHIP_REV_2_0 0x20 |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 328 | #if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 329 | #define IRAM_SIZE 0x00040000 |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 330 | #else |
| 331 | #define IRAM_SIZE 0x00020000 |
| 332 | #endif |
Troy Kisky | 28774cb | 2012-02-07 14:08:46 +0000 | [diff] [blame] | 333 | #define FEC_QUIRK_ENET_MAC |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 334 | |
| 335 | #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) |
| 336 | #include <asm/types.h> |
| 337 | |
Fabio Estevam | be252b6 | 2011-12-20 05:46:31 +0000 | [diff] [blame] | 338 | extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac); |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 339 | |
Gabriel Huau | a76df70 | 2014-07-26 11:35:43 -0700 | [diff] [blame] | 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 | |
Fabio Estevam | 573960a | 2014-11-14 11:27:22 -0200 | [diff] [blame] | 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 | |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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 | |
Fabio Estevam | 3a21773 | 2014-01-03 15:55:58 -0200 | [diff] [blame] | 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) |
Heiko Schocher | 4a4d3a7 | 2014-07-18 06:07:17 +0200 | [diff] [blame] | 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) |
Fabio Estevam | 3a21773 | 2014-01-03 15:55:58 -0200 | [diff] [blame] | 416 | |
Eric Nelson | a83e1b7 | 2012-09-21 11:41:42 +0000 | [diff] [blame] | 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 | |
Eric Nelson | de710a1 | 2012-09-19 08:32:31 +0000 | [diff] [blame] | 465 | struct iomuxc { |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 466 | #if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) |
Fabio Estevam | aeadf06 | 2014-07-09 17:59:55 -0300 | [diff] [blame] | 467 | u8 reserved[0x4000]; |
| 468 | #endif |
Eric Nelson | de710a1 | 2012-09-19 08:32:31 +0000 | [diff] [blame] | 469 | u32 gpr[14]; |
Eric Nelson | de710a1 | 2012-09-19 08:32:31 +0000 | [diff] [blame] | 470 | }; |
| 471 | |
Fabio Estevam | ac17dcf | 2014-08-25 14:26:44 -0300 | [diff] [blame] | 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 | |
Eric Nelson | de710a1 | 2012-09-19 08:32:31 +0000 | [diff] [blame] | 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 |
Pierre Aubert | 7aa1e8b | 2013-06-19 11:16:13 +0200 | [diff] [blame] | 538 | #define IOMUXC_GPR2_MODE_ENABLED_DI1 3 |
Eric Nelson | de710a1 | 2012-09-19 08:32:31 +0000 | [diff] [blame] | 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 | |
Eric Nelson | d5c37c9 | 2012-01-31 07:52:04 +0000 | [diff] [blame] | 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) |
Fabio Estevam | 0f1411b | 2013-04-09 13:06:25 +0000 | [diff] [blame] | 571 | #define MXC_CSPICTRL_MODE_MASK (0xf << 4) |
Eric Nelson | d5c37c9 | 2012-01-31 07:52:04 +0000 | [diff] [blame] | 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 |
Heiko Schocher | a0ae009 | 2014-07-18 06:07:20 +0200 | [diff] [blame] | 582 | #define SPI_MAX_NUM 4 |
Eric Nelson | d5c37c9 | 2012-01-31 07:52:04 +0000 | [diff] [blame] | 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 */ |
Markus Niebel | d7cbcc7 | 2014-02-17 17:33:16 +0100 | [diff] [blame] | 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 */ |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 592 | #if defined(CONFIG_MX6SL) || defined(CONFIG_MX6DL) || defined(CONFIG_MX6UL) |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 593 | #define MXC_SPI_BASE_ADDRESSES \ |
| 594 | ECSPI1_BASE_ADDR, \ |
| 595 | ECSPI2_BASE_ADDR, \ |
| 596 | ECSPI3_BASE_ADDR, \ |
| 597 | ECSPI4_BASE_ADDR |
| 598 | #else |
Eric Nelson | d5c37c9 | 2012-01-31 07:52:04 +0000 | [diff] [blame] | 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 |
Fabio Estevam | 25b4aa1 | 2013-04-10 09:32:57 +0000 | [diff] [blame] | 605 | #endif |
Eric Nelson | d5c37c9 | 2012-01-31 07:52:04 +0000 | [diff] [blame] | 606 | |
Benoît Thébaudeau | 8f3ff11 | 2013-04-23 10:17:38 +0000 | [diff] [blame] | 607 | struct ocotp_regs { |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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]; |
Benoît Thébaudeau | 8f3ff11 | 2013-04-23 10:17:38 +0000 | [diff] [blame] | 618 | u32 read_fuse_data; |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 619 | u32 rsvd3[3]; |
Benoît Thébaudeau | 8f3ff11 | 2013-04-23 10:17:38 +0000 | [diff] [blame] | 620 | u32 sw_sticky; |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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; |
Jason Liu | bd2e27c | 2011-12-19 02:38:13 +0000 | [diff] [blame] | 631 | u32 rsvd7[0xdb]; |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 632 | |
| 633 | struct fuse_bank { |
| 634 | u32 fuse_regs[0x20]; |
Benoît Thébaudeau | 8f3ff11 | 2013-04-23 10:17:38 +0000 | [diff] [blame] | 635 | } bank[16]; |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 636 | }; |
| 637 | |
Benoît Thébaudeau | 6adbd30 | 2013-04-23 10:17:39 +0000 | [diff] [blame] | 638 | struct fuse_bank0_regs { |
| 639 | u32 lock; |
| 640 | u32 rsvd0[3]; |
| 641 | u32 uid_low; |
| 642 | u32 rsvd1[3]; |
| 643 | u32 uid_high; |
Stefano Babic | b83c709 | 2013-06-28 00:20:21 +0200 | [diff] [blame] | 644 | u32 rsvd2[3]; |
Peng Fan | 1730af1 | 2015-01-09 16:59:40 +0800 | [diff] [blame] | 645 | u32 cfg2; |
| 646 | u32 rsvd3[3]; |
| 647 | u32 cfg3; |
| 648 | u32 rsvd4[3]; |
| 649 | u32 cfg4; |
| 650 | u32 rsvd5[3]; |
Stefano Babic | b83c709 | 2013-06-28 00:20:21 +0200 | [diff] [blame] | 651 | u32 cfg5; |
| 652 | u32 rsvd6[3]; |
Peng Fan | 1730af1 | 2015-01-09 16:59:40 +0800 | [diff] [blame] | 653 | u32 cfg6; |
| 654 | u32 rsvd7[3]; |
Benoît Thébaudeau | 6adbd30 | 2013-04-23 10:17:39 +0000 | [diff] [blame] | 655 | }; |
| 656 | |
Tim Harvey | d43e0ab | 2015-05-18 06:56:44 -0700 | [diff] [blame] | 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 | |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 676 | #if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 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; |
Peng Fan | bc32fc6 | 2015-07-20 19:28:23 +0800 | [diff] [blame] | 689 | u32 rsvd5[3]; |
| 690 | u32 gp2; |
| 691 | u32 rsvd6[3]; |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 692 | }; |
| 693 | #else |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 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; |
Benoît Thébaudeau | 8f3ff11 | 2013-04-23 10:17:38 +0000 | [diff] [blame] | 702 | u32 rsvd3[0xb]; |
| 703 | u32 gp1; |
Benoît Thébaudeau | 6adbd30 | 2013-04-23 10:17:39 +0000 | [diff] [blame] | 704 | u32 rsvd4[3]; |
| 705 | u32 gp2; |
| 706 | u32 rsvd5[3]; |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 707 | }; |
Fabio Estevam | 05d54b8 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 708 | #endif |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 709 | |
Jason Liu | f2f7745 | 2012-01-10 00:52:59 +0000 | [diff] [blame] | 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 | |
Fabio Estevam | a768386 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 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 */ |
Troy Kisky | 20332a0 | 2012-10-23 10:57:46 +0000 | [diff] [blame] | 861 | u32 reserved1[7]; |
| 862 | u32 digprog_sololite; /* 0x280 */ |
Fabio Estevam | a768386 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 863 | }; |
| 864 | |
Eric Nelson | 3fc4176 | 2013-08-29 12:37:35 -0700 | [diff] [blame] | 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)) |
Eric Nelson | e66ad6e | 2012-09-19 08:29:46 +0000 | [diff] [blame] | 871 | |
Fabio Estevam | 76c91e6 | 2013-02-07 06:45:23 +0000 | [diff] [blame] | 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 | |
Heiko Schocher | aafe402 | 2014-07-18 06:07:18 +0200 | [diff] [blame] | 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 | }; |
Jason Liu | 23608e2 | 2011-11-25 00:18:02 +0000 | [diff] [blame] | 896 | #endif /* __ASSEMBLER__*/ |
| 897 | #endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */ |