h7202-regs.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /*
  2. * arch/arm/mach-h720x/include/mach/h7202-regs.h
  3. *
  4. * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
  5. * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
  6. * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
  7. * (C) 2004 Sascha Hauer <s.hauer@pengutronix.de>
  8. *
  9. * This file contains the hardware definitions of the h720x processors
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. *
  15. * Do not add implementations specific defines here. This files contains
  16. * only defines of the onchip peripherals. Add those defines to boards.h,
  17. * which is included by this file.
  18. */
  19. #define SERIAL2_OFS 0x2d000
  20. #define SERIAL2_BASE (IO_PHYS + SERIAL2_OFS)
  21. #define SERIAL2_VIRT (IO_VIRT + SERIAL2_OFS)
  22. #define SERIAL3_OFS 0x2e000
  23. #define SERIAL3_BASE (IO_PHYS + SERIAL3_OFS)
  24. #define SERIAL3_VIRT (IO_VIRT + SERIAL3_OFS)
  25. /* Matrix Keyboard Controller */
  26. #define KBD_VIRT (IO_VIRT + 0x22000)
  27. #define KBD_KBCR 0x00
  28. #define KBD_KBSC 0x04
  29. #define KBD_KBTR 0x08
  30. #define KBD_KBVR0 0x0C
  31. #define KBD_KBVR1 0x10
  32. #define KBD_KBSR 0x18
  33. #define KBD_KBCR_SCANENABLE (1 << 7)
  34. #define KBD_KBCR_NPOWERDOWN (1 << 2)
  35. #define KBD_KBCR_CLKSEL_MASK (3)
  36. #define KBD_KBCR_CLKSEL_PCLK2 0x0
  37. #define KBD_KBCR_CLKSEL_PCLK128 0x1
  38. #define KBD_KBCR_CLKSEL_PCLK256 0x2
  39. #define KBD_KBCR_CLKSEL_PCLK512 0x3
  40. #define KBD_KBSR_INTR (1 << 0)
  41. #define KBD_KBSR_WAKEUP (1 << 1)
  42. /* USB device controller */
  43. #define USBD_BASE (IO_VIRT + 0x12000)
  44. #define USBD_LENGTH 0x3C
  45. #define USBD_GCTRL 0x00
  46. #define USBD_EPCTRL 0x04
  47. #define USBD_INTMASK 0x08
  48. #define USBD_INTSTAT 0x0C
  49. #define USBD_PWR 0x10
  50. #define USBD_DMARXTX 0x14
  51. #define USBD_DEVID 0x18
  52. #define USBD_DEVCLASS 0x1C
  53. #define USBD_INTCLASS 0x20
  54. #define USBD_SETUP0 0x24
  55. #define USBD_SETUP1 0x28
  56. #define USBD_ENDP0RD 0x2C
  57. #define USBD_ENDP0WT 0x30
  58. #define USBD_ENDP1RD 0x34
  59. #define USBD_ENDP2WT 0x38
  60. /* PS/2 port */
  61. #define PSDATA 0x00
  62. #define PSSTAT 0x04
  63. #define PSSTAT_TXEMPTY (1<<0)
  64. #define PSSTAT_TXBUSY (1<<1)
  65. #define PSSTAT_RXFULL (1<<2)
  66. #define PSSTAT_RXBUSY (1<<3)
  67. #define PSSTAT_CLKIN (1<<4)
  68. #define PSSTAT_DATAIN (1<<5)
  69. #define PSSTAT_PARITY (1<<6)
  70. #define PSCONF 0x08
  71. #define PSCONF_ENABLE (1<<0)
  72. #define PSCONF_TXINTEN (1<<2)
  73. #define PSCONF_RXINTEN (1<<3)
  74. #define PSCONF_FORCECLKLOW (1<<4)
  75. #define PSCONF_FORCEDATLOW (1<<5)
  76. #define PSCONF_LCE (1<<6)
  77. #define PSINTR 0x0C
  78. #define PSINTR_TXINT (1<<0)
  79. #define PSINTR_RXINT (1<<1)
  80. #define PSINTR_PAR (1<<2)
  81. #define PSINTR_RXTO (1<<3)
  82. #define PSINTR_TXTO (1<<4)
  83. #define PSTDLO 0x10 /* clk low before start transmission */
  84. #define PSTPRI 0x14 /* PRI clock */
  85. #define PSTXMT 0x18 /* maximum transmission time */
  86. #define PSTREC 0x20 /* maximum receive time */
  87. #define PSPWDN 0x3c
  88. /* ADC converter */
  89. #define ADC_BASE (IO_VIRT + 0x29000)
  90. #define ADC_CR 0x00
  91. #define ADC_TSCTRL 0x04
  92. #define ADC_BT_CTRL 0x08
  93. #define ADC_MC_CTRL 0x0C
  94. #define ADC_STATUS 0x10
  95. /* ADC control register bits */
  96. #define ADC_CR_PW_CTRL 0x80
  97. #define ADC_CR_DIRECTC 0x04
  98. #define ADC_CR_CONTIME_NO 0x00
  99. #define ADC_CR_CONTIME_2 0x04
  100. #define ADC_CR_CONTIME_4 0x08
  101. #define ADC_CR_CONTIME_ADE 0x0c
  102. #define ADC_CR_LONGCALTIME 0x01
  103. /* ADC touch panel register bits */
  104. #define ADC_TSCTRL_ENABLE 0x80
  105. #define ADC_TSCTRL_INTR 0x40
  106. #define ADC_TSCTRL_SWBYPSS 0x20
  107. #define ADC_TSCTRL_SWINVT 0x10
  108. #define ADC_TSCTRL_S400 0x03
  109. #define ADC_TSCTRL_S200 0x02
  110. #define ADC_TSCTRL_S100 0x01
  111. #define ADC_TSCTRL_S50 0x00
  112. /* ADC Interrupt Status Register bits */
  113. #define ADC_STATUS_TS_BIT 0x80
  114. #define ADC_STATUS_MBT_BIT 0x40
  115. #define ADC_STATUS_BBT_BIT 0x20
  116. #define ADC_STATUS_MIC_BIT 0x10
  117. /* Touch data registers */
  118. #define ADC_TS_X0X1 0x30
  119. #define ADC_TS_X2X3 0x34
  120. #define ADC_TS_Y0Y1 0x38
  121. #define ADC_TS_Y2Y3 0x3c
  122. #define ADC_TS_X4X5 0x40
  123. #define ADC_TS_X6X7 0x44
  124. #define ADC_TS_Y4Y5 0x48
  125. #define ADC_TS_Y6Y7 0x50
  126. /* battery data */
  127. #define ADC_MB_DATA 0x54
  128. #define ADC_BB_DATA 0x58
  129. /* Sound data register */
  130. #define ADC_SD_DAT0 0x60
  131. #define ADC_SD_DAT1 0x64
  132. #define ADC_SD_DAT2 0x68
  133. #define ADC_SD_DAT3 0x6c
  134. #define ADC_SD_DAT4 0x70
  135. #define ADC_SD_DAT5 0x74
  136. #define ADC_SD_DAT6 0x78
  137. #define ADC_SD_DAT7 0x7c