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