clps711x.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. /*
  2. * This file contains the hardware definitions of the Cirrus Logic
  3. * ARM7 CLPS711X internal registers.
  4. *
  5. * Copyright (C) 2000 Deep Blue Solutions Ltd.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #ifndef __MACH_CLPS711X_H
  22. #define __MACH_CLPS711X_H
  23. #include <linux/mfd/syscon/clps711x.h>
  24. #define CLPS711X_PHYS_BASE (0x80000000)
  25. #define PADR (0x0000)
  26. #define PBDR (0x0001)
  27. #define PCDR (0x0002)
  28. #define PDDR (0x0003)
  29. #define PADDR (0x0040)
  30. #define PBDDR (0x0041)
  31. #define PCDDR (0x0042)
  32. #define PDDDR (0x0043)
  33. #define PEDR (0x0083)
  34. #define PEDDR (0x00c3)
  35. #define SYSCON1 (0x0100)
  36. #define SYSFLG1 (0x0140)
  37. #define MEMCFG1 (0x0180)
  38. #define MEMCFG2 (0x01c0)
  39. #define DRFPR (0x0200)
  40. #define INTSR1 (0x0240)
  41. #define INTMR1 (0x0280)
  42. #define LCDCON (0x02c0)
  43. #define TC1D (0x0300)
  44. #define TC2D (0x0340)
  45. #define RTCDR (0x0380)
  46. #define RTCMR (0x03c0)
  47. #define PMPCON (0x0400)
  48. #define CODR (0x0440)
  49. #define UARTDR1 (0x0480)
  50. #define UBRLCR1 (0x04c0)
  51. #define SYNCIO (0x0500)
  52. #define PALLSW (0x0540)
  53. #define PALMSW (0x0580)
  54. #define STFCLR (0x05c0)
  55. #define BLEOI (0x0600)
  56. #define MCEOI (0x0640)
  57. #define TEOI (0x0680)
  58. #define TC1EOI (0x06c0)
  59. #define TC2EOI (0x0700)
  60. #define RTCEOI (0x0740)
  61. #define UMSEOI (0x0780)
  62. #define COEOI (0x07c0)
  63. #define HALT (0x0800)
  64. #define STDBY (0x0840)
  65. #define FBADDR (0x1000)
  66. #define SYSCON2 (0x1100)
  67. #define SYSFLG2 (0x1140)
  68. #define INTSR2 (0x1240)
  69. #define INTMR2 (0x1280)
  70. #define UARTDR2 (0x1480)
  71. #define UBRLCR2 (0x14c0)
  72. #define SS2DR (0x1500)
  73. #define SRXEOF (0x1600)
  74. #define SS2POP (0x16c0)
  75. #define KBDEOI (0x1700)
  76. #define DAIR (0x2000)
  77. #define DAIDR0 (0x2040)
  78. #define DAIDR1 (0x2080)
  79. #define DAIDR2 (0x20c0)
  80. #define DAISR (0x2100)
  81. #define SYSCON3 (0x2200)
  82. #define INTSR3 (0x2240)
  83. #define INTMR3 (0x2280)
  84. #define LEDFLSH (0x22c0)
  85. #define SDCONF (0x2300)
  86. #define SDRFPR (0x2340)
  87. #define UNIQID (0x2440)
  88. #define DAI64FS (0x2600)
  89. #define PLLW (0x2610)
  90. #define PLLR (0xa5a8)
  91. #define RANDID0 (0x2700)
  92. #define RANDID1 (0x2704)
  93. #define RANDID2 (0x2708)
  94. #define RANDID3 (0x270c)
  95. #define LCDCON_GSEN (1 << 30)
  96. #define LCDCON_GSMD (1 << 31)
  97. /* common bits: UARTDR1 / UARTDR2 */
  98. #define UARTDR_FRMERR (1 << 8)
  99. #define UARTDR_PARERR (1 << 9)
  100. #define UARTDR_OVERR (1 << 10)
  101. /* common bits: UBRLCR1 / UBRLCR2 */
  102. #define UBRLCR_BAUD_MASK ((1 << 12) - 1)
  103. #define UBRLCR_BREAK (1 << 12)
  104. #define UBRLCR_PRTEN (1 << 13)
  105. #define UBRLCR_EVENPRT (1 << 14)
  106. #define UBRLCR_XSTOP (1 << 15)
  107. #define UBRLCR_FIFOEN (1 << 16)
  108. #define UBRLCR_WRDLEN5 (0 << 17)
  109. #define UBRLCR_WRDLEN6 (1 << 17)
  110. #define UBRLCR_WRDLEN7 (2 << 17)
  111. #define UBRLCR_WRDLEN8 (3 << 17)
  112. #define UBRLCR_WRDLEN_MASK (3 << 17)
  113. #define SYNCIO_FRMLEN(x) (((x) & 0x1f) << 8)
  114. #define SYNCIO_SMCKEN (1 << 13)
  115. #define SYNCIO_TXFRMEN (1 << 14)
  116. #define DAIR_RESERVED (0x0404)
  117. #define DAIR_DAIEN (1 << 16)
  118. #define DAIR_ECS (1 << 17)
  119. #define DAIR_LCTM (1 << 19)
  120. #define DAIR_LCRM (1 << 20)
  121. #define DAIR_RCTM (1 << 21)
  122. #define DAIR_RCRM (1 << 22)
  123. #define DAIR_LBM (1 << 23)
  124. #define DAIDR2_FIFOEN (1 << 15)
  125. #define DAIDR2_FIFOLEFT (0x0d << 16)
  126. #define DAIDR2_FIFORIGHT (0x11 << 16)
  127. #define DAISR_RCTS (1 << 0)
  128. #define DAISR_RCRS (1 << 1)
  129. #define DAISR_LCTS (1 << 2)
  130. #define DAISR_LCRS (1 << 3)
  131. #define DAISR_RCTU (1 << 4)
  132. #define DAISR_RCRO (1 << 5)
  133. #define DAISR_LCTU (1 << 6)
  134. #define DAISR_LCRO (1 << 7)
  135. #define DAISR_RCNF (1 << 8)
  136. #define DAISR_RCNE (1 << 9)
  137. #define DAISR_LCNF (1 << 10)
  138. #define DAISR_LCNE (1 << 11)
  139. #define DAISR_FIFO (1 << 12)
  140. #define DAI64FS_I2SF64 (1 << 0)
  141. #define DAI64FS_AUDIOCLKEN (1 << 1)
  142. #define DAI64FS_AUDIOCLKSRC (1 << 2)
  143. #define DAI64FS_MCLK256EN (1 << 3)
  144. #define DAI64FS_LOOPBACK (1 << 5)
  145. #define SDCONF_ACTIVE (1 << 10)
  146. #define SDCONF_CLKCTL (1 << 9)
  147. #define SDCONF_WIDTH_4 (0 << 7)
  148. #define SDCONF_WIDTH_8 (1 << 7)
  149. #define SDCONF_WIDTH_16 (2 << 7)
  150. #define SDCONF_WIDTH_32 (3 << 7)
  151. #define SDCONF_SIZE_16 (0 << 5)
  152. #define SDCONF_SIZE_64 (1 << 5)
  153. #define SDCONF_SIZE_128 (2 << 5)
  154. #define SDCONF_SIZE_256 (3 << 5)
  155. #define SDCONF_CASLAT_2 (2)
  156. #define SDCONF_CASLAT_3 (3)
  157. #define MEMCFG_BUS_WIDTH_32 (1)
  158. #define MEMCFG_BUS_WIDTH_16 (0)
  159. #define MEMCFG_BUS_WIDTH_8 (3)
  160. #define MEMCFG_SQAEN (1 << 6)
  161. #define MEMCFG_CLKENB (1 << 7)
  162. #define MEMCFG_WAITSTATE_8_3 (0 << 2)
  163. #define MEMCFG_WAITSTATE_7_3 (1 << 2)
  164. #define MEMCFG_WAITSTATE_6_3 (2 << 2)
  165. #define MEMCFG_WAITSTATE_5_3 (3 << 2)
  166. #define MEMCFG_WAITSTATE_4_2 (4 << 2)
  167. #define MEMCFG_WAITSTATE_3_2 (5 << 2)
  168. #define MEMCFG_WAITSTATE_2_2 (6 << 2)
  169. #define MEMCFG_WAITSTATE_1_2 (7 << 2)
  170. #define MEMCFG_WAITSTATE_8_1 (8 << 2)
  171. #define MEMCFG_WAITSTATE_7_1 (9 << 2)
  172. #define MEMCFG_WAITSTATE_6_1 (10 << 2)
  173. #define MEMCFG_WAITSTATE_5_1 (11 << 2)
  174. #define MEMCFG_WAITSTATE_4_0 (12 << 2)
  175. #define MEMCFG_WAITSTATE_3_0 (13 << 2)
  176. #define MEMCFG_WAITSTATE_2_0 (14 << 2)
  177. #define MEMCFG_WAITSTATE_1_0 (15 << 2)
  178. /* INTSR1 Interrupts */
  179. #define IRQ_CSINT (4)
  180. #define IRQ_EINT1 (5)
  181. #define IRQ_EINT2 (6)
  182. #define IRQ_EINT3 (7)
  183. #define IRQ_TC1OI (8)
  184. #define IRQ_TC2OI (9)
  185. #define IRQ_RTCMI (10)
  186. #define IRQ_TINT (11)
  187. #define IRQ_UTXINT1 (12)
  188. #define IRQ_URXINT1 (13)
  189. #define IRQ_UMSINT (14)
  190. #define IRQ_SSEOTI (15)
  191. /* INTSR2 Interrupts */
  192. #define IRQ_KBDINT (16 + 0)
  193. #define IRQ_SS2RX (16 + 1)
  194. #define IRQ_SS2TX (16 + 2)
  195. #define IRQ_UTXINT2 (16 + 12)
  196. #define IRQ_URXINT2 (16 + 13)
  197. /* INTSR3 Interrupts */
  198. #define IRQ_DAIINT (32 + 0)
  199. #endif /* __MACH_CLPS711X_H */