hardware.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. /*
  2. * linux/include/asm-arm/arch-omap/hardware.h
  3. *
  4. * Hardware definitions for TI OMAP processors and boards
  5. *
  6. * NOTE: Please put device driver specific defines into a separate header
  7. * file for each driver.
  8. *
  9. * Copyright (C) 2001 RidgeRun, Inc.
  10. * Author: RidgeRun, Inc. Greg Lonnon <glonnon@ridgerun.com>
  11. *
  12. * Reorganized for Linux-2.6 by Tony Lindgren <tony@atomide.com>
  13. * and Dirk Behme <dirk.behme@de.bosch.com>
  14. *
  15. * This program is free software; you can redistribute it and/or modify it
  16. * under the terms of the GNU General Public License as published by the
  17. * Free Software Foundation; either version 2 of the License, or (at your
  18. * option) any later version.
  19. *
  20. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  21. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  22. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  23. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  25. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  26. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  27. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  28. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  29. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. *
  31. * You should have received a copy of the GNU General Public License along
  32. * with this program; if not, write to the Free Software Foundation, Inc.,
  33. * 675 Mass Ave, Cambridge, MA 02139, USA.
  34. */
  35. #ifndef __ASM_ARCH_OMAP_HARDWARE_H
  36. #define __ASM_ARCH_OMAP_HARDWARE_H
  37. #include <asm/sizes.h>
  38. #ifndef __ASSEMBLER__
  39. #include <asm/types.h>
  40. #include <asm/arch/cpu.h>
  41. #endif
  42. #include <asm/arch/io.h>
  43. #include <asm/arch/serial.h>
  44. /*
  45. * ---------------------------------------------------------------------------
  46. * Common definitions for all OMAP processors
  47. * NOTE: Put all processor or board specific parts to the special header
  48. * files.
  49. * ---------------------------------------------------------------------------
  50. */
  51. /*
  52. * ----------------------------------------------------------------------------
  53. * Timers
  54. * ----------------------------------------------------------------------------
  55. */
  56. #define OMAP_MPU_TIMER1_BASE (0xfffec500)
  57. #define OMAP_MPU_TIMER2_BASE (0xfffec600)
  58. #define OMAP_MPU_TIMER3_BASE (0xfffec700)
  59. #define MPU_TIMER_FREE (1 << 6)
  60. #define MPU_TIMER_CLOCK_ENABLE (1 << 5)
  61. #define MPU_TIMER_AR (1 << 1)
  62. #define MPU_TIMER_ST (1 << 0)
  63. /*
  64. * ----------------------------------------------------------------------------
  65. * Clocks
  66. * ----------------------------------------------------------------------------
  67. */
  68. #define CLKGEN_REG_BASE (0xfffece00)
  69. #define ARM_CKCTL (CLKGEN_REG_BASE + 0x0)
  70. #define ARM_IDLECT1 (CLKGEN_REG_BASE + 0x4)
  71. #define ARM_IDLECT2 (CLKGEN_REG_BASE + 0x8)
  72. #define ARM_EWUPCT (CLKGEN_REG_BASE + 0xC)
  73. #define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10)
  74. #define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14)
  75. #define ARM_SYSST (CLKGEN_REG_BASE + 0x18)
  76. #define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
  77. #define CK_RATEF 1
  78. #define CK_IDLEF 2
  79. #define CK_ENABLEF 4
  80. #define CK_SELECTF 8
  81. #define SETARM_IDLE_SHIFT
  82. /* DPLL control registers */
  83. #define DPLL_CTL (0xfffecf00)
  84. /* DSP clock control. Must use __raw_readw() and __raw_writew() with these */
  85. #define DSP_CONFIG_REG_BASE (0xe1008000)
  86. #define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
  87. #define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
  88. #define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
  89. #define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14)
  90. /*
  91. * ---------------------------------------------------------------------------
  92. * UPLD
  93. * ---------------------------------------------------------------------------
  94. */
  95. #define ULPD_REG_BASE (0xfffe0800)
  96. #define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
  97. #define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
  98. #define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
  99. # define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */
  100. # define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */
  101. #define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34)
  102. # define SOFT_UDC_REQ (1 << 4)
  103. # define SOFT_USB_CLK_REQ (1 << 3)
  104. # define SOFT_DPLL_REQ (1 << 0)
  105. #define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c)
  106. #define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40)
  107. #define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c)
  108. #define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50)
  109. #define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68)
  110. # define DIS_MMC2_DPLL_REQ (1 << 11)
  111. # define DIS_MMC1_DPLL_REQ (1 << 10)
  112. # define DIS_UART3_DPLL_REQ (1 << 9)
  113. # define DIS_UART2_DPLL_REQ (1 << 8)
  114. # define DIS_UART1_DPLL_REQ (1 << 7)
  115. # define DIS_USB_HOST_DPLL_REQ (1 << 6)
  116. #define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74)
  117. #define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c)
  118. /*
  119. * ---------------------------------------------------------------------------
  120. * Watchdog timer
  121. * ---------------------------------------------------------------------------
  122. */
  123. /* Watchdog timer within the OMAP3.2 gigacell */
  124. #define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
  125. #define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
  126. #define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
  127. #define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
  128. #define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
  129. /*
  130. * ---------------------------------------------------------------------------
  131. * Interrupts
  132. * ---------------------------------------------------------------------------
  133. */
  134. #ifdef CONFIG_ARCH_OMAP1
  135. /*
  136. * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c
  137. * or something similar.. -- PFM.
  138. */
  139. #define OMAP_IH1_BASE 0xfffecb00
  140. #define OMAP_IH2_BASE 0xfffe0000
  141. #define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00)
  142. #define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04)
  143. #define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10)
  144. #define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14)
  145. #define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18)
  146. #define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c)
  147. #define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c)
  148. #define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00)
  149. #define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04)
  150. #define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10)
  151. #define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14)
  152. #define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18)
  153. #define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c)
  154. #define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c)
  155. #define IRQ_ITR_REG_OFFSET 0x00
  156. #define IRQ_MIR_REG_OFFSET 0x04
  157. #define IRQ_SIR_IRQ_REG_OFFSET 0x10
  158. #define IRQ_SIR_FIQ_REG_OFFSET 0x14
  159. #define IRQ_CONTROL_REG_OFFSET 0x18
  160. #define IRQ_ISR_REG_OFFSET 0x9c
  161. #define IRQ_ILR0_REG_OFFSET 0x1c
  162. #define IRQ_GMR_REG_OFFSET 0xa0
  163. #endif
  164. /*
  165. * ----------------------------------------------------------------------------
  166. * System control registers
  167. * ----------------------------------------------------------------------------
  168. */
  169. #define MOD_CONF_CTRL_0 0xfffe1080
  170. #define MOD_CONF_CTRL_1 0xfffe1110
  171. /*
  172. * ----------------------------------------------------------------------------
  173. * Pin multiplexing registers
  174. * ----------------------------------------------------------------------------
  175. */
  176. #define FUNC_MUX_CTRL_0 0xfffe1000
  177. #define FUNC_MUX_CTRL_1 0xfffe1004
  178. #define FUNC_MUX_CTRL_2 0xfffe1008
  179. #define COMP_MODE_CTRL_0 0xfffe100c
  180. #define FUNC_MUX_CTRL_3 0xfffe1010
  181. #define FUNC_MUX_CTRL_4 0xfffe1014
  182. #define FUNC_MUX_CTRL_5 0xfffe1018
  183. #define FUNC_MUX_CTRL_6 0xfffe101C
  184. #define FUNC_MUX_CTRL_7 0xfffe1020
  185. #define FUNC_MUX_CTRL_8 0xfffe1024
  186. #define FUNC_MUX_CTRL_9 0xfffe1028
  187. #define FUNC_MUX_CTRL_A 0xfffe102C
  188. #define FUNC_MUX_CTRL_B 0xfffe1030
  189. #define FUNC_MUX_CTRL_C 0xfffe1034
  190. #define FUNC_MUX_CTRL_D 0xfffe1038
  191. #define PULL_DWN_CTRL_0 0xfffe1040
  192. #define PULL_DWN_CTRL_1 0xfffe1044
  193. #define PULL_DWN_CTRL_2 0xfffe1048
  194. #define PULL_DWN_CTRL_3 0xfffe104c
  195. #define PULL_DWN_CTRL_4 0xfffe10ac
  196. /* OMAP-1610 specific multiplexing registers */
  197. #define FUNC_MUX_CTRL_E 0xfffe1090
  198. #define FUNC_MUX_CTRL_F 0xfffe1094
  199. #define FUNC_MUX_CTRL_10 0xfffe1098
  200. #define FUNC_MUX_CTRL_11 0xfffe109c
  201. #define FUNC_MUX_CTRL_12 0xfffe10a0
  202. #define PU_PD_SEL_0 0xfffe10b4
  203. #define PU_PD_SEL_1 0xfffe10b8
  204. #define PU_PD_SEL_2 0xfffe10bc
  205. #define PU_PD_SEL_3 0xfffe10c0
  206. #define PU_PD_SEL_4 0xfffe10c4
  207. /* Timer32K for 1610 and 1710*/
  208. #define OMAP_TIMER32K_BASE 0xFFFBC400
  209. /*
  210. * ---------------------------------------------------------------------------
  211. * TIPB bus interface
  212. * ---------------------------------------------------------------------------
  213. */
  214. #define TIPB_PUBLIC_CNTL_BASE 0xfffed300
  215. #define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8)
  216. #define TIPB_PRIVATE_CNTL_BASE 0xfffeca00
  217. #define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8)
  218. /*
  219. * ----------------------------------------------------------------------------
  220. * MPUI interface
  221. * ----------------------------------------------------------------------------
  222. */
  223. #define MPUI_BASE (0xfffec900)
  224. #define MPUI_CTRL (MPUI_BASE + 0x0)
  225. #define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4)
  226. #define MPUI_DEBUG_DATA (MPUI_BASE + 0x8)
  227. #define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc)
  228. #define MPUI_STATUS_REG (MPUI_BASE + 0x10)
  229. #define MPUI_DSP_STATUS (MPUI_BASE + 0x14)
  230. #define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18)
  231. #define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c)
  232. /*
  233. * ----------------------------------------------------------------------------
  234. * LED Pulse Generator
  235. * ----------------------------------------------------------------------------
  236. */
  237. #define OMAP_LPG1_BASE 0xfffbd000
  238. #define OMAP_LPG2_BASE 0xfffbd800
  239. #define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00)
  240. #define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04)
  241. #define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00)
  242. #define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
  243. /*
  244. * ---------------------------------------------------------------------------
  245. * Processor specific defines
  246. * ---------------------------------------------------------------------------
  247. */
  248. #include "omap730.h"
  249. #include "omap1510.h"
  250. #include "omap24xx.h"
  251. #include "omap16xx.h"
  252. #ifndef __ASSEMBLER__
  253. /*
  254. * ---------------------------------------------------------------------------
  255. * Board specific defines
  256. * ---------------------------------------------------------------------------
  257. */
  258. #ifdef CONFIG_MACH_OMAP_INNOVATOR
  259. #include "board-innovator.h"
  260. #endif
  261. #ifdef CONFIG_MACH_OMAP_H2
  262. #include "board-h2.h"
  263. #endif
  264. #ifdef CONFIG_MACH_OMAP_PERSEUS2
  265. #include "board-perseus2.h"
  266. #endif
  267. #ifdef CONFIG_MACH_OMAP_FSAMPLE
  268. #include "board-fsample.h"
  269. #endif
  270. #ifdef CONFIG_MACH_OMAP_H3
  271. #include "board-h3.h"
  272. #endif
  273. #ifdef CONFIG_MACH_OMAP_H4
  274. #include "board-h4.h"
  275. #endif
  276. #ifdef CONFIG_MACH_OMAP_APOLLON
  277. #include "board-apollon.h"
  278. #endif
  279. #ifdef CONFIG_MACH_OMAP_OSK
  280. #include "board-osk.h"
  281. #endif
  282. #ifdef CONFIG_MACH_VOICEBLUE
  283. #include "board-voiceblue.h"
  284. #endif
  285. #endif /* !__ASSEMBLER__ */
  286. #endif /* __ASM_ARCH_OMAP_HARDWARE_H */