3 * Texas Instruments, <www.ti.com>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 #ifndef _OMAP34XX_CPU_H
26 #define _OMAP34XX_CPU_H
27 #include <asm/arch/omap3430.h>
29 /* Register offsets of common modules */
31 #define CONTROL_STATUS (OMAP34XX_CTRL_BASE + 0x2F0)
32 #define OMAP34XX_MCR (OMAP34XX_CTRL_BASE + 0x8C)
33 #define CONTROL_SCALABLE_OMAP_STATUS (OMAP34XX_CTRL_BASE + 0x44C)
34 #define CONTROL_SCALABLE_OMAP_OCP (OMAP34XX_CTRL_BASE + 0x534)
38 #define TAP_IDCODE_REG (OMAP34XX_TAP_BASE+0x204)
39 #define PRODUCTION_ID (OMAP34XX_TAP_BASE+0x208)
42 #define DEVICE_MASK (BIT8|BIT9|BIT10)
43 #define TST_DEVICE 0x0
44 #define EMU_DEVICE 0x1
48 /* We are not concerned with BIT5 as it only determines
49 * the prirotiy between memory or perpheral booting
51 #define SYSBOOT_MASK (BIT0|BIT1|BIT2|BIT3|BIT4)
53 /* GPMC CS3/cs4/cs6 not avaliable */
54 #define GPMC_BASE (OMAP34XX_GPMC_BASE)
55 #define GPMC_SYSCONFIG (OMAP34XX_GPMC_BASE+0x10)
56 #define GPMC_IRQSTATUS (OMAP34XX_GPMC_BASE+0x18)
57 #define GPMC_IRQENABLE (OMAP34XX_GPMC_BASE+0x1C)
58 #define GPMC_TIMEOUT_CONTROL (OMAP34XX_GPMC_BASE+0x40)
59 #define GPMC_CONFIG (OMAP34XX_GPMC_BASE+0x50)
60 #define GPMC_STATUS (OMAP34XX_GPMC_BASE+0x54)
62 #define GPMC_CONFIG_CS0 (OMAP34XX_GPMC_BASE+0x60)
63 #define GPMC_CONFIG_WIDTH (0x30)
65 #define GPMC_CONFIG1 (0x00)
66 #define GPMC_CONFIG2 (0x04)
67 #define GPMC_CONFIG3 (0x08)
68 #define GPMC_CONFIG4 (0x0C)
69 #define GPMC_CONFIG5 (0x10)
70 #define GPMC_CONFIG6 (0x14)
71 #define GPMC_CONFIG7 (0x18)
72 #define GPMC_NAND_CMD (0x1C)
73 #define GPMC_NAND_ADR (0x20)
74 #define GPMC_NAND_DAT (0x24)
76 #define GPMC_ECC_CONFIG (0x1F4)
77 #define GPMC_ECC_CONTROL (0x1F8)
78 #define GPMC_ECC_SIZE_CONFIG (0x1FC)
79 #define GPMC_ECC1_RESULT (0x200)
80 #define GPMC_ECC2_RESULT (0x204)
81 #define GPMC_ECC3_RESULT (0x208)
82 #define GPMC_ECC4_RESULT (0x20C)
83 #define GPMC_ECC5_RESULT (0x210)
84 #define GPMC_ECC6_RESULT (0x214)
85 #define GPMC_ECC7_RESULT (0x218)
86 #define GPMC_ECC8_RESULT (0x21C)
87 #define GPMC_ECC9_RESULT (0x220)
91 # define FLASH_BASE 0x10000000 /* NOR flash (aligned to 256 Meg) */
92 # define FLASH_BASE_SDPV1 0x04000000 /* NOR flash (aligned to 64 Meg) */
93 # define FLASH_BASE_SDPV2 0x10000000 /* NOR flash (aligned to 256 Meg) */
94 # define DEBUG_BASE 0x08000000 /* debug board */
95 # define NAND_BASE 0x30000000 /* NAND addr (actual size small port)*/
96 # define PISMO2_BASE 0x18000000 /* PISMO2 CS1/2 */
97 # define ONENAND_MAP 0x20000000 /* OneNand addr (actual size small port */
100 #define SMS_SYSCONFIG (OMAP34XX_SMS_BASE+0x10)
101 #define SMS_RG_ATT0 (OMAP34XX_SMS_BASE+0x48)
102 #define SMS_CLASS_ARB0 (OMAP34XX_SMS_BASE+0xD0)
103 #define BURSTCOMPLETE_GROUP7 BIT31
106 #define SDRC_SYSCONFIG (OMAP34XX_SDRC_BASE+0x10)
107 #define SDRC_STATUS (OMAP34XX_SDRC_BASE+0x14)
108 #define SDRC_CS_CFG (OMAP34XX_SDRC_BASE+0x40)
109 #define SDRC_SHARING (OMAP34XX_SDRC_BASE+0x44)
110 #define SDRC_DLLA_CTRL (OMAP34XX_SDRC_BASE+0x60)
111 #define SDRC_DLLA_STATUS (OMAP34XX_SDRC_BASE+0x64)
112 #define SDRC_DLLB_CTRL (OMAP34XX_SDRC_BASE+0x68)
113 #define SDRC_DLLB_STATUS (OMAP34XX_SDRC_BASE+0x6C)
114 #define DLLPHASE BIT1
116 #define DLL_DELAY_MASK 0xFF00
117 #define DLL_NO_FILTER_MASK (BIT8|BIT9)
119 #define SDRC_POWER (OMAP34XX_SDRC_BASE+0x70)
120 #define WAKEUPPROC BIT26
122 #define SDRC_MCFG_0 (OMAP34XX_SDRC_BASE+0x80)
123 #define SDRC_MCFG_1 (OMAP34XX_SDRC_BASE+0xB0)
124 #define SDRC_MR_0 (OMAP34XX_SDRC_BASE+0x84)
125 #define SDRC_MR_1 (OMAP34XX_SDRC_BASE+0xB4)
126 #define SDRC_ACTIM_CTRLA_0 (OMAP34XX_SDRC_BASE+0x9C)
127 #define SDRC_ACTIM_CTRLB_0 (OMAP34XX_SDRC_BASE+0xA0)
128 #define SDRC_ACTIM_CTRLA_1 (OMAP34XX_SDRC_BASE+0xC4)
129 #define SDRC_ACTIM_CTRLB_1 (OMAP34XX_SDRC_BASE+0xC8)
130 #define SDRC_RFR_CTRL_0 (OMAP34XX_SDRC_BASE+0xA4)
131 #define SDRC_RFR_CTRL_1 (OMAP34XX_SDRC_BASE+0xD4)
132 #define SDRC_MANUAL_0 (OMAP34XX_SDRC_BASE+0xA8)
133 #define SDRC_MANUAL_1 (OMAP34XX_SDRC_BASE+0xD8)
134 #define OMAP34XX_SDRC_CS0 0x80000000
135 #define OMAP34XX_SDRC_CS1 0xA0000000
137 #define CMD_PRECHARGE 0x1
138 #define CMD_AUTOREFRESH 0x2
139 #define CMD_ENTR_PWRDOWN 0x3
140 #define CMD_EXIT_PWRDOWN 0x4
141 #define CMD_ENTR_SRFRSH 0x5
142 #define CMD_CKE_HIGH 0x6
143 #define CMD_CKE_LOW 0x7
144 #define SOFTRESET BIT1
145 #define SMART_IDLE (0x2 << 3)
146 #define REF_ON_IDLE (0x1 << 6)
148 /* timer regs offsets (32 bit regs) */
149 #define TIDR 0x0 /* r */
150 #define TIOCP_CFG 0x10 /* rw */
151 #define TISTAT 0x14 /* r */
152 #define TISR 0x18 /* rw */
153 #define TIER 0x1C /* rw */
154 #define TWER 0x20 /* rw */
155 #define TCLR 0x24 /* rw */
156 #define TCRR 0x28 /* rw */
157 #define TLDR 0x2C /* rw */
158 #define TTGR 0x30 /* rw */
159 #define TWPS 0x34 /* r */
160 #define TMAR 0x38 /* rw */
161 #define TCAR1 0x3c /* r */
162 #define TSICR 0x40 /* rw */
163 #define TCAR2 0x44 /* r */
164 #define GPT_EN ((0<<2)|BIT1|BIT0) /* enable sys_clk NO-prescale /1 */
167 #define WWPS 0x34 /* r */
168 #define WSPR 0x48 /* rw */
169 #define WD_UNLOCK1 0xAAAA
170 #define WD_UNLOCK2 0x5555
173 #define CM_FCLKEN_IVA2 0x48004000
174 #define CM_CLKEN_PLL_IVA2 0x48004004
175 #define CM_IDLEST_PLL_IVA2 0x48004024
176 #define CM_CLKSEL1_PLL_IVA2 0x48004040
177 #define CM_CLKSEL2_PLL_IVA2 0x48004044
178 #define CM_CLKEN_PLL_MPU 0x48004904
179 #define CM_IDLEST_PLL_MPU 0x48004924
180 #define CM_CLKSEL1_PLL_MPU 0x48004940
181 #define CM_CLKSEL2_PLL_MPU 0x48004944
182 #define CM_FCLKEN1_CORE 0x48004a00
183 #define CM_ICLKEN1_CORE 0x48004a10
184 #define CM_ICLKEN2_CORE 0x48004a14
185 #define CM_CLKSEL_CORE 0x48004a40
186 #define CM_FCLKEN_GFX 0x48004b00
187 #define CM_ICLKEN_GFX 0x48004b10
188 #define CM_CLKSEL_GFX 0x48004b40
189 #define CM_FCLKEN_WKUP 0x48004c00
190 #define CM_ICLKEN_WKUP 0x48004c10
191 #define CM_CLKSEL_WKUP 0x48004c40
192 #define CM_IDLEST_WKUP 0x48004c20
193 #define CM_CLKEN_PLL 0x48004d00
194 #define CM_IDLEST_CKGEN 0x48004d20
195 #define CM_CLKSEL1_PLL 0x48004d40
196 #define CM_CLKSEL2_PLL 0x48004d44
197 #define CM_CLKSEL3_PLL 0x48004d48
198 #define CM_FCLKEN_DSS 0x48004e00
199 #define CM_ICLKEN_DSS 0x48004e10
200 #define CM_CLKSEL_DSS 0x48004e40
201 #define CM_FCLKEN_CAM 0x48004f00
202 #define CM_ICLKEN_CAM 0x48004f10
203 #define CM_CLKSEL_CAM 0x48004F40
204 #define CM_FCLKEN_PER 0x48005000
205 #define CM_ICLKEN_PER 0x48005010
206 #define CM_CLKSEL_PER 0x48005040
207 #define CM_CLKSEL1_EMU 0x48005140
209 #define PRM_CLKSEL 0x48306d40
210 #define PRM_RSTCTRL 0x48307250
211 #define PRM_CLKSRC_CTRL 0x48307270
214 #define PM_RT_APE_BASE_ADDR_ARM (SMX_APE_BASE + 0x10000)
215 #define PM_GPMC_BASE_ADDR_ARM (SMX_APE_BASE + 0x12400)
216 #define PM_OCM_RAM_BASE_ADDR_ARM (SMX_APE_BASE + 0x12800)
217 #define PM_OCM_ROM_BASE_ADDR_ARM (SMX_APE_BASE + 0x12C00)
218 #define PM_IVA2_BASE_ADDR_ARM (SMX_APE_BASE + 0x14000)
220 #define RT_REQ_INFO_PERMISSION_1 (PM_RT_APE_BASE_ADDR_ARM + 0x68)
221 #define RT_READ_PERMISSION_0 (PM_RT_APE_BASE_ADDR_ARM + 0x50)
222 #define RT_WRITE_PERMISSION_0 (PM_RT_APE_BASE_ADDR_ARM + 0x58)
223 #define RT_ADDR_MATCH_1 (PM_RT_APE_BASE_ADDR_ARM + 0x60)
225 #define GPMC_REQ_INFO_PERMISSION_0 (PM_GPMC_BASE_ADDR_ARM + 0x48)
226 #define GPMC_READ_PERMISSION_0 (PM_GPMC_BASE_ADDR_ARM + 0x50)
227 #define GPMC_WRITE_PERMISSION_0 (PM_GPMC_BASE_ADDR_ARM + 0x58)
229 #define OCM_REQ_INFO_PERMISSION_0 (PM_OCM_RAM_BASE_ADDR_ARM + 0x48)
230 #define OCM_READ_PERMISSION_0 (PM_OCM_RAM_BASE_ADDR_ARM + 0x50)
231 #define OCM_WRITE_PERMISSION_0 (PM_OCM_RAM_BASE_ADDR_ARM + 0x58)
232 #define OCM_ADDR_MATCH_2 (PM_OCM_RAM_BASE_ADDR_ARM + 0x80)
234 #define IVA2_REQ_INFO_PERMISSION_0 (PM_IVA2_BASE_ADDR_ARM + 0x48)
235 #define IVA2_READ_PERMISSION_0 (PM_IVA2_BASE_ADDR_ARM + 0x50)
236 #define IVA2_WRITE_PERMISSION_0 (PM_IVA2_BASE_ADDR_ARM + 0x58)
238 #define IVA2_REQ_INFO_PERMISSION_1 (PM_IVA2_BASE_ADDR_ARM + 0x68)
239 #define IVA2_READ_PERMISSION_1 (PM_IVA2_BASE_ADDR_ARM + 0x70)
240 #define IVA2_WRITE_PERMISSION_1 (PM_IVA2_BASE_ADDR_ARM + 0x78)
242 #define IVA2_REQ_INFO_PERMISSION_2 (PM_IVA2_BASE_ADDR_ARM + 0x88)
243 #define IVA2_READ_PERMISSION_2 (PM_IVA2_BASE_ADDR_ARM + 0x90)
244 #define IVA2_WRITE_PERMISSION_2 (PM_IVA2_BASE_ADDR_ARM + 0x98)
246 #define IVA2_REQ_INFO_PERMISSION_3 (PM_IVA2_BASE_ADDR_ARM + 0xA8)
247 #define IVA2_READ_PERMISSION_3 (PM_IVA2_BASE_ADDR_ARM + 0xB0)
248 #define IVA2_WRITE_PERMISSION_3 (PM_IVA2_BASE_ADDR_ARM + 0xB8)
251 #define I2C_BASE1 (OMAP34XX_CORE_L4_IO_BASE + 0x70000)
252 #define I2C_BASE2 (OMAP34XX_CORE_L4_IO_BASE + 0x72000)
253 #define I2C_BASE3 (OMAP34XX_CORE_L4_IO_BASE + 0x60000)