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