hardware.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /*
  2. * TNETV107X: Hardware information
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  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., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. #ifndef __ASM_ARCH_HARDWARE_H
  22. #define __ASM_ARCH_HARDWARE_H
  23. #ifndef __ASSEMBLY__
  24. #include <asm/sizes.h>
  25. #define ASYNC_EMIF_NUM_CS 4
  26. #define ASYNC_EMIF_MODE_NOR 0
  27. #define ASYNC_EMIF_MODE_NAND 1
  28. #define ASYNC_EMIF_MODE_ONENAND 2
  29. #define ASYNC_EMIF_PRESERVE -1
  30. struct async_emif_config {
  31. unsigned mode;
  32. unsigned select_strobe;
  33. unsigned extend_wait;
  34. unsigned wr_setup;
  35. unsigned wr_strobe;
  36. unsigned wr_hold;
  37. unsigned rd_setup;
  38. unsigned rd_strobe;
  39. unsigned rd_hold;
  40. unsigned turn_around;
  41. enum {
  42. ASYNC_EMIF_8 = 0,
  43. ASYNC_EMIF_16 = 1,
  44. ASYNC_EMIF_32 = 2,
  45. } width;
  46. };
  47. void init_async_emif(int num_cs, struct async_emif_config *config);
  48. int wdt_start(unsigned long msecs);
  49. int wdt_stop(void);
  50. int wdt_kick(void);
  51. #endif
  52. /* Chip configuration unlock codes and registers */
  53. #define TNETV107X_KICK0 (TNETV107X_CHIP_CONFIG_SYS_BASE+0x38)
  54. #define TNETV107X_KICK1 (TNETV107X_CHIP_CONFIG_SYS_BASE+0x3c)
  55. #define TNETV107X_PINMUX(n) (TNETV107X_CHIP_CONFIG_SYS_BASE+0x150+(n)*4)
  56. #define TNETV107X_KICK0_MAGIC 0x83e70b13
  57. #define TNETV107X_KICK1_MAGIC 0x95a4f1e0
  58. /* Module base addresses */
  59. #define TNETV107X_TPCC_BASE 0x01C00000
  60. #define TNETV107X_TPTC0_BASE 0x01C10000
  61. #define TNETV107X_TPTC1_BASE 0x01C10400
  62. #define TNETV107X_INTC_BASE 0x03000000
  63. #define TNETV107X_LCD_CONTROLLER_BASE 0x08030000
  64. #define TNETV107X_INTD_BASE 0x08038000
  65. #define TNETV107X_INTD_IPC_BASE 0x08038000
  66. #define TNETV107X_INTD_FAST_BASE 0x08039000
  67. #define TNETV107X_INTD_ASYNC_BASE 0x0803A000
  68. #define TNETV107X_INTD_SLOW_BASE 0x0803B000
  69. #define TNETV107X_PKA_BASE 0x08040000
  70. #define TNETV107X_RNG_BASE 0x08044000
  71. #define TNETV107X_TIMER0_BASE 0x08086500
  72. #define TNETV107X_TIMER1_BASE 0x08086600
  73. #define TNETV107X_WDT0_ARM_BASE 0x08086700
  74. #define TNETV107X_WDT1_DSP_BASE 0x08086800
  75. #define TNETV107X_CHIP_CONFIG_SYS_BASE 0x08087000
  76. #define TNETV107X_GPIO_BASE 0x08088000
  77. #define TNETV107X_UART1_BASE 0x08088400
  78. #define TNETV107X_TOUCHSCREEN_BASE 0x08088500
  79. #define TNETV107X_SDIO0_BASE 0x08088700
  80. #define TNETV107X_SDIO1_BASE 0x08088800
  81. #define TNETV107X_MDIO_BASE 0x08088900
  82. #define TNETV107X_KEYPAD_BASE 0x08088A00
  83. #define TNETV107X_SSP_BASE 0x08088C00
  84. #define TNETV107X_CLOCK_CONTROL_BASE 0x0808A000
  85. #define TNETV107X_PSC_BASE 0x0808B000
  86. #define TNETV107X_TDM0_BASE 0x08100000
  87. #define TNETV107X_TDM1_BASE 0x08100100
  88. #define TNETV107X_MCDMA_BASE 0x08108000
  89. #define TNETV107X_UART0_DMA_BASE 0x08108200
  90. #define TNETV107X_USBSS_BASE 0x08120000
  91. #define TNETV107X_VLYNQ_CONTROL_BASE 0x0810D000
  92. #define TNETV107X_ASYNC_EMIF_CNTRL_BASE 0x08200000
  93. #define TNETV107X_VLYNQ_MEM_MAP_BASE 0x0C000000
  94. #define TNETV107X_IMCOP_BASE 0x01CC0000
  95. #define TNETV107X_MBX_LITE_BASE 0x07000000
  96. #define TNETV107X_ETHSS_BASE 0x0803C000
  97. #define TNETV107X_CPSW_BASE 0x0803C000
  98. #define TNETV107X_SPF_BASE 0x0803C800
  99. #define TNETV107X_IOPU_ETHSS_BASE 0x0803D000
  100. #define TNETV107X_VTP_CNTRL_0 0x0803D800
  101. #define TNETV107X_VTP_CNTRL_1 0x0803D900
  102. #define TNETV107X_UART2_DMA_BASE 0x08108400
  103. #define TNETV107X_INTERNAL_MEMORY 0x20000000
  104. #define TNETV107X_ASYNC_EMIF_DATA_CE0_BASE 0x30000000
  105. #define TNETV107X_ASYNC_EMIF_DATA_CE1_BASE 0x40000000
  106. #define TNETV107X_ASYNC_EMIF_DATA_CE2_BASE 0x44000000
  107. #define TNETV107X_ASYNC_EMIF_DATA_CE3_BASE 0x48000000
  108. #define TNETV107X_DDR_EMIF_DATA_BASE 0x80000000
  109. #define TNETV107X_DDR_EMIF_CONTROL_BASE 0x90000000
  110. /* LPSC module definitions */
  111. #define TNETV107X_LPSC_ARM 0
  112. #define TNETV107X_LPSC_GEM 1
  113. #define TNETV107X_LPSC_DDR2_PHY 2
  114. #define TNETV107X_LPSC_TPCC 3
  115. #define TNETV107X_LPSC_TPTC0 4
  116. #define TNETV107X_LPSC_TPTC1 5
  117. #define TNETV107X_LPSC_RAM 6
  118. #define TNETV107X_LPSC_MBX_LITE 7
  119. #define TNETV107X_LPSC_LCD 8
  120. #define TNETV107X_LPSC_ETHSS 9
  121. #define TNETV107X_LPSC_AEMIF 10
  122. #define TNETV107X_LPSC_CHIP_CFG 11
  123. #define TNETV107X_LPSC_TSC 12
  124. #define TNETV107X_LPSC_ROM 13
  125. #define TNETV107X_LPSC_UART2 14
  126. #define TNETV107X_LPSC_PKTSEC 15
  127. #define TNETV107X_LPSC_SECCTL 16
  128. #define TNETV107X_LPSC_KEYMGR 17
  129. #define TNETV107X_LPSC_KEYPAD 18
  130. #define TNETV107X_LPSC_GPIO 19
  131. #define TNETV107X_LPSC_MDIO 20
  132. #define TNETV107X_LPSC_SDIO0 21
  133. #define TNETV107X_LPSC_UART0 22
  134. #define TNETV107X_LPSC_UART1 23
  135. #define TNETV107X_LPSC_TIMER0 24
  136. #define TNETV107X_LPSC_TIMER1 25
  137. #define TNETV107X_LPSC_WDT_ARM 26
  138. #define TNETV107X_LPSC_WDT_DSP 27
  139. #define TNETV107X_LPSC_SSP 28
  140. #define TNETV107X_LPSC_TDM0 29
  141. #define TNETV107X_LPSC_VLYNQ 30
  142. #define TNETV107X_LPSC_MCDMA 31
  143. #define TNETV107X_LPSC_USB0 32
  144. #define TNETV107X_LPSC_TDM1 33
  145. #define TNETV107X_LPSC_DEBUGSS 34
  146. #define TNETV107X_LPSC_ETHSS_RGMII 35
  147. #define TNETV107X_LPSC_SYSTEM 36
  148. #define TNETV107X_LPSC_IMCOP 37
  149. #define TNETV107X_LPSC_SPARE 38
  150. #define TNETV107X_LPSC_SDIO1 39
  151. #define TNETV107X_LPSC_USB1 40
  152. #define TNETV107X_LPSC_USBSS 41
  153. #define TNETV107X_LPSC_DDR2_EMIF1_VRST 42
  154. #define TNETV107X_LPSC_DDR2_EMIF2_VCTL_RST 43
  155. #define TNETV107X_LPSC_MAX 44
  156. /* Interrupt controller */
  157. #define INTC_GLB_EN (TNETV107X_INTC_BASE + 0x10)
  158. #define INTC_HINT_EN (TNETV107X_INTC_BASE + 0x1500)
  159. #define INTC_EN_CLR0 (TNETV107X_INTC_BASE + 0x380)
  160. #endif /* __ASM_ARCH_HARDWARE_H */