hardware.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /*
  2. * linux/include/asm-arm/arch-clps711x/hardware.h
  3. *
  4. * This file contains the hardware definitions of the Prospector P720T.
  5. *
  6. * Copyright (C) 2000 Deep Blue Solutions Ltd.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  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.
  17. *
  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, MA 02111-1307 USA
  21. */
  22. #ifndef __ASM_ARCH_HARDWARE_H
  23. #define __ASM_ARCH_HARDWARE_H
  24. #include <linux/config.h>
  25. #define CLPS7111_VIRT_BASE 0xff000000
  26. #define CLPS7111_BASE CLPS7111_VIRT_BASE
  27. /*
  28. * The physical addresses that the external chip select signals map to is
  29. * dependent on the setting of the nMEDCHG signal on EP7211 and EP7212
  30. * processors. CONFIG_EP72XX_BOOT_ROM is only available if these
  31. * processors are in use.
  32. */
  33. #ifndef CONFIG_EP72XX_ROM_BOOT
  34. #define CS0_PHYS_BASE (0x00000000)
  35. #define CS1_PHYS_BASE (0x10000000)
  36. #define CS2_PHYS_BASE (0x20000000)
  37. #define CS3_PHYS_BASE (0x30000000)
  38. #define CS4_PHYS_BASE (0x40000000)
  39. #define CS5_PHYS_BASE (0x50000000)
  40. #define CS6_PHYS_BASE (0x60000000)
  41. #define CS7_PHYS_BASE (0x70000000)
  42. #else
  43. #define CS0_PHYS_BASE (0x70000000)
  44. #define CS1_PHYS_BASE (0x60000000)
  45. #define CS2_PHYS_BASE (0x50000000)
  46. #define CS3_PHYS_BASE (0x40000000)
  47. #define CS4_PHYS_BASE (0x30000000)
  48. #define CS5_PHYS_BASE (0x20000000)
  49. #define CS6_PHYS_BASE (0x10000000)
  50. #define CS7_PHYS_BASE (0x00000000)
  51. #endif
  52. #if defined (CONFIG_ARCH_EP7211)
  53. #define EP7211_VIRT_BASE CLPS7111_VIRT_BASE
  54. #define EP7211_BASE CLPS7111_VIRT_BASE
  55. #include <asm/hardware/ep7211.h>
  56. #elif defined (CONFIG_ARCH_EP7212)
  57. #define EP7212_VIRT_BASE CLPS7111_VIRT_BASE
  58. #define EP7212_BASE CLPS7111_VIRT_BASE
  59. #include <asm/hardware/ep7212.h>
  60. #endif
  61. #define SYSPLD_VIRT_BASE 0xfe000000
  62. #define SYSPLD_BASE SYSPLD_VIRT_BASE
  63. #ifndef __ASSEMBLER__
  64. #define PCIO_BASE IO_BASE
  65. #endif
  66. #if defined (CONFIG_ARCH_AUTCPU12)
  67. #define CS89712_VIRT_BASE CLPS7111_VIRT_BASE
  68. #define CS89712_BASE CLPS7111_VIRT_BASE
  69. #include <asm/hardware/clps7111.h>
  70. #include <asm/hardware/ep7212.h>
  71. #include <asm/hardware/cs89712.h>
  72. #endif
  73. #if defined (CONFIG_ARCH_CDB89712)
  74. #include <asm/hardware/clps7111.h>
  75. #include <asm/hardware/ep7212.h>
  76. #include <asm/hardware/cs89712.h>
  77. /* dynamic ioremap() areas */
  78. #define FLASH_START 0x00000000
  79. #define FLASH_SIZE 0x800000
  80. #define FLASH_WIDTH 4
  81. #define SRAM_START 0x60000000
  82. #define SRAM_SIZE 0xc000
  83. #define SRAM_WIDTH 4
  84. #define BOOTROM_START 0x70000000
  85. #define BOOTROM_SIZE 0x80
  86. #define BOOTROM_WIDTH 4
  87. /* static cdb89712_map_io() areas */
  88. #define REGISTER_START 0x80000000
  89. #define REGISTER_SIZE 0x4000
  90. #define REGISTER_BASE 0xff000000
  91. #define ETHER_START 0x20000000
  92. #define ETHER_SIZE 0x1000
  93. #define ETHER_BASE 0xfe000000
  94. #endif
  95. #if defined (CONFIG_ARCH_EDB7211)
  96. /*
  97. * The extra 8 lines of the keyboard matrix are wired to chip select 3 (nCS3)
  98. * and repeat across it. This is the mapping for it.
  99. *
  100. * In jumpered boot mode, nCS3 is mapped to 0x4000000, not 0x3000000. This
  101. * was cause for much consternation and headscratching. This should probably
  102. * be made a compile/run time kernel option.
  103. */
  104. #define EP7211_PHYS_EXTKBD CS3_PHYS_BASE /* physical */
  105. #define EP7211_VIRT_EXTKBD (0xfd000000) /* virtual */
  106. /*
  107. * The CS8900A ethernet chip has its I/O registers wired to chip select 2
  108. * (nCS2). This is the mapping for it.
  109. *
  110. * In jumpered boot mode, nCS2 is mapped to 0x5000000, not 0x2000000. This
  111. * was cause for much consternation and headscratching. This should probably
  112. * be made a compile/run time kernel option.
  113. */
  114. #define EP7211_PHYS_CS8900A CS2_PHYS_BASE /* physical */
  115. #define EP7211_VIRT_CS8900A (0xfc000000) /* virtual */
  116. /*
  117. * The two flash banks are wired to chip selects 0 and 1. This is the mapping
  118. * for them.
  119. *
  120. * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running
  121. * in jumpered boot mode.
  122. */
  123. #define EP7211_PHYS_FLASH1 CS0_PHYS_BASE /* physical */
  124. #define EP7211_PHYS_FLASH2 CS1_PHYS_BASE /* physical */
  125. #define EP7211_VIRT_FLASH1 (0xfa000000) /* virtual */
  126. #define EP7211_VIRT_FLASH2 (0xfb000000) /* virtual */
  127. #endif /* CONFIG_ARCH_EDB7211 */
  128. /*
  129. * Relevant bits in port D, which controls power to the various parts of
  130. * the LCD on the EDB7211.
  131. */
  132. #define EDB_PD1_LCD_DC_DC_EN (1<<1)
  133. #define EDB_PD2_LCDEN (1<<2)
  134. #define EDB_PD3_LCDBL (1<<3)
  135. #if defined (CONFIG_ARCH_CEIVA)
  136. #define CEIVA_VIRT_BASE CLPS7111_VIRT_BASE
  137. #define CEIVA_BASE CLPS7111_VIRT_BASE
  138. #include <asm/hardware/clps7111.h>
  139. #include <asm/hardware/ep7212.h>
  140. /*
  141. * The two flash banks are wired to chip selects 0 and 1. This is the mapping
  142. * for them.
  143. *
  144. * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running
  145. * in jumpered boot mode.
  146. */
  147. #define CEIVA_PHYS_FLASH1 CS0_PHYS_BASE /* physical */
  148. #define CEIVA_PHYS_FLASH2 CS1_PHYS_BASE /* physical */
  149. #define CEIVA_VIRT_FLASH1 (0xfa000000) /* virtual */
  150. #define CEIVA_VIRT_FLASH2 (0xfb000000) /* virtual */
  151. #define CEIVA_FLASH_SIZE 0x100000
  152. #define CEIVA_FLASH_WIDTH 2
  153. #define SRAM_START 0x60000000
  154. #define SRAM_SIZE 0xc000
  155. #define SRAM_WIDTH 4
  156. #define BOOTROM_START 0x70000000
  157. #define BOOTROM_SIZE 0x80
  158. #define BOOTROM_WIDTH 4
  159. /*
  160. * SED1355 LCD controller
  161. */
  162. #define CEIVA_PHYS_SED1355 CS2_PHYS_BASE
  163. #define CEIVA_VIRT_SED1355 (0xfc000000)
  164. /*
  165. * Relevant bits in port D, which controls power to the various parts of
  166. * the LCD on the Ceiva Photo Max, and reset to the LCD controller.
  167. */
  168. // Reset line to SED1355 (must be high to operate)
  169. #define CEIVA_PD1_LCDRST (1<<1)
  170. // LCD panel enable (set to one, to enable LCD)
  171. #define CEIVA_PD4_LCDEN (1<<4)
  172. // Backlight (set to one, to turn on backlight
  173. #define CEIVA_PD5_LCDBL (1<<5)
  174. /*
  175. * Relevant bits in port B, which report the status of the buttons.
  176. */
  177. // White button
  178. #define CEIVA_PB4_WHT_BTN (1<<4)
  179. // Black button
  180. #define CEIVA_PB0_BLK_BTN (1<<0)
  181. #endif // #if defined (CONFIG_ARCH_CEIVA)
  182. #if defined (CONFIG_MACH_MP1000)
  183. /* NOR FLASH */
  184. #define MP1000_NIO_BASE 0xf9000000 /* virtual */
  185. #define MP1000_NIO_START CS0_PHYS_BASE /* physical */
  186. #define MP1000_NIO_SIZE 0x00400000
  187. /* DSP Interface */
  188. #define MP1000_DSP_BASE 0xfa000000 /* virtual */
  189. #define MP1000_DSP_START CS1_PHYS_BASE /* physical */
  190. #define MP1000_DSP_SIZE 0x00100000
  191. /* LCD, DAA/DSP, RTC, DAA RW Reg all in CS2 */
  192. #define MP1000_LIO_BASE 0xfb000000 /* virtual */
  193. #define MP1000_LIO_START CS2_PHYS_BASE /* physical */
  194. #define MP1000_LIO_SIZE 0x00100000
  195. /* NAND FLASH */
  196. #define MP1000_FIO_BASE 0xfc000000 /* virtual */
  197. #define MP1000_FIO_START CS3_PHYS_BASE /* physical */
  198. #define MP1000_FIO_SIZE 0x00800000
  199. /* Ethernet */
  200. #define MP1000_EIO_BASE 0xfd000000 /* virtual */
  201. #define MP1000_EIO_START CS4_PHYS_BASE /* physical */
  202. #define MP1000_EIO_SIZE 0x00100000
  203. #define MP1000_LCD_OFFSET 0x00000000 /* LCD offset in CS2 */
  204. #define MP1000_DDD_OFFSET 0x00001000 /* DAA/DAI/DSP sft reset offst*/
  205. #define MP1000_RTC_OFFSET 0x00002000 /* RTC offset in CS2 */
  206. #define MP1000_DAA_OFFSET 0x00003000 /* DAA RW reg offset in CS2 */
  207. /* IDE */
  208. #define MP1000_IDE_BASE 0xfe000000 /* virtual */
  209. #define MP1000_IDE_START CS5_PHYS_BASE /* physical */
  210. #define MP1000_IDE_SIZE 0x00100000 /* actually it's only 0x1000 */
  211. #define IRQ_HARDDISK IRQ_EINT2
  212. /*
  213. * IDE registers definition
  214. */
  215. #define IDE_CONTROL_BASE (MP1000_IDE_BASE + 0x1000)
  216. #define IDE_BASE_OFF (MP1000_IDE_BASE)
  217. #define IDE_WRITE_DEVICE_DATA (IDE_BASE_OFF + 0x0)
  218. #define IDE_FEATURES_REGISTER (IDE_BASE_OFF + 0x2)
  219. #define IDE_SECTOR_COUNT_REGISTER (IDE_BASE_OFF + 0x4)
  220. #define IDE_SECTOR_NUMBER_REGISTER (IDE_BASE_OFF + 0x6)
  221. #define IDE_CYLINDER_LOW_REGISTER (IDE_BASE_OFF + 0x8)
  222. #define IDE_CYLINDER_HIGH_REGISTER (IDE_BASE_OFF + 0xa)
  223. #define IDE_DEVICE_HEAD_REGISTER (IDE_BASE_OFF + 0xc)
  224. #define IDE_COMMAND_DATA_REGISTER (IDE_BASE_OFF + 0xe)
  225. #define IDE_DEVICE_CONTROL_REGISTER (IDE_CONTROL_BASE + 0xc)
  226. #define IDE_IRQ IRQ_EINT2
  227. #define RTC_PORT(x) (MP1000_LIO_BASE+0x2000 + (x*2))
  228. #define RTC_ALWAYS_BCD 0
  229. /*
  230. // Definitions of the bit fields in the HwPortA register for the
  231. // MP1000 board.
  232. */
  233. #define HwPortAKeyboardRow1 0x00000001
  234. #define HwPortAKeyboardRow2 0x00000002
  235. #define HwPortAKeyboardRow3 0x00000004
  236. #define HwPortAKeyboardRow4 0x00000008
  237. #define HwPortAKeyboardRow5 0x00000010
  238. #define HwPortAKeyboardRow6 0x00000020
  239. #define HwPortALCDEnable 0x00000040
  240. #define HwPortAOffhook 0x00000080
  241. /*
  242. // Definitions of the bit fields in the HwPortB register for the
  243. // MP1000 board.
  244. */
  245. #define HwPortBL3Mode 0x00000001
  246. #define HwPortBL3Clk 0x00000002
  247. #define HwPortBSClk 0x00000001
  248. #define HwPortBSData 0x00000002
  249. #define HwPortBL3Data 0x00000004
  250. #define HwPortBMute 0x00000008
  251. #define HwPortBQD0 0x00000010
  252. #define HwPortBQD1 0x00000020
  253. #define HwPortBQD2 0x00000040
  254. #define HwPortBQD3 0x00000080
  255. /*
  256. // Definitions of the bit fields in the HwPortD register for the
  257. // MP1000 board.
  258. */
  259. #define HwPortDLED1 0x00000001
  260. #define HwPortDLED2 0x00000002
  261. #define HwPortDLED3 0x00000004
  262. #define HwPortDLED4 0x00000008
  263. #define HwPortDLED5 0x00000010
  264. #define HwPortDEECS 0x00000020
  265. #define HwPortBRTS 0x00000040
  266. #define HwPortBRI 0x00000080
  267. /*
  268. // Definitions of the bit fields in the HwPortE register for the
  269. // MP1000 board.
  270. */
  271. #define HwPortECLE 0x00000001
  272. #define HwPortESepromDOut 0x00000001
  273. #define HwPortEALE 0x00000002
  274. #define HwPortESepromDIn 0x00000002
  275. #define HwPortENANDCS 0x00000004
  276. #define HwPortESepromCLK 0x00000004
  277. #endif // #if defined (CONFIG_MACH_MP1000)
  278. #endif